diff --git a/lib/AvaTaxClient.ts b/lib/AvaTaxClient.ts index 6e12999..6cac969 100644 --- a/lib/AvaTaxClient.ts +++ b/lib/AvaTaxClient.ts @@ -1,242 +1,258 @@ -/* - * AvaTax Software Development Kit for JavaScript - * - * (c) 2004-2022 Avalara, Inc. - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - * - * @author Jonathan Wenger - * @author Sachin Baijal - * @copyright 2004-2018 Avalara, Inc. - * @license https://www.apache.org/licenses/LICENSE-2.0 - * @version 24.6.3 - * @link https://github.com/avadev/AvaTax-REST-V2-JS-SDK - */ - -import * as https from 'https'; -import fetch, { Response } from 'node-fetch'; -import { ReadStream } from 'fs'; -import * as FormData from 'form-data'; -import { JsonConvert, PropertyMatchingRule } from "json2typescript" - -import { createBasicAuthHeader } from './utils/basic_auth'; -import { withTimeout } from './utils/withTimeout'; -import * as Models from './models/index'; -import * as Enums from './enums/index'; -import Logger, { LogLevel, LogOptions } from './utils/logger'; -import LogObject from './utils/logObject'; -import { FetchResult } from './utils/fetch_result'; - -export class AvalaraError extends Error { - code: string; - target: string; - details: string -} - -export interface HttpOptions { - method: string; - headers: NodeJS.Dict; - body: string | null; - agent?: https.Agent -} - -export default class AvaTaxClient { - public appNM: string; - public appVer: string; - public machineNM: string; - public baseUrl: string; - public timeout: number; - public auth: string; - public customHttpAgent: https.Agent; - public enableStrictTypeConversion: boolean; - private apiVersion: string = '24.6.3'; - private logger: Logger; - /** - * 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. - * @param {https.Agent} customHttpAgent Specify the http agent which will be used to make http requests to the Avatax APIs. - * @param {LogOptions} logOptions Specify the logging options to be utilized by the SDK. - */ - constructor({ appName, appVersion, machineName, environment, timeout = 1200000, customHttpAgent, logOptions = { logEnabled: false }, enableStrictTypeConversion = false } : - { appName: string, appVersion: string, machineName: string, environment: string, timeout?: number, customHttpAgent?: https.Agent, logOptions?: LogOptions, enableStrictTypeConversion?: boolean }) { - this.appNM = appName; - this.appVer = appVersion; - this.machineNM = machineName; - this.customHttpAgent = customHttpAgent; - this.enableStrictTypeConversion = enableStrictTypeConversion; - 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; - this.logger = new Logger(logOptions); - } - - /** - * 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 {number} 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 }: { username?: string, password?: string, accountId?: string, licenseKey?: string, bearerToken?: string}) { - 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 = '', mapHeader = new Map(), isMultiPart = false }, toType: { new(): T }): Promise { - const reqHeaders = { - Accept: 'application/json', - Authorization: this.auth, - 'X-Avalara-Client': clientId - }; - let formData = null; - if (!isMultiPart) { - reqHeaders['Content-Type'] = 'application/json'; - } else { - formData = new FormData(); - formData.append("file", payload); - } - for (let [key, value] of mapHeader) { - reqHeaders[key] = value; - } - const options: HttpOptions = { - method: verb, - headers: reqHeaders, - body: payload == null ? null : (formData != null) ? formData : JSON.stringify(payload) - }; - if (this.customHttpAgent) { - options.agent = this.customHttpAgent; - } - const logObject = new LogObject(this.logger.logRequestAndResponseInfo); - logObject.populateRequestInfo(url, options, payload); - return withTimeout(this.timeout, fetch(url, options)).then((res: Response) => { - logObject.populateElapsedTime(); - const contentType = res.headers.get('content-type'); - const contentLength = res.headers.get('content-length'); - - if (contentType === 'application/vnd.ms-excel' || contentType === 'text/csv') { - return res.text().then((txt: string) => { - logObject.populateResponseInfo(res, txt); - res.text = () => Promise.resolve(txt); - return res; - }).catch((error) => { - let ex = new AvalaraError('The server returned the response is in an unexpected format'); - ex.code = 'FormatException'; - ex.details = error; - logObject.populateErrorInfo(res, ex); - throw ex; - }).finally(() => { - this.createLogEntry(logObject); - }); - } - - if (contentType && contentType.includes('application/json')) { - if ((contentLength === "0" && Math.trunc(res.status / 100) === 2) || res.status === 204){ - logObject.populateResponseInfo(res, null); - this.createLogEntry(logObject); - return null; - } - } - return res.json().catch((error) => { - let ex = new AvalaraError('The server returned the response is in an unexpected format'); - ex.code = 'FormatException'; - ex.details = error; - logObject.populateErrorInfo(res, ex); - throw ex; - }).then(json => { - // handle error - if (json && json.error) { - let ex = new AvalaraError(json.error.message); - ex.code = json.error.code; - ex.target = json.error.target; - ex.details = json.error.details; - logObject.populateErrorInfo(res, ex); - throw ex; - } else { - logObject.populateResponseInfo(res, json); - if (this.enableStrictTypeConversion) { - if (typeof json === 'string') { - return json; - } - const jsonConvert = new JsonConvert(null, null, null, PropertyMatchingRule.CASE_INSENSITIVE); - return jsonConvert.deserializeObject(json, toType); - } - return json; - } - }).finally(() => { - this.createLogEntry(logObject); - }); - }); - } - - /** - * 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; - } - -/** - * Create an entry for an HTTP Request/Response in the logger. - * - * @param {LogObject} logObject The instance of the logObject for a specific API invocation (HTTP Request) - */ - createLogEntry(logObject: LogObject) { - if (logObject.getStatusCode() <= 299) { - this.logger.info(logObject.toString()); - } else { - this.logger.error(logObject.toString()); - } - } - - - - /** - * Reset this account's license key +/* + * AvaTax Software Development Kit for JavaScript + * + * (c) 2004-2022 Avalara, Inc. + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + * + * @author Jonathan Wenger + * @author Sachin Baijal + * @copyright 2004-2018 Avalara, Inc. + * @license https://www.apache.org/licenses/LICENSE-2.0 + * @version 24.8.2 + * @link https://github.com/avadev/AvaTax-REST-V2-JS-SDK + */ + +import * as https from 'https'; +import fetch, { Response } from 'node-fetch'; +import { ReadStream } from 'fs'; +import * as FormData from 'form-data'; +import { JsonConvert, PropertyMatchingRule } from "json2typescript" + +import { createBasicAuthHeader } from './utils/basic_auth'; +import { withTimeout } from './utils/withTimeout'; +import * as Models from './models/index'; +import * as Enums from './enums/index'; +import Logger, { LogLevel, LogOptions } from './utils/logger'; +import LogObject from './utils/logObject'; +import { FetchResult } from './utils/fetch_result'; + +export class AvalaraError extends Error { + code: string; + target: string; + details: string +} + +export interface HttpOptions { + method: string; + headers: NodeJS.Dict; + body: string | null; + agent?: https.Agent +} + +export default class AvaTaxClient { + public appNM: string; + public appVer: string; + public machineNM: string; + public baseUrl: string; + public timeout: number; + public auth: string; + public customHttpAgent: https.Agent; + public enableStrictTypeConversion: boolean; + private apiVersion: string = '24.8.2'; + private logger: Logger; + /** + * 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. + * @param {https.Agent} customHttpAgent Specify the http agent which will be used to make http requests to the Avatax APIs. + * @param {LogOptions} logOptions Specify the logging options to be utilized by the SDK. + */ + constructor({ appName, appVersion, machineName, environment, timeout = 1200000, customHttpAgent, logOptions = { logEnabled: false }, enableStrictTypeConversion = false } : + { appName: string, appVersion: string, machineName: string, environment: string, timeout?: number, customHttpAgent?: https.Agent, logOptions?: LogOptions, enableStrictTypeConversion?: boolean }) { + this.appNM = appName; + this.appVer = appVersion; + this.machineNM = machineName; + this.customHttpAgent = customHttpAgent; + this.enableStrictTypeConversion = enableStrictTypeConversion; + 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; + this.logger = new Logger(logOptions); + } + + /** + * 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 {number} 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 }: { username?: string, password?: string, accountId?: string, licenseKey?: string, bearerToken?: string}) { + 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 = '', mapHeader = new Map(), isMultiPart = false }, toType: { new(): T }): Promise { + const reqHeaders = { + Accept: 'application/json', + Authorization: this.auth, + 'X-Avalara-Client': clientId + }; + let formData = null; + if (!isMultiPart) { + reqHeaders['Content-Type'] = 'application/json'; + } else { + formData = new FormData(); + formData.append("file", payload); + } + for (let [key, value] of mapHeader) { + reqHeaders[key] = value; + } + const options: HttpOptions = { + method: verb, + headers: reqHeaders, + body: payload == null ? null : (formData != null) ? formData : JSON.stringify(payload) + }; + if (this.customHttpAgent) { + options.agent = this.customHttpAgent; + } + const logObject = new LogObject(this.logger.logRequestAndResponseInfo); + logObject.populateRequestInfo(url, options, payload); + return withTimeout(this.timeout, fetch(url, options)).then((res: Response) => { + logObject.populateElapsedTime(); + const contentType = res.headers.get('content-type'); + const contentLength = res.headers.get('content-length'); + + if (contentType === 'application/vnd.ms-excel' || contentType === 'text/csv') { + return res.text().then((txt: string) => { + logObject.populateResponseInfo(res, txt); + res.text = () => Promise.resolve(txt); + return res; + }).catch((error) => { + let ex = new AvalaraError('The server returned the response is in an unexpected format'); + ex.code = 'FormatException'; + ex.details = error; + logObject.populateErrorInfo(res, ex); + throw ex; + }).finally(() => { + this.createLogEntry(logObject); + }); + } + + if (contentType && (contentType === 'application/octet-stream' || contentType === 'application/pdf' || contentType === 'image/jpeg')) { + return res.buffer().then((buffer: Buffer) => { + logObject.populateResponseInfo(res, 'Binary file received'); + res.buffer = () => Promise.resolve(buffer); + return res; + }).catch((error) => { + let ex = new AvalaraError('The server returned the response is in an unexpected format'); + ex.code = 'FormatException'; + ex.details = error; + logObject.populateErrorInfo(res, ex); + throw ex; + }).finally(() => { + this.createLogEntry(logObject); + }); + } + + if (contentType && contentType.includes('application/json')) { + if ((contentLength === "0" && Math.trunc(res.status / 100) === 2) || res.status === 204){ + logObject.populateResponseInfo(res, null); + this.createLogEntry(logObject); + return null; + } + } + return res.json().catch((error) => { + let ex = new AvalaraError('The server returned the response is in an unexpected format'); + ex.code = 'FormatException'; + ex.details = error; + logObject.populateErrorInfo(res, ex); + throw ex; + }).then(json => { + // handle error + if (json && json.error) { + let ex = new AvalaraError(json.error.message); + ex.code = json.error.code; + ex.target = json.error.target; + ex.details = json.error.details; + logObject.populateErrorInfo(res, ex); + throw ex; + } else { + logObject.populateResponseInfo(res, json); + if (this.enableStrictTypeConversion) { + if (typeof json === 'string') { + return json; + } + const jsonConvert = new JsonConvert(null, null, null, PropertyMatchingRule.CASE_INSENSITIVE); + return jsonConvert.deserializeObject(json, toType); + } + return json; + } + }).finally(() => { + this.createLogEntry(logObject); + }); + }); + } + + /** + * 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; + } + +/** + * Create an entry for an HTTP Request/Response in the logger. + * + * @param {LogObject} logObject The instance of the logObject for a specific API invocation (HTTP Request) + */ + createLogEntry(logObject: LogObject) { + if (logObject.getStatusCode() <= 299) { + this.logger.info(logObject.toString()); + } else { + this.logger.error(logObject.toString()); + } + } + + + + /** + * 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. @@ -254,31 +270,31 @@ export default class AvaTaxClient { * * ### Security Policies * - * * This API requires one of the following user roles: AccountAdmin, BatchServiceAdmin, Registrar, SiteAdmin, SSTAdmin, SystemAdmin, TechnicalSupportAdmin. - * Swagger Name: AvaTaxClient - * + * * This API requires one of the following user roles: AccountAdmin, BatchServiceAdmin, Registrar, SiteAdmin, SSTAdmin, SystemAdmin, TechnicalSupportAdmin. + * Swagger Name: AvaTaxClient + * * * @param {number} id The ID of the account you wish to update. - * @param {Models.ResetLicenseKeyModel} model A request confirming that you wish to reset the license key of this account. - * @return {Models.LicenseKeyModel} - */ - - accountResetLicenseKey({ id, model }: { id: number, model: Models.ResetLicenseKeyModel }): Promise { - var path = this.buildUrl({ - url: `/api/v2/accounts/${id}/resetlicensekey`, - parameters: {} - }); - var strClientId = - this.appNM + - '; ' + - this.appVer + - '; JavascriptSdk; ' + this.apiVersion + '; ' + - this.machineNM; + * @param {Models.ResetLicenseKeyModel} model A request confirming that you wish to reset the license key of this account. + * @return {Models.LicenseKeyModel} + */ + + accountResetLicenseKey({ id, model }: { id: number, model: Models.ResetLicenseKeyModel }): Promise { + var path = this.buildUrl({ + url: `/api/v2/accounts/${id}/resetlicensekey`, + parameters: {} + }); + var strClientId = + this.appNM + + '; ' + + this.appVer + + '; JavascriptSdk; ' + this.apiVersion + '; ' + + this.machineNM; return this.restCall({ url: path, verb: 'post', payload: model, clientId: strClientId }, Models.LicenseKeyModel); - } - - /** - * Activate an account by accepting terms and conditions + } + + /** + * 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 @@ -292,31 +308,31 @@ export default class AvaTaxClient { * * ### Security Policies * - * * This API requires one of the following user roles: AccountAdmin, BatchServiceAdmin, FirmAdmin, Registrar, SiteAdmin, SSTAdmin, SystemAdmin, TechnicalSupportAdmin. - * Swagger Name: AvaTaxClient - * + * * This API requires one of the following user roles: AccountAdmin, BatchServiceAdmin, FirmAdmin, Registrar, SiteAdmin, SSTAdmin, SystemAdmin, TechnicalSupportAdmin. + * Swagger Name: AvaTaxClient + * * * @param {number} id The ID of the account to activate - * @param {Models.ActivateAccountModel} model The activation request - * @return {Models.AccountModel} - */ - - activateAccount({ id, model }: { id: number, model: Models.ActivateAccountModel }): Promise { - var path = this.buildUrl({ - url: `/api/v2/accounts/${id}/activate`, - parameters: {} - }); - var strClientId = - this.appNM + - '; ' + - this.appVer + - '; JavascriptSdk; ' + this.apiVersion + '; ' + - this.machineNM; + * @param {Models.ActivateAccountModel} model The activation request + * @return {Models.AccountModel} + */ + + activateAccount({ id, model }: { id: number, model: Models.ActivateAccountModel }): Promise { + var path = this.buildUrl({ + url: `/api/v2/accounts/${id}/activate`, + parameters: {} + }); + var strClientId = + this.appNM + + '; ' + + this.appVer + + '; JavascriptSdk; ' + this.apiVersion + '; ' + + this.machineNM; return this.restCall({ url: path, verb: 'post', payload: model, clientId: strClientId }, Models.AccountModel); - } - - /** - * Retrieve audit history for an account. + } + + /** + * 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 @@ -334,39 +350,39 @@ export default class AvaTaxClient { * * ### Security Policies * - * * This API requires one of the following user roles: AccountAdmin, AccountUser, BatchServiceAdmin, CompanyAdmin, CompanyUser, Compliance Root User, ComplianceAdmin, ComplianceUser, CSPAdmin, CSPTester, ECMAccountUser, ECMCompanyUser, FirmAdmin, FirmUser, Registrar, SiteAdmin, SSTAdmin, SystemAdmin, TechnicalSupportAdmin, TechnicalSupportUser, TreasuryAdmin, TreasuryUser. - * Swagger Name: AvaTaxClient - * + * * This API requires one of the following user roles: AccountAdmin, AccountUser, BatchServiceAdmin, CompanyAdmin, CompanyUser, Compliance Root User, ComplianceAdmin, ComplianceUser, CSPAdmin, CSPTester, ECMAccountUser, ECMCompanyUser, FirmAdmin, FirmUser, Registrar, SiteAdmin, SSTAdmin, SystemAdmin, TechnicalSupportAdmin, TechnicalSupportUser, TreasuryAdmin, TreasuryUser. + * Swagger Name: AvaTaxClient + * * * @param {number} id The ID of the account you wish to audit. * @param {Date} 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 {Date} 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 {number} top If nonzero, return no more than this number of results. Used with `$skip` to provide pagination for large datasets. Unless otherwise specified, the maximum number of records that can be returned from an API call is 1,000 records. - * @param {number} skip If nonzero, skip this number of results before returning data. Used with `$top` to provide pagination for large datasets. - * @return {FetchResult} - */ - - auditAccount({ id, start, end, top, skip }: { id: number, start?: Date, end?: Date, top?: number, skip?: number }): Promise> { - var path = this.buildUrl({ - url: `/api/v2/accounts/${id}/audit`, + * @param {number} 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 }: { id: number, start?: Date, end?: Date, top?: number, skip?: number }): Promise> { + var path = this.buildUrl({ + url: `/api/v2/accounts/${id}/audit`, parameters: { start: start, end: end, $top: top, $skip: skip } - }); - var strClientId = - this.appNM + - '; ' + - this.appVer + - '; JavascriptSdk; ' + this.apiVersion + '; ' + - this.machineNM; + }); + var strClientId = + this.appNM + + '; ' + + this.appVer + + '; JavascriptSdk; ' + this.apiVersion + '; ' + + this.machineNM; return this.restCall({ url: path, verb: 'get', payload: null, clientId: strClientId }, FetchResult); - } - - /** - * Create license key for this account + } + + /** + * 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. @@ -380,31 +396,31 @@ export default class AvaTaxClient { * * ### Security Policies * - * * This API requires one of the following user roles: AccountAdmin, BatchServiceAdmin, Registrar, SiteAdmin, SSTAdmin, SystemAdmin, TechnicalSupportAdmin. - * Swagger Name: AvaTaxClient - * + * * This API requires one of the following user roles: AccountAdmin, BatchServiceAdmin, Registrar, SiteAdmin, SSTAdmin, SystemAdmin, TechnicalSupportAdmin. + * Swagger Name: AvaTaxClient + * * * @param {number} id The ID of the account you wish to update. - * @param {Models.AccountLicenseKeyModel} model - * @return {Models.LicenseKeyModel} - */ - - createLicenseKey({ id, model }: { id: number, model: Models.AccountLicenseKeyModel }): Promise { - var path = this.buildUrl({ - url: `/api/v2/accounts/${id}/licensekey`, - parameters: {} - }); - var strClientId = - this.appNM + - '; ' + - this.appVer + - '; JavascriptSdk; ' + this.apiVersion + '; ' + - this.machineNM; + * @param {Models.AccountLicenseKeyModel} model + * @return {Models.LicenseKeyModel} + */ + + createLicenseKey({ id, model }: { id: number, model: Models.AccountLicenseKeyModel }): Promise { + var path = this.buildUrl({ + url: `/api/v2/accounts/${id}/licensekey`, + parameters: {} + }); + var strClientId = + this.appNM + + '; ' + + this.appVer + + '; JavascriptSdk; ' + this.apiVersion + '; ' + + this.machineNM; return this.restCall({ url: path, verb: 'post', payload: model, clientId: strClientId }, Models.LicenseKeyModel); - } - - /** - * Delete license key for this account by license key name + } + + /** + * 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. @@ -413,31 +429,31 @@ export default class AvaTaxClient { * * ### Security Policies * - * * This API requires one of the following user roles: AccountAdmin, BatchServiceAdmin, Registrar, SiteAdmin, SSTAdmin, SystemAdmin, TechnicalSupportAdmin. - * Swagger Name: AvaTaxClient - * + * * This API requires one of the following user roles: AccountAdmin, BatchServiceAdmin, Registrar, SiteAdmin, SSTAdmin, SystemAdmin, TechnicalSupportAdmin. + * Swagger Name: AvaTaxClient + * * * @param {number} id The ID of the account you wish to update. - * @param {string} licensekeyname The license key name you wish to update. - * @return {Models.ErrorDetail[]} - */ - - deleteLicenseKey({ id, licensekeyname }: { id: number, licensekeyname: string }): Promise> { - var path = this.buildUrl({ - url: `/api/v2/accounts/${id}/licensekey/${licensekeyname}`, - parameters: {} - }); - var strClientId = - this.appNM + - '; ' + - this.appVer + - '; JavascriptSdk; ' + this.apiVersion + '; ' + - this.machineNM; + * @param {string} licensekeyname The license key name you wish to update. + * @return {Models.ErrorDetail[]} + */ + + deleteLicenseKey({ id, licensekeyname }: { id: number, licensekeyname: string }): Promise> { + var path = this.buildUrl({ + url: `/api/v2/accounts/${id}/licensekey/${licensekeyname}`, + parameters: {} + }); + var strClientId = + this.appNM + + '; ' + + this.appVer + + '; JavascriptSdk; ' + this.apiVersion + '; ' + + this.machineNM; return this.restCall({ url: path, verb: 'delete', payload: null, clientId: strClientId }, Array); - } - - /** - * Retrieve a single account + } + + /** + * Retrieve a single account * Get the account object identified by this URL. * You may use the '$include' parameter to fetch additional nested data: * @@ -446,33 +462,33 @@ export default class AvaTaxClient { * * ### Security Policies * - * * This API requires one of the following user roles: AccountAdmin, AccountUser, BatchServiceAdmin, CompanyAdmin, CompanyUser, Compliance Root User, ComplianceAdmin, ComplianceUser, CSPAdmin, CSPTester, ECMAccountUser, ECMCompanyUser, FirmAdmin, FirmUser, Registrar, SiteAdmin, SSTAdmin, SystemAdmin, TechnicalSupportAdmin, TechnicalSupportUser, TreasuryAdmin, TreasuryUser. - * Swagger Name: AvaTaxClient - * + * * This API requires one of the following user roles: AccountAdmin, AccountUser, BatchServiceAdmin, CompanyAdmin, CompanyUser, Compliance Root User, ComplianceAdmin, ComplianceUser, CSPAdmin, CSPTester, ECMAccountUser, ECMCompanyUser, FirmAdmin, FirmUser, Registrar, SiteAdmin, SSTAdmin, SystemAdmin, TechnicalSupportAdmin, TechnicalSupportUser, TreasuryAdmin, TreasuryUser. + * Swagger Name: AvaTaxClient + * * * @param {number} id The ID of the account to retrieve - * @param {string} include A comma separated list of special fetch options - * @return {Models.AccountModel} - */ - - getAccount({ id, include }: { id: number, include?: string }): Promise { - var path = this.buildUrl({ - url: `/api/v2/accounts/${id}`, + * @param {string} include A comma separated list of special fetch options + * @return {Models.AccountModel} + */ + + getAccount({ id, include }: { id: number, include?: string }): Promise { + var path = this.buildUrl({ + url: `/api/v2/accounts/${id}`, parameters: { $include: include } - }); - var strClientId = - this.appNM + - '; ' + - this.appVer + - '; JavascriptSdk; ' + this.apiVersion + '; ' + - this.machineNM; + }); + var strClientId = + this.appNM + + '; ' + + this.appVer + + '; JavascriptSdk; ' + this.apiVersion + '; ' + + this.machineNM; return this.restCall({ url: path, verb: 'get', payload: null, clientId: strClientId }, Models.AccountModel); - } - - /** - * Get configuration settings for this account + } + + /** + * 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 @@ -488,114 +504,114 @@ export default class AvaTaxClient { * * ### Security Policies * - * * This API requires one of the following user roles: AccountAdmin, AccountUser, BatchServiceAdmin, CompanyAdmin, CompanyUser, CSPAdmin, CSPTester, ECMAccountUser, ECMCompanyUser, SiteAdmin, SSTAdmin, SystemAdmin, TechnicalSupportAdmin, TechnicalSupportUser. - * Swagger Name: AvaTaxClient - * + * * This API requires one of the following user roles: AccountAdmin, AccountUser, BatchServiceAdmin, CompanyAdmin, CompanyUser, CSPAdmin, CSPTester, ECMAccountUser, ECMCompanyUser, SiteAdmin, SSTAdmin, SystemAdmin, TechnicalSupportAdmin, TechnicalSupportUser. + * Swagger Name: AvaTaxClient + * * - * @param {number} id - * @return {Models.AccountConfigurationModel[]} - */ - - getAccountConfiguration({ id }: { id: number }): Promise> { - var path = this.buildUrl({ - url: `/api/v2/accounts/${id}/configuration`, - parameters: {} - }); - var strClientId = - this.appNM + - '; ' + - this.appVer + - '; JavascriptSdk; ' + this.apiVersion + '; ' + - this.machineNM; + * @param {number} id + * @return {Models.AccountConfigurationModel[]} + */ + + getAccountConfiguration({ id }: { id: number }): Promise> { + var path = this.buildUrl({ + url: `/api/v2/accounts/${id}/configuration`, + parameters: {} + }); + var strClientId = + this.appNM + + '; ' + + this.appVer + + '; JavascriptSdk; ' + this.apiVersion + '; ' + + this.machineNM; return this.restCall({ url: path, verb: 'get', payload: null, clientId: strClientId }, Array); - } - - /** - * Retrieve license key by license key name + } + + /** + * Retrieve license key by license key name * ### Security Policies * - * * This API requires one of the following user roles: AccountAdmin, AccountUser, BatchServiceAdmin, CompanyAdmin, CompanyUser, Compliance Root User, ComplianceAdmin, ComplianceUser, CSPAdmin, CSPTester, ECMAccountUser, ECMCompanyUser, FirmAdmin, FirmUser, Registrar, SiteAdmin, SSTAdmin, SystemAdmin, TechnicalSupportAdmin, TechnicalSupportUser, TreasuryAdmin, TreasuryUser. - * Swagger Name: AvaTaxClient - * + * * This API requires one of the following user roles: AccountAdmin, AccountUser, BatchServiceAdmin, CompanyAdmin, CompanyUser, Compliance Root User, ComplianceAdmin, ComplianceUser, CSPAdmin, CSPTester, ECMAccountUser, ECMCompanyUser, FirmAdmin, FirmUser, Registrar, SiteAdmin, SSTAdmin, SystemAdmin, TechnicalSupportAdmin, TechnicalSupportUser, TreasuryAdmin, TreasuryUser. + * Swagger Name: AvaTaxClient + * * * @param {number} id The ID of the account to retrieve - * @param {string} licensekeyname The ID of the account to retrieve - * @return {Models.AccountLicenseKeyModel} - */ - - getLicenseKey({ id, licensekeyname }: { id: number, licensekeyname: string }): Promise { - var path = this.buildUrl({ - url: `/api/v2/accounts/${id}/licensekey/${licensekeyname}`, - parameters: {} - }); - var strClientId = - this.appNM + - '; ' + - this.appVer + - '; JavascriptSdk; ' + this.apiVersion + '; ' + - this.machineNM; + * @param {string} licensekeyname The ID of the account to retrieve + * @return {Models.AccountLicenseKeyModel} + */ + + getLicenseKey({ id, licensekeyname }: { id: number, licensekeyname: string }): Promise { + var path = this.buildUrl({ + url: `/api/v2/accounts/${id}/licensekey/${licensekeyname}`, + parameters: {} + }); + var strClientId = + this.appNM + + '; ' + + this.appVer + + '; JavascriptSdk; ' + this.apiVersion + '; ' + + this.machineNM; return this.restCall({ url: path, verb: 'get', payload: null, clientId: strClientId }, Models.AccountLicenseKeyModel); - } - - /** - * Retrieve all license keys for this account + } + + /** + * 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, BatchServiceAdmin, CompanyAdmin, CompanyUser, Compliance Root User, ComplianceAdmin, ComplianceUser, CSPAdmin, CSPTester, ECMAccountUser, ECMCompanyUser, FirmAdmin, FirmUser, Registrar, SiteAdmin, SSTAdmin, SystemAdmin, TechnicalSupportAdmin, TechnicalSupportUser, TreasuryAdmin, TreasuryUser. - * Swagger Name: AvaTaxClient - * + * * This API requires one of the following user roles: AccountAdmin, AccountUser, BatchServiceAdmin, CompanyAdmin, CompanyUser, Compliance Root User, ComplianceAdmin, ComplianceUser, CSPAdmin, CSPTester, ECMAccountUser, ECMCompanyUser, FirmAdmin, FirmUser, Registrar, SiteAdmin, SSTAdmin, SystemAdmin, TechnicalSupportAdmin, TechnicalSupportUser, TreasuryAdmin, TreasuryUser. + * Swagger Name: AvaTaxClient + * * - * @param {number} id The ID of the account to retrieve - * @return {Models.AccountLicenseKeyModel[]} - */ - - getLicenseKeys({ id }: { id: number }): Promise> { - var path = this.buildUrl({ - url: `/api/v2/accounts/${id}/licensekeys`, - parameters: {} - }); - var strClientId = - this.appNM + - '; ' + - this.appVer + - '; JavascriptSdk; ' + this.apiVersion + '; ' + - this.machineNM; + * @param {number} id The ID of the account to retrieve + * @return {Models.AccountLicenseKeyModel[]} + */ + + getLicenseKeys({ id }: { id: number }): Promise> { + var path = this.buildUrl({ + url: `/api/v2/accounts/${id}/licensekeys`, + parameters: {} + }); + var strClientId = + this.appNM + + '; ' + + this.appVer + + '; JavascriptSdk; ' + this.apiVersion + '; ' + + this.machineNM; return this.restCall({ url: path, verb: 'get', payload: null, clientId: strClientId }, Array); - } - - /** - * Retrieve a list of MRS Accounts + } + + /** + * Retrieve a list of MRS Accounts * This API is available by invitation only. * * Get a list of accounts with an active MRS service. * * ### Security Policies * - * * This API requires one of the following user roles: AccountAdmin, AccountUser, BatchServiceAdmin, CompanyAdmin, CompanyUser, Compliance Root User, ComplianceAdmin, ComplianceUser, CSPAdmin, CSPTester, ECMAccountUser, ECMCompanyUser, FirmAdmin, FirmUser, Registrar, SiteAdmin, SSTAdmin, SystemAdmin, TechnicalSupportAdmin, TechnicalSupportUser, TreasuryAdmin, TreasuryUser. - * Swagger Name: AvaTaxClient - * - * - * @return {FetchResult} - */ - - listMrsAccounts(): Promise> { - var path = this.buildUrl({ - url: `/api/v2/accounts/mrs`, - parameters: {} - }); - var strClientId = - this.appNM + - '; ' + - this.appVer + - '; JavascriptSdk; ' + this.apiVersion + '; ' + - this.machineNM; + * * This API requires one of the following user roles: AccountAdmin, AccountUser, BatchServiceAdmin, CompanyAdmin, CompanyUser, Compliance Root User, ComplianceAdmin, ComplianceUser, CSPAdmin, CSPTester, ECMAccountUser, ECMCompanyUser, FirmAdmin, FirmUser, Registrar, SiteAdmin, SSTAdmin, SystemAdmin, TechnicalSupportAdmin, TechnicalSupportUser, TreasuryAdmin, TreasuryUser. + * Swagger Name: AvaTaxClient + * + * + * @return {FetchResult} + */ + + listMrsAccounts(): Promise> { + var path = this.buildUrl({ + url: `/api/v2/accounts/mrs`, + parameters: {} + }); + var strClientId = + this.appNM + + '; ' + + this.appVer + + '; JavascriptSdk; ' + this.apiVersion + '; ' + + this.machineNM; return this.restCall({ url: path, verb: 'get', payload: null, clientId: strClientId }, FetchResult); - } - - /** - * Retrieve all accounts + } + + /** + * 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. @@ -611,21 +627,21 @@ export default class AvaTaxClient { * * ### Security Policies * - * * This API requires one of the following user roles: AccountAdmin, AccountUser, BatchServiceAdmin, CompanyAdmin, CompanyUser, Compliance Root User, ComplianceAdmin, ComplianceUser, CSPAdmin, CSPTester, ECMAccountUser, ECMCompanyUser, FirmAdmin, FirmUser, Registrar, SiteAdmin, SSTAdmin, SystemAdmin, TechnicalSupportAdmin, TechnicalSupportUser, TreasuryAdmin, TreasuryUser. - * Swagger Name: AvaTaxClient - * + * * This API requires one of the following user roles: AccountAdmin, AccountUser, BatchServiceAdmin, CompanyAdmin, CompanyUser, Compliance Root User, ComplianceAdmin, ComplianceUser, CSPAdmin, CSPTester, ECMAccountUser, ECMCompanyUser, 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 {number} top If nonzero, return no more than this number of results. Used with `$skip` to provide pagination for large datasets. Unless otherwise specified, the maximum number of records that can be returned from an API call is 1,000 records. * @param {number} skip If nonzero, skip this number of results before returning data. Used with `$top` to provide pagination for large datasets. - * @param {string} orderBy A comma separated list of sort statements in the format `(fieldname) [ASC|DESC]`, for example `id ASC`. - * @return {FetchResult} - */ - - queryAccounts({ include, filter, top, skip, orderBy }: { include?: string, filter?: string, top?: number, skip?: number, orderBy?: string }): Promise> { - 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 }: { include?: string, filter?: string, top?: number, skip?: number, orderBy?: string }): Promise> { + var path = this.buildUrl({ + url: `/api/v2/accounts`, parameters: { $include: include, $filter: filter, @@ -633,18 +649,18 @@ export default class AvaTaxClient { $skip: skip, $orderBy: orderBy } - }); - var strClientId = - this.appNM + - '; ' + - this.appVer + - '; JavascriptSdk; ' + this.apiVersion + '; ' + - this.machineNM; + }); + var strClientId = + this.appNM + + '; ' + + this.appVer + + '; JavascriptSdk; ' + this.apiVersion + '; ' + + this.machineNM; return this.restCall({ url: path, verb: 'get', payload: null, clientId: strClientId }, FetchResult); - } - - /** - * Change configuration settings for this account + } + + /** + * 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 @@ -660,31 +676,31 @@ export default class AvaTaxClient { * * ### Security Policies * - * * This API requires one of the following user roles: AccountAdmin, BatchServiceAdmin, CSPTester, SSTAdmin, TechnicalSupportAdmin. - * Swagger Name: AvaTaxClient - * + * * This API requires one of the following user roles: AccountAdmin, BatchServiceAdmin, CSPTester, SSTAdmin, TechnicalSupportAdmin. + * Swagger Name: AvaTaxClient + * * * @param {number} id - * @param {Models.AccountConfigurationModel[]} model - * @return {Models.AccountConfigurationModel[]} - */ - - setAccountConfiguration({ id, model }: { id: number, model: Models.AccountConfigurationModel[] }): Promise> { - var path = this.buildUrl({ - url: `/api/v2/accounts/${id}/configuration`, - parameters: {} - }); - var strClientId = - this.appNM + - '; ' + - this.appVer + - '; JavascriptSdk; ' + this.apiVersion + '; ' + - this.machineNM; + * @param {Models.AccountConfigurationModel[]} model + * @return {Models.AccountConfigurationModel[]} + */ + + setAccountConfiguration({ id, model }: { id: number, model: Models.AccountConfigurationModel[] }): Promise> { + var path = this.buildUrl({ + url: `/api/v2/accounts/${id}/configuration`, + parameters: {} + }); + var strClientId = + this.appNM + + '; ' + + this.appVer + + '; JavascriptSdk; ' + this.apiVersion + '; ' + + this.machineNM; return this.restCall({ url: path, verb: 'post', payload: model, clientId: strClientId }, Array); - } - - /** - * Retrieve geolocation information for a specified US or Canadian address + } + + /** + * Retrieve geolocation information for a specified US or Canadian address * Resolve a US or Canadian address against Avalara's address validation system. Note that this API is * valid for US and Canadian addresses only. * @@ -702,9 +718,9 @@ export default class AvaTaxClient { * ### Security Policies * * * This API requires one of the following user roles: AccountAdmin, AccountOperator, AccountUser, BatchServiceAdmin, CompanyAdmin, CompanyUser, CSPTester, SSTAdmin, TechnicalSupportAdmin, TechnicalSupportUser. - * * This API depends on the following active services:*Required* (all): AutoAddress. - * Swagger Name: AvaTaxClient - * + * * This API depends on the following active services:*Required* (all): AutoAddress. + * Swagger Name: AvaTaxClient + * * * @param {string} line1 Line 1 * @param {string} line2 Line 2 @@ -713,13 +729,13 @@ 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 {Enums.TextCase} textCase selectable text case for address validation (See TextCase::* for a list of allowable values) - * @return {Models.AddressResolutionModel} - */ - - resolveAddress({ line1, line2, line3, city, region, postalCode, country, textCase }: { line1?: string, line2?: string, line3?: string, city?: string, region?: string, postalCode?: string, country?: string, textCase?: Enums.TextCase }): Promise { - var path = this.buildUrl({ - url: `/api/v2/addresses/resolve`, + * @param {Enums.TextCase} textCase selectable text case for address validation (See TextCase::* for a list of allowable values) + * @return {Models.AddressResolutionModel} + */ + + resolveAddress({ line1, line2, line3, city, region, postalCode, country, textCase }: { line1?: string, line2?: string, line3?: string, city?: string, region?: string, postalCode?: string, country?: string, textCase?: Enums.TextCase }): Promise { + var path = this.buildUrl({ + url: `/api/v2/addresses/resolve`, parameters: { line1: line1, line2: line2, @@ -730,18 +746,18 @@ export default class AvaTaxClient { country: country, textCase: textCase } - }); - var strClientId = - this.appNM + - '; ' + - this.appVer + - '; JavascriptSdk; ' + this.apiVersion + '; ' + - this.machineNM; + }); + var strClientId = + this.appNM + + '; ' + + this.appVer + + '; JavascriptSdk; ' + this.apiVersion + '; ' + + this.machineNM; return this.restCall({ url: path, verb: 'get', payload: null, clientId: strClientId }, Models.AddressResolutionModel); - } - - /** - * Retrieve geolocation information for a specified US or Canadian address + } + + /** + * Retrieve geolocation information for a specified US or Canadian address * Resolve a US or Canadian address against Avalara's address validation system. Note that this API is * valid for US and Canadian addresses only. * @@ -754,71 +770,71 @@ export default class AvaTaxClient { * ### Security Policies * * * This API requires one of the following user roles: AccountAdmin, AccountOperator, AccountUser, BatchServiceAdmin, CompanyAdmin, CompanyUser, CSPTester, SSTAdmin, TechnicalSupportAdmin, TechnicalSupportUser. - * * This API depends on the following active services:*Required* (all): AutoAddress. - * Swagger Name: AvaTaxClient - * - * - * @param {Models.AddressValidationInfo} model The address to resolve - * @return {Models.AddressResolutionModel} - */ - - resolveAddressPost({ model }: { model: Models.AddressValidationInfo }): Promise { - var path = this.buildUrl({ - url: `/api/v2/addresses/resolve`, - parameters: {} - }); - var strClientId = - this.appNM + - '; ' + - this.appVer + - '; JavascriptSdk; ' + this.apiVersion + '; ' + - this.machineNM; + * * This API depends on the following active services:*Required* (all): AutoAddress. + * Swagger Name: AvaTaxClient + * + * + * @param {Models.AddressValidationInfo} model The address to resolve + * @return {Models.AddressResolutionModel} + */ + + resolveAddressPost({ model }: { model: Models.AddressValidationInfo }): Promise { + var path = this.buildUrl({ + url: `/api/v2/addresses/resolve`, + parameters: {} + }); + var strClientId = + this.appNM + + '; ' + + this.appVer + + '; JavascriptSdk; ' + this.apiVersion + '; ' + + this.machineNM; return this.restCall({ url: path, verb: 'post', payload: model, clientId: strClientId }, Models.AddressResolutionModel); - } - - /** - * Create new rule - * - * Swagger Name: AvaTaxClient - * + } + + /** + * Create new rule + * + * Swagger Name: AvaTaxClient + * * * @param {number} companyid The ID of the company that owns this AP Config Setting object - * @param {Models.APConfigSettingRequestModel} model The AP Config Setting you wish to create. - * @return {Models.APConfigSettingSuccessResponseModel} - */ - - createAPConfigSetting({ companyid, model }: { companyid: number, model?: Models.APConfigSettingRequestModel }): Promise { - var path = this.buildUrl({ - url: `/api/v2/companies/${companyid}/apconfigsetting`, - parameters: {} - }); - var strClientId = - this.appNM + - '; ' + - this.appVer + - '; JavascriptSdk; ' + this.apiVersion + '; ' + - this.machineNM; + * @param {Models.APConfigSettingRequestModel} model The AP Config Setting you wish to create. + * @return {Models.APConfigSettingSuccessResponseModel} + */ + + createAPConfigSetting({ companyid, model }: { companyid: number, model?: Models.APConfigSettingRequestModel }): Promise { + var path = this.buildUrl({ + url: `/api/v2/companies/${companyid}/apconfigsetting`, + parameters: {} + }); + var strClientId = + this.appNM + + '; ' + + this.appVer + + '; JavascriptSdk; ' + this.apiVersion + '; ' + + this.machineNM; return this.restCall({ url: path, verb: 'post', payload: model, clientId: strClientId }, Models.APConfigSettingSuccessResponseModel); - } - - /** - * Retrieve rule for this company - * - * Swagger Name: AvaTaxClient - * + } + + /** + * Retrieve rule for this company + * + * Swagger Name: AvaTaxClient + * * * @param {number} companyid The ID of the company that defined this rule * @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:* meta, amount, varianceForIgnore, varianceForAccrue, variancePercent, apConfigToleranceType, payAsBilledNoAccrual, payAsBilledAccrueUndercharge, shortPayItemsAccrueUndercharge, markForReviewUndercharge, rejectUndercharge, payAsBilledOvercharge, shortPayAvalaraCalculated, shortPayItemsAccrueOvercharge, markForReviewOvercharge, rejectOvercharge, isActive * @param {string} include A comma separated list of additional data to retrieve. * @param {number} top If nonzero, return no more than this number of results. Used with `$skip` to provide pagination for large datasets. Unless otherwise specified, the maximum number of records that can be returned from an API call is 1,000 records. * @param {number} skip If nonzero, skip this number of results before returning data. Used with `$top` to provide pagination for large datasets. - * @param {string} orderBy A comma separated list of sort statements in the format `(fieldname) [ASC|DESC]`, for example `id ASC`. - * @return {FetchResult} - */ - - getAPConfigSettingByCompany({ companyid, filter, include, top, skip, orderBy }: { companyid: number, filter?: string, include?: string, top?: number, skip?: number, orderBy?: string }): Promise> { - var path = this.buildUrl({ - url: `/api/v2/companies/${companyid}/apconfigsetting`, + * @param {string} orderBy A comma separated list of sort statements in the format `(fieldname) [ASC|DESC]`, for example `id ASC`. + * @return {FetchResult} + */ + + getAPConfigSettingByCompany({ companyid, filter, include, top, skip, orderBy }: { companyid: number, filter?: string, include?: string, top?: number, skip?: number, orderBy?: string }): Promise> { + var path = this.buildUrl({ + url: `/api/v2/companies/${companyid}/apconfigsetting`, parameters: { $filter: filter, $include: include, @@ -826,33 +842,33 @@ export default class AvaTaxClient { $skip: skip, $orderBy: orderBy } - }); - var strClientId = - this.appNM + - '; ' + - this.appVer + - '; JavascriptSdk; ' + this.apiVersion + '; ' + - this.machineNM; + }); + var strClientId = + this.appNM + + '; ' + + this.appVer + + '; JavascriptSdk; ' + this.apiVersion + '; ' + + this.machineNM; return this.restCall({ url: path, verb: 'get', payload: null, clientId: strClientId }, FetchResult); - } - - /** - * Retrieve all rules - * - * Swagger Name: AvaTaxClient - * + } + + /** + * Retrieve all rules + * + * 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:* meta, amount, varianceForIgnore, varianceForAccrue, variancePercent, apConfigToleranceType, payAsBilledNoAccrual, payAsBilledAccrueUndercharge, shortPayItemsAccrueUndercharge, markForReviewUndercharge, rejectUndercharge, payAsBilledOvercharge, shortPayAvalaraCalculated, shortPayItemsAccrueOvercharge, markForReviewOvercharge, rejectOvercharge, isActive * @param {string} include A comma separated list of additional data to retrieve. * @param {number} top If nonzero, return no more than this number of results. Used with `$skip` to provide pagination for large datasets. Unless otherwise specified, the maximum number of records that can be returned from an API call is 1,000 records. * @param {number} skip If nonzero, skip this number of results before returning data. Used with `$top` to provide pagination for large datasets. - * @param {string} orderBy A comma separated list of sort statements in the format `(fieldname) [ASC|DESC]`, for example `id ASC`. - * @return {FetchResult} - */ - - queryAPConfigSetting({ filter, include, top, skip, orderBy }: { filter?: string, include?: string, top?: number, skip?: number, orderBy?: string }): Promise> { - var path = this.buildUrl({ - url: `/api/v2/apconfigsetting`, + * @param {string} orderBy A comma separated list of sort statements in the format `(fieldname) [ASC|DESC]`, for example `id ASC`. + * @return {FetchResult} + */ + + queryAPConfigSetting({ filter, include, top, skip, orderBy }: { filter?: string, include?: string, top?: number, skip?: number, orderBy?: string }): Promise> { + var path = this.buildUrl({ + url: `/api/v2/apconfigsetting`, parameters: { $filter: filter, $include: include, @@ -860,200 +876,200 @@ export default class AvaTaxClient { $skip: skip, $orderBy: orderBy } - }); - var strClientId = - this.appNM + - '; ' + - this.appVer + - '; JavascriptSdk; ' + this.apiVersion + '; ' + - this.machineNM; + }); + var strClientId = + this.appNM + + '; ' + + this.appVer + + '; JavascriptSdk; ' + this.apiVersion + '; ' + + this.machineNM; return this.restCall({ url: path, verb: 'get', payload: null, clientId: strClientId }, FetchResult); - } - - /** - * Update a AP config setting - * - * Swagger Name: AvaTaxClient - * + } + + /** + * Update a AP config setting + * + * Swagger Name: AvaTaxClient + * * * @param {number} companyid The ID of the company that owns this AP config setting object - * @param {Models.APConfigSettingRequestModel} model The AP config setting object you wish to update. - * @return {Models.APConfigSettingSuccessResponseModel} - */ - - updateAPConfigSetting({ companyid, model }: { companyid: number, model?: Models.APConfigSettingRequestModel }): Promise { - var path = this.buildUrl({ - url: `/api/v2/companies/${companyid}/apconfigsetting`, - parameters: {} - }); - var strClientId = - this.appNM + - '; ' + - this.appVer + - '; JavascriptSdk; ' + this.apiVersion + '; ' + - this.machineNM; + * @param {Models.APConfigSettingRequestModel} model The AP config setting object you wish to update. + * @return {Models.APConfigSettingSuccessResponseModel} + */ + + updateAPConfigSetting({ companyid, model }: { companyid: number, model?: Models.APConfigSettingRequestModel }): Promise { + var path = this.buildUrl({ + url: `/api/v2/companies/${companyid}/apconfigsetting`, + parameters: {} + }); + var strClientId = + this.appNM + + '; ' + + this.appVer + + '; JavascriptSdk; ' + this.apiVersion + '; ' + + this.machineNM; return this.restCall({ url: path, verb: 'put', payload: model, clientId: strClientId }, Models.APConfigSettingSuccessResponseModel); - } - - /** - * Create a new AvaFileForm + } + + /** + * 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. - * Swagger Name: AvaTaxClient - * - * - * @param {Models.AvaFileFormModel[]} model The AvaFileForm you wish to create. - * @return {Models.AvaFileFormModel[]} - */ - - createAvaFileForms({ model }: { model: Models.AvaFileFormModel[] }): Promise> { - var path = this.buildUrl({ - url: `/api/v2/avafileforms`, - parameters: {} - }); - var strClientId = - this.appNM + - '; ' + - this.appVer + - '; JavascriptSdk; ' + this.apiVersion + '; ' + - this.machineNM; + * * 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 {Models.AvaFileFormModel[]} model The AvaFileForm you wish to create. + * @return {Models.AvaFileFormModel[]} + */ + + createAvaFileForms({ model }: { model: Models.AvaFileFormModel[] }): Promise> { + var path = this.buildUrl({ + url: `/api/v2/avafileforms`, + parameters: {} + }); + var strClientId = + this.appNM + + '; ' + + this.appVer + + '; JavascriptSdk; ' + this.apiVersion + '; ' + + this.machineNM; return this.restCall({ url: path, verb: 'post', payload: model, clientId: strClientId }, Array); - } - - /** - * Delete a single AvaFileForm + } + + /** + * 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. - * Swagger Name: AvaTaxClient - * - * - * @param {number} id The ID of the AvaFileForm you wish to delete. - * @return {Models.ErrorDetail[]} - */ - - deleteAvaFileForm({ id }: { id: number }): Promise> { - var path = this.buildUrl({ - url: `/api/v2/avafileforms/${id}`, - parameters: {} - }); - var strClientId = - this.appNM + - '; ' + - this.appVer + - '; JavascriptSdk; ' + this.apiVersion + '; ' + - this.machineNM; + * * 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 {number} id The ID of the AvaFileForm you wish to delete. + * @return {Models.ErrorDetail[]} + */ + + deleteAvaFileForm({ id }: { id: number }): Promise> { + var path = this.buildUrl({ + url: `/api/v2/avafileforms/${id}`, + parameters: {} + }); + var strClientId = + this.appNM + + '; ' + + this.appVer + + '; JavascriptSdk; ' + this.apiVersion + '; ' + + this.machineNM; return this.restCall({ url: path, verb: 'delete', payload: null, clientId: strClientId }, Array); - } - - /** - * Retrieve a single AvaFileForm + } + + /** + * 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, BatchServiceAdmin, 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. - * Swagger Name: AvaTaxClient - * - * - * @param {number} id The primary key of this AvaFileForm - * @return {Models.AvaFileFormModel} - */ - - getAvaFileForm({ id }: { id: number }): Promise { - var path = this.buildUrl({ - url: `/api/v2/avafileforms/${id}`, - parameters: {} - }); - var strClientId = - this.appNM + - '; ' + - this.appVer + - '; JavascriptSdk; ' + this.apiVersion + '; ' + - this.machineNM; + * * 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 {number} id The primary key of this AvaFileForm + * @return {Models.AvaFileFormModel} + */ + + getAvaFileForm({ id }: { id: number }): Promise { + var path = this.buildUrl({ + url: `/api/v2/avafileforms/${id}`, + parameters: {} + }); + var strClientId = + this.appNM + + '; ' + + this.appVer + + '; JavascriptSdk; ' + this.apiVersion + '; ' + + this.machineNM; return this.restCall({ url: path, verb: 'get', payload: null, clientId: strClientId }, Models.AvaFileFormModel); - } - - /** - * Retrieve all AvaFileForms + } + + /** + * 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, BatchServiceAdmin, 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. - * Swagger Name: AvaTaxClient - * + * * 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 {number} top If nonzero, return no more than this number of results. Used with `$skip` to provide pagination for large datasets. Unless otherwise specified, the maximum number of records that can be returned from an API call is 1,000 records. * @param {number} skip If nonzero, skip this number of results before returning data. Used with `$top` to provide pagination for large datasets. - * @param {string} orderBy A comma separated list of sort statements in the format `(fieldname) [ASC|DESC]`, for example `id ASC`. - * @return {FetchResult} - */ - - queryAvaFileForms({ filter, top, skip, orderBy }: { filter?: string, top?: number, skip?: number, orderBy?: string }): Promise> { - 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 }: { filter?: string, top?: number, skip?: number, orderBy?: string }): Promise> { + var path = this.buildUrl({ + url: `/api/v2/avafileforms`, parameters: { $filter: filter, $top: top, $skip: skip, $orderBy: orderBy } - }); - var strClientId = - this.appNM + - '; ' + - this.appVer + - '; JavascriptSdk; ' + this.apiVersion + '; ' + - this.machineNM; + }); + var strClientId = + this.appNM + + '; ' + + this.appVer + + '; JavascriptSdk; ' + this.apiVersion + '; ' + + this.machineNM; return this.restCall({ url: path, verb: 'get', payload: null, clientId: strClientId }, FetchResult); - } - - /** - * Update a AvaFileForm + } + + /** + * 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. - * Swagger Name: AvaTaxClient - * + * * 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 {number} id The ID of the AvaFileForm you wish to update - * @param {Models.AvaFileFormModel} model The AvaFileForm model you wish to update. - * @return {Models.AvaFileFormModel} - */ - - updateAvaFileForm({ id, model }: { id: number, model: Models.AvaFileFormModel }): Promise { - var path = this.buildUrl({ - url: `/api/v2/avafileforms/${id}`, - parameters: {} - }); - var strClientId = - this.appNM + - '; ' + - this.appVer + - '; JavascriptSdk; ' + this.apiVersion + '; ' + - this.machineNM; + * @param {Models.AvaFileFormModel} model The AvaFileForm model you wish to update. + * @return {Models.AvaFileFormModel} + */ + + updateAvaFileForm({ id, model }: { id: number, model: Models.AvaFileFormModel }): Promise { + var path = this.buildUrl({ + url: `/api/v2/avafileforms/${id}`, + parameters: {} + }); + var strClientId = + this.appNM + + '; ' + + this.appVer + + '; JavascriptSdk; ' + this.apiVersion + '; ' + + this.machineNM; return this.restCall({ url: path, verb: 'put', payload: model, clientId: strClientId }, Models.AvaFileFormModel); - } - - /** - * Cancel an in progress batch + } + + /** + * 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. @@ -1069,31 +1085,31 @@ export default class AvaTaxClient { * * ### Security Policies * - * * This API requires one of the following user roles: AccountAdmin, AccountOperator, BatchServiceAdmin, CompanyAdmin, CSPTester, SSTAdmin, SystemAdmin, SystemOperator, TechnicalSupportAdmin. - * Swagger Name: AvaTaxClient - * + * * This API requires one of the following user roles: AccountAdmin, AccountOperator, BatchServiceAdmin, CompanyAdmin, CSPTester, SSTAdmin, SystemAdmin, SystemOperator, TechnicalSupportAdmin. + * Swagger Name: AvaTaxClient + * * * @param {number} companyId The ID of the company that owns this batch. - * @param {number} id The ID of the batch to cancel. - * @return {Models.BatchModel} - */ - - cancelBatch({ companyId, id }: { companyId: number, id: number }): Promise { - var path = this.buildUrl({ - url: `/api/v2/companies/${companyId}/batches/${id}/cancel`, - parameters: {} - }); - var strClientId = - this.appNM + - '; ' + - this.appVer + - '; JavascriptSdk; ' + this.apiVersion + '; ' + - this.machineNM; + * @param {number} id The ID of the batch to cancel. + * @return {Models.BatchModel} + */ + + cancelBatch({ companyId, id }: { companyId: number, id: number }): Promise { + var path = this.buildUrl({ + url: `/api/v2/companies/${companyId}/batches/${id}/cancel`, + parameters: {} + }); + var strClientId = + this.appNM + + '; ' + + this.appVer + + '; JavascriptSdk; ' + this.apiVersion + '; ' + + this.machineNM; return this.restCall({ url: path, verb: 'post', payload: null, clientId: strClientId }, Models.BatchModel); - } - - /** - * Create a new batch + } + + /** + * 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). @@ -1116,31 +1132,31 @@ export default class AvaTaxClient { * * ### Security Policies * - * * This API requires one of the following user roles: AccountAdmin, AccountOperator, BatchServiceAdmin, CompanyAdmin, CSPTester, SSTAdmin, SystemAdmin, SystemOperator, TechnicalSupportAdmin. - * Swagger Name: AvaTaxClient - * + * * This API requires one of the following user roles: AccountAdmin, AccountOperator, BatchServiceAdmin, CompanyAdmin, CSPTester, SSTAdmin, SystemAdmin, SystemOperator, TechnicalSupportAdmin. + * Swagger Name: AvaTaxClient + * * * @param {number} companyId The ID of the company that owns this batch. - * @param {Models.BatchModel[]} model The batch you wish to create. - * @return {Models.BatchModel[]} - */ - - createBatches({ companyId, model }: { companyId: number, model: Models.BatchModel[] }): Promise> { - var path = this.buildUrl({ - url: `/api/v2/companies/${companyId}/batches`, - parameters: {} - }); - var strClientId = - this.appNM + - '; ' + - this.appVer + - '; JavascriptSdk; ' + this.apiVersion + '; ' + - this.machineNM; + * @param {Models.BatchModel[]} model The batch you wish to create. + * @return {Models.BatchModel[]} + */ + + createBatches({ companyId, model }: { companyId: number, model: Models.BatchModel[] }): Promise> { + var path = this.buildUrl({ + url: `/api/v2/companies/${companyId}/batches`, + parameters: {} + }); + var strClientId = + this.appNM + + '; ' + + this.appVer + + '; JavascriptSdk; ' + this.apiVersion + '; ' + + this.machineNM; return this.restCall({ url: path, verb: 'post', payload: model, clientId: strClientId }, Array); - } - - /** - * Create a new transaction batch + } + + /** + * 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 @@ -1161,31 +1177,31 @@ export default class AvaTaxClient { * * ### Security Policies * - * * This API requires one of the following user roles: AccountAdmin, AccountOperator, BatchServiceAdmin, CompanyAdmin, CSPTester, SSTAdmin, SystemAdmin, SystemOperator, TechnicalSupportAdmin. - * Swagger Name: AvaTaxClient - * + * * This API requires one of the following user roles: AccountAdmin, AccountOperator, BatchServiceAdmin, CompanyAdmin, CSPTester, SSTAdmin, SystemAdmin, SystemOperator, TechnicalSupportAdmin. + * Swagger Name: AvaTaxClient + * * * @param {number} companyId The ID of the company that owns this batch. - * @param {Models.CreateTransactionBatchRequestModel} model The transaction batch you wish to create. - * @return {Models.CreateTransactionBatchResponseModel} - */ - - createTransactionBatch({ companyId, model }: { companyId: number, model: Models.CreateTransactionBatchRequestModel }): Promise { - var path = this.buildUrl({ - url: `/api/v2/companies/${companyId}/batches/transactions`, - parameters: {} - }); - var strClientId = - this.appNM + - '; ' + - this.appVer + - '; JavascriptSdk; ' + this.apiVersion + '; ' + - this.machineNM; + * @param {Models.CreateTransactionBatchRequestModel} model The transaction batch you wish to create. + * @return {Models.CreateTransactionBatchResponseModel} + */ + + createTransactionBatch({ companyId, model }: { companyId: number, model: Models.CreateTransactionBatchRequestModel }): Promise { + var path = this.buildUrl({ + url: `/api/v2/companies/${companyId}/batches/transactions`, + parameters: {} + }); + var strClientId = + this.appNM + + '; ' + + this.appVer + + '; JavascriptSdk; ' + this.apiVersion + '; ' + + this.machineNM; return this.restCall({ url: path, verb: 'post', payload: model, clientId: strClientId }, Models.CreateTransactionBatchResponseModel); - } - - /** - * Delete a single batch + } + + /** + * 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. @@ -1199,61 +1215,61 @@ export default class AvaTaxClient { * * ### Security Policies * - * * This API requires one of the following user roles: BatchServiceAdmin, CSPAdmin, CSPTester, SSTAdmin, SystemAdmin, SystemOperator, TechnicalSupportAdmin. - * Swagger Name: AvaTaxClient - * + * * This API requires one of the following user roles: BatchServiceAdmin, CSPAdmin, CSPTester, SSTAdmin, SystemAdmin, SystemOperator, TechnicalSupportAdmin. + * Swagger Name: AvaTaxClient + * * * @param {number} companyId The ID of the company that owns this batch. - * @param {number} id The ID of the batch to delete. - * @return {Models.ErrorDetail[]} - */ - - deleteBatch({ companyId, id }: { companyId: number, id: number }): Promise> { - var path = this.buildUrl({ - url: `/api/v2/companies/${companyId}/batches/${id}`, - parameters: {} - }); - var strClientId = - this.appNM + - '; ' + - this.appVer + - '; JavascriptSdk; ' + this.apiVersion + '; ' + - this.machineNM; + * @param {number} id The ID of the batch to delete. + * @return {Models.ErrorDetail[]} + */ + + deleteBatch({ companyId, id }: { companyId: number, id: number }): Promise> { + var path = this.buildUrl({ + url: `/api/v2/companies/${companyId}/batches/${id}`, + parameters: {} + }); + var strClientId = + this.appNM + + '; ' + + this.appVer + + '; JavascriptSdk; ' + this.apiVersion + '; ' + + this.machineNM; return this.restCall({ url: path, verb: 'delete', payload: null, clientId: strClientId }, Array); - } - - /** - * Download a single batch file + } + + /** + * 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, BatchServiceAdmin, CompanyAdmin, CompanyUser, CSPAdmin, CSPTester, SiteAdmin, SSTAdmin, SystemAdmin, SystemOperator, TechnicalSupportAdmin, TechnicalSupportUser. - * Swagger Name: AvaTaxClient - * + * * This API requires one of the following user roles: AccountAdmin, AccountOperator, AccountUser, BatchServiceAdmin, CompanyAdmin, CompanyUser, CSPAdmin, CSPTester, SiteAdmin, SSTAdmin, SystemAdmin, SystemOperator, TechnicalSupportAdmin, TechnicalSupportUser. + * Swagger Name: AvaTaxClient + * * * @param {number} companyId The ID of the company that owns this batch * @param {number} batchId The ID of the batch object - * @param {number} id The primary key of this batch file object - * @return {object} - */ - - downloadBatch({ companyId, batchId, id }: { companyId: number, batchId: number, id: number }): Promise { - var path = this.buildUrl({ - url: `/api/v2/companies/${companyId}/batches/${batchId}/files/${id}/attachment`, - parameters: {} - }); - var strClientId = - this.appNM + - '; ' + - this.appVer + - '; JavascriptSdk; ' + this.apiVersion + '; ' + - this.machineNM; + * @param {number} id The primary key of this batch file object + * @return {object} + */ + + downloadBatch({ companyId, batchId, id }: { companyId: number, batchId: number, id: number }): Promise { + var path = this.buildUrl({ + url: `/api/v2/companies/${companyId}/batches/${batchId}/files/${id}/attachment`, + parameters: {} + }); + var strClientId = + this.appNM + + '; ' + + this.appVer + + '; JavascriptSdk; ' + this.apiVersion + '; ' + + this.machineNM; return this.restCall({ url: path, verb: 'get', payload: null, clientId: strClientId }, Object); - } - - /** - * Retrieve a single batch + } + + /** + * 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. * @@ -1272,31 +1288,31 @@ export default class AvaTaxClient { * * ### Security Policies * - * * This API requires one of the following user roles: AccountAdmin, AccountOperator, AccountUser, BatchServiceAdmin, CompanyAdmin, CompanyUser, CSPAdmin, CSPTester, SiteAdmin, SSTAdmin, SystemAdmin, SystemOperator, TechnicalSupportAdmin, TechnicalSupportUser. - * Swagger Name: AvaTaxClient - * + * * This API requires one of the following user roles: AccountAdmin, AccountOperator, AccountUser, BatchServiceAdmin, CompanyAdmin, CompanyUser, CSPAdmin, CSPTester, SiteAdmin, SSTAdmin, SystemAdmin, SystemOperator, TechnicalSupportAdmin, TechnicalSupportUser. + * Swagger Name: AvaTaxClient + * * * @param {number} companyId The ID of the company that owns this batch - * @param {number} id The primary key of this batch - * @return {Models.BatchModel} - */ - - getBatch({ companyId, id }: { companyId: number, id: number }): Promise { - var path = this.buildUrl({ - url: `/api/v2/companies/${companyId}/batches/${id}`, - parameters: {} - }); - var strClientId = - this.appNM + - '; ' + - this.appVer + - '; JavascriptSdk; ' + this.apiVersion + '; ' + - this.machineNM; + * @param {number} id The primary key of this batch + * @return {Models.BatchModel} + */ + + getBatch({ companyId, id }: { companyId: number, id: number }): Promise { + var path = this.buildUrl({ + url: `/api/v2/companies/${companyId}/batches/${id}`, + parameters: {} + }); + var strClientId = + this.appNM + + '; ' + + this.appVer + + '; JavascriptSdk; ' + this.apiVersion + '; ' + + this.machineNM; return this.restCall({ url: path, verb: 'get', payload: null, clientId: strClientId }, Models.BatchModel); - } - - /** - * Retrieve all batches for this company + } + + /** + * 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. @@ -1321,22 +1337,22 @@ export default class AvaTaxClient { * * ### Security Policies * - * * This API requires one of the following user roles: AccountAdmin, AccountOperator, AccountUser, BatchServiceAdmin, CompanyAdmin, CompanyUser, CSPAdmin, CSPTester, SiteAdmin, SSTAdmin, SystemAdmin, SystemOperator, TechnicalSupportAdmin, TechnicalSupportUser. - * Swagger Name: AvaTaxClient - * + * * This API requires one of the following user roles: AccountAdmin, AccountOperator, AccountUser, BatchServiceAdmin, CompanyAdmin, CompanyUser, CSPAdmin, CSPTester, SiteAdmin, SSTAdmin, SystemAdmin, SystemOperator, TechnicalSupportAdmin, TechnicalSupportUser. + * Swagger Name: AvaTaxClient + * * * @param {number} 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 {number} top If nonzero, return no more than this number of results. Used with `$skip` to provide pagination for large datasets. Unless otherwise specified, the maximum number of records that can be returned from an API call is 1,000 records. * @param {number} skip If nonzero, skip this number of results before returning data. Used with `$top` to provide pagination for large datasets. - * @param {string} orderBy A comma separated list of sort statements in the format `(fieldname) [ASC|DESC]`, for example `id ASC`. - * @return {FetchResult} - */ - - listBatchesByCompany({ companyId, filter, include, top, skip, orderBy }: { companyId: number, filter?: string, include?: string, top?: number, skip?: number, orderBy?: string }): Promise> { - var path = this.buildUrl({ - url: `/api/v2/companies/${companyId}/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 }: { companyId: number, filter?: string, include?: string, top?: number, skip?: number, orderBy?: string }): Promise> { + var path = this.buildUrl({ + url: `/api/v2/companies/${companyId}/batches`, parameters: { $filter: filter, $include: include, @@ -1344,18 +1360,18 @@ export default class AvaTaxClient { $skip: skip, $orderBy: orderBy } - }); - var strClientId = - this.appNM + - '; ' + - this.appVer + - '; JavascriptSdk; ' + this.apiVersion + '; ' + - this.machineNM; + }); + var strClientId = + this.appNM + + '; ' + + this.appVer + + '; JavascriptSdk; ' + this.apiVersion + '; ' + + this.machineNM; return this.restCall({ url: path, verb: 'get', payload: null, clientId: strClientId }, FetchResult); - } - - /** - * Retrieve all batches + } + + /** + * 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. @@ -1377,21 +1393,21 @@ export default class AvaTaxClient { * * ### Security Policies * - * * This API requires one of the following user roles: AccountAdmin, AccountOperator, AccountUser, BatchServiceAdmin, CompanyAdmin, CompanyUser, CSPAdmin, CSPTester, SiteAdmin, SSTAdmin, SystemAdmin, SystemOperator, TechnicalSupportAdmin, TechnicalSupportUser. - * Swagger Name: AvaTaxClient - * + * * This API requires one of the following user roles: AccountAdmin, AccountOperator, AccountUser, BatchServiceAdmin, 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 {number} top If nonzero, return no more than this number of results. Used with `$skip` to provide pagination for large datasets. Unless otherwise specified, the maximum number of records that can be returned from an API call is 1,000 records. * @param {number} skip If nonzero, skip this number of results before returning data. Used with `$top` to provide pagination for large datasets. - * @param {string} orderBy A comma separated list of sort statements in the format `(fieldname) [ASC|DESC]`, for example `id ASC`. - * @return {FetchResult} - */ - - queryBatches({ filter, include, top, skip, orderBy }: { filter?: string, include?: string, top?: number, skip?: number, orderBy?: string }): Promise> { - 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 }: { filter?: string, include?: string, top?: number, skip?: number, orderBy?: string }): Promise> { + var path = this.buildUrl({ + url: `/api/v2/batches`, parameters: { $filter: filter, $include: include, @@ -1399,18 +1415,18 @@ export default class AvaTaxClient { $skip: skip, $orderBy: orderBy } - }); - var strClientId = - this.appNM + - '; ' + - this.appVer + - '; JavascriptSdk; ' + this.apiVersion + '; ' + - this.machineNM; + }); + var strClientId = + this.appNM + + '; ' + + this.appVer + + '; JavascriptSdk; ' + this.apiVersion + '; ' + + this.machineNM; return this.restCall({ url: path, verb: 'get', payload: null, clientId: strClientId }, FetchResult); - } - - /** - * Create a CertExpress invitation + } + + /** + * 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 @@ -1430,32 +1446,32 @@ export default class AvaTaxClient { * ### Security Policies * * * This API requires one of the following user roles: AccountAdmin, AccountOperator, AccountUser, BatchServiceAdmin, CompanyAdmin, CompanyUser, CSPTester, SSTAdmin, TechnicalSupportAdmin. - * * This API depends on the following active services:*Required* (all): AvaTaxPro, ECMEssentials, ECMPro, ECMPremium, VEMPro, VEMPremium, ECMProComms, ECMPremiumComms. - * Swagger Name: AvaTaxClient - * + * * This API depends on the following active services:*Required* (all): AvaTaxPro, ECMEssentials, ECMPro, ECMPremium, VEMPro, VEMPremium, ECMProComms, ECMPremiumComms. + * Swagger Name: AvaTaxClient + * * * @param {number} 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 {Models.CreateCertExpressInvitationModel[]} model the requests to send out to customers - * @return {Models.CertExpressInvitationStatusModel[]} - */ - - createCertExpressInvitation({ companyId, customerCode, model }: { companyId: number, customerCode: string, model: Models.CreateCertExpressInvitationModel[] }): Promise> { - var path = this.buildUrl({ - url: `/api/v2/companies/${companyId}/customers/${customerCode}/certexpressinvites`, - parameters: {} - }); - var strClientId = - this.appNM + - '; ' + - this.appVer + - '; JavascriptSdk; ' + this.apiVersion + '; ' + - this.machineNM; + * @param {Models.CreateCertExpressInvitationModel[]} model the requests to send out to customers + * @return {Models.CertExpressInvitationStatusModel[]} + */ + + createCertExpressInvitation({ companyId, customerCode, model }: { companyId: number, customerCode: string, model: Models.CreateCertExpressInvitationModel[] }): Promise> { + var path = this.buildUrl({ + url: `/api/v2/companies/${companyId}/customers/${customerCode}/certexpressinvites`, + parameters: {} + }); + var strClientId = + this.appNM + + '; ' + + this.appVer + + '; JavascriptSdk; ' + this.apiVersion + '; ' + + this.machineNM; return this.restCall({ url: path, verb: 'post', payload: model, clientId: strClientId }, Array); - } - - /** - * Retrieve a single CertExpress invitation + } + + /** + * 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 @@ -1475,35 +1491,35 @@ export default class AvaTaxClient { * ### Security Policies * * * This API requires one of the following user roles: AccountAdmin, AccountOperator, AccountUser, BatchServiceAdmin, CompanyAdmin, CompanyUser, CSPTester, SSTAdmin, TechnicalSupportAdmin, TechnicalSupportUser. - * * This API depends on the following active services:*Required* (all): AvaTaxPro, ECMEssentials, ECMPro, ECMPremium, VEMPro, VEMPremium, ECMProComms, ECMPremiumComms. - * Swagger Name: AvaTaxClient - * + * * This API depends on the following active services:*Required* (all): AvaTaxPro, ECMEssentials, ECMPro, ECMPremium, VEMPro, VEMPremium, ECMProComms, ECMPremiumComms. + * Swagger Name: AvaTaxClient + * * * @param {number} 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 {number} 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 {Models.CertExpressInvitationModel} - */ - - getCertExpressInvitation({ companyId, customerCode, id, include }: { companyId: number, customerCode: string, id: number, include?: string }): Promise { - 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 {Models.CertExpressInvitationModel} + */ + + getCertExpressInvitation({ companyId, customerCode, id, include }: { companyId: number, customerCode: string, id: number, include?: string }): Promise { + var path = this.buildUrl({ + url: `/api/v2/companies/${companyId}/customers/${customerCode}/certexpressinvites/${id}`, parameters: { $include: include } - }); - var strClientId = - this.appNM + - '; ' + - this.appVer + - '; JavascriptSdk; ' + this.apiVersion + '; ' + - this.machineNM; + }); + var strClientId = + this.appNM + + '; ' + + this.appVer + + '; JavascriptSdk; ' + this.apiVersion + '; ' + + this.machineNM; return this.restCall({ url: path, verb: 'get', payload: null, clientId: strClientId }, Models.CertExpressInvitationModel); - } - - /** - * List CertExpress invitations + } + + /** + * 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 @@ -1523,22 +1539,22 @@ export default class AvaTaxClient { * ### Security Policies * * * This API requires one of the following user roles: AccountAdmin, AccountOperator, AccountUser, BatchServiceAdmin, CompanyAdmin, CompanyUser, CSPTester, SSTAdmin, TechnicalSupportAdmin, TechnicalSupportUser. - * * This API depends on the following active services:*Required* (all): AvaTaxPro, ECMEssentials, ECMPro, ECMPremium, VEMPro, VEMPremium, ECMProComms, ECMPremiumComms. - * Swagger Name: AvaTaxClient - * + * * This API depends on the following active services:*Required* (all): AvaTaxPro, ECMEssentials, ECMPro, ECMPremium, VEMPro, VEMPremium, ECMProComms, ECMPremiumComms. + * Swagger Name: AvaTaxClient + * * * @param {number} 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 {number} top If nonzero, return no more than this number of results. Used with `$skip` to provide pagination for large datasets. Unless otherwise specified, the maximum number of records that can be returned from an API call is 1,000 records. * @param {number} skip If nonzero, skip this number of results before returning data. Used with `$top` to provide pagination for large datasets. - * @param {string} orderBy A comma separated list of sort statements in the format `(fieldname) [ASC|DESC]`, for example `id ASC`. - * @return {FetchResult} - */ - - listCertExpressInvitations({ companyId, include, filter, top, skip, orderBy }: { companyId: number, include?: string, filter?: string, top?: number, skip?: number, orderBy?: string }): Promise> { - 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 }: { companyId: number, include?: string, filter?: string, top?: number, skip?: number, orderBy?: string }): Promise> { + var path = this.buildUrl({ + url: `/api/v2/companies/${companyId}/certexpressinvites`, parameters: { $include: include, $filter: filter, @@ -1546,18 +1562,18 @@ export default class AvaTaxClient { $skip: skip, $orderBy: orderBy } - }); - var strClientId = - this.appNM + - '; ' + - this.appVer + - '; JavascriptSdk; ' + this.apiVersion + '; ' + - this.machineNM; + }); + var strClientId = + this.appNM + + '; ' + + this.appVer + + '; JavascriptSdk; ' + this.apiVersion + '; ' + + this.machineNM; return this.restCall({ url: path, verb: 'get', payload: null, clientId: strClientId }, FetchResult); - } - - /** - * Create certificates for this company + } + + /** + * 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 @@ -1583,34 +1599,34 @@ export default class AvaTaxClient { * ### Security Policies * * * This API requires one of the following user roles: AccountAdmin, BatchServiceAdmin, CompanyAdmin, CSPTester, ProStoresOperator, Registrar, SiteAdmin, SSTAdmin, SystemAdmin, TechnicalSupportAdmin. - * * This API depends on the following active services:*Required* (all): AvaTaxPro, ECMEssentials, ECMPro, ECMPremium, VEMPro, VEMPremium, ECMProComms, ECMPremiumComms. - * Swagger Name: AvaTaxClient - * + * * This API depends on the following active services:*Required* (all): AvaTaxPro, ECMEssentials, ECMPro, ECMPremium, VEMPro, VEMPremium, ECMProComms, ECMPremiumComms. + * Swagger Name: AvaTaxClient + * * * @param {number} 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 {Models.CertificateModel[]} model Certificates to be created - * @return {Models.CertificateModel[]} - */ - - createCertificates({ companyId, preValidatedExemptionReason, model }: { companyId: number, preValidatedExemptionReason?: boolean, model: Models.CertificateModel[] }): Promise> { - var path = this.buildUrl({ - url: `/api/v2/companies/${companyId}/certificates`, + * @param {Models.CertificateModel[]} model Certificates to be created + * @return {Models.CertificateModel[]} + */ + + createCertificates({ companyId, preValidatedExemptionReason, model }: { companyId: number, preValidatedExemptionReason?: boolean, model: Models.CertificateModel[] }): Promise> { + var path = this.buildUrl({ + url: `/api/v2/companies/${companyId}/certificates`, parameters: { $preValidatedExemptionReason: preValidatedExemptionReason } - }); - var strClientId = - this.appNM + - '; ' + - this.appVer + - '; JavascriptSdk; ' + this.apiVersion + '; ' + - this.machineNM; + }); + var strClientId = + this.appNM + + '; ' + + this.appVer + + '; JavascriptSdk; ' + this.apiVersion + '; ' + + this.machineNM; return this.restCall({ url: path, verb: 'post', payload: model, clientId: strClientId }, Array); - } - - /** - * Revoke and delete a certificate + } + + /** + * 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 @@ -1628,31 +1644,31 @@ export default class AvaTaxClient { * ### Security Policies * * * This API requires one of the following user roles: AccountAdmin, AccountOperator, AccountUser, BatchServiceAdmin, CompanyAdmin, CompanyUser, CSPTester, SSTAdmin, TechnicalSupportAdmin. - * * This API depends on the following active services:*Required* (all): AvaTaxPro, ECMEssentials, ECMPro, ECMPremium, VEMPro, VEMPremium, ECMProComms, ECMPremiumComms. - * Swagger Name: AvaTaxClient - * + * * This API depends on the following active services:*Required* (all): AvaTaxPro, ECMEssentials, ECMPro, ECMPremium, VEMPro, VEMPremium, ECMProComms, ECMPremiumComms. + * Swagger Name: AvaTaxClient + * * * @param {number} companyId The unique ID number of the company that recorded this certificate - * @param {number} id The unique ID number of this certificate - * @return {Models.ErrorDetail[]} - */ - - deleteCertificate({ companyId, id }: { companyId: number, id: number }): Promise> { - var path = this.buildUrl({ - url: `/api/v2/companies/${companyId}/certificates/${id}`, - parameters: {} - }); - var strClientId = - this.appNM + - '; ' + - this.appVer + - '; JavascriptSdk; ' + this.apiVersion + '; ' + - this.machineNM; + * @param {number} id The unique ID number of this certificate + * @return {Models.ErrorDetail[]} + */ + + deleteCertificate({ companyId, id }: { companyId: number, id: number }): Promise> { + var path = this.buildUrl({ + url: `/api/v2/companies/${companyId}/certificates/${id}`, + parameters: {} + }); + var strClientId = + this.appNM + + '; ' + + this.appVer + + '; JavascriptSdk; ' + this.apiVersion + '; ' + + this.machineNM; return this.restCall({ url: path, verb: 'delete', payload: null, clientId: strClientId }, Array); - } - - /** - * Download an image for this certificate + } + + /** + * 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. @@ -1671,36 +1687,36 @@ export default class AvaTaxClient { * ### Security Policies * * * This API requires one of the following user roles: AccountAdmin, AccountOperator, AccountUser, BatchServiceAdmin, CompanyAdmin, CompanyUser, CSPTester, SSTAdmin, TechnicalSupportAdmin, TechnicalSupportUser. - * * This API depends on the following active services:*Required* (all): AvaTaxPro, ECMEssentials, ECMPro, ECMPremium, VEMPro, VEMPremium, ECMProComms, ECMPremiumComms. - * Swagger Name: AvaTaxClient - * + * * This API depends on the following active services:*Required* (all): AvaTaxPro, ECMEssentials, ECMPro, ECMPremium, VEMPro, VEMPremium, ECMProComms, ECMPremiumComms. + * Swagger Name: AvaTaxClient + * * * @param {number} companyId The unique ID number of the company that recorded this certificate * @param {number} id The unique ID number of this certificate * @param {number} page If you choose `$type`=`Jpeg`, you must specify which page number to retrieve. - * @param {Enums.CertificatePreviewType} 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 }: { companyId: number, id: number, page?: number, type?: Enums.CertificatePreviewType }): Promise { - var path = this.buildUrl({ - url: `/api/v2/companies/${companyId}/certificates/${id}/attachment`, + * @param {Enums.CertificatePreviewType} 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 }: { companyId: number, id: number, page?: number, type?: Enums.CertificatePreviewType }): Promise { + var path = this.buildUrl({ + url: `/api/v2/companies/${companyId}/certificates/${id}/attachment`, parameters: { $page: page, $type: type } - }); - var strClientId = - this.appNM + - '; ' + - this.appVer + - '; JavascriptSdk; ' + this.apiVersion + '; ' + - this.machineNM; + }); + var strClientId = + this.appNM + + '; ' + + this.appVer + + '; JavascriptSdk; ' + this.apiVersion + '; ' + + this.machineNM; return this.restCall({ url: path, verb: 'get', payload: null, clientId: strClientId }, Object); - } - - /** - * Retrieve a single certificate + } + + /** + * 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 @@ -1713,6 +1729,11 @@ export default class AvaTaxClient { * * 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. + * * histories - Retrieves the certificate update history + * * jobs - Retrieves the jobs for this certificate + * * logs - Retrieves the certificate log + * * invalid_reasons - Retrieves invalid reasons for this certificate if the certificate is invalid + * * custom_fields - Retrieves custom fields set for this certificate * * Before you can use any exemption certificates endpoints, you must set up your company for exemption certificate data storage. * Companies that do not have this storage system set up will see `CertCaptureNotConfiguredError` when they call exemption @@ -1722,34 +1743,34 @@ export default class AvaTaxClient { * ### Security Policies * * * This API requires one of the following user roles: AccountAdmin, AccountOperator, AccountUser, BatchServiceAdmin, CompanyAdmin, CompanyUser, CSPTester, SSTAdmin, TechnicalSupportAdmin, TechnicalSupportUser. - * * This API depends on the following active services:*Required* (all): AvaTaxPro, ECMEssentials, ECMPro, ECMPremium, VEMPro, VEMPremium, ECMProComms, ECMPremiumComms. - * Swagger Name: AvaTaxClient - * + * * This API depends on the following active services:*Required* (all): AvaTaxPro, ECMEssentials, ECMPro, ECMPremium, VEMPro, VEMPremium, ECMProComms, ECMPremiumComms. + * Swagger Name: AvaTaxClient + * * * @param {number} companyId The ID number of the company that recorded this certificate * @param {number} 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 {Models.CertificateModel} - */ - - getCertificate({ companyId, id, include }: { companyId: number, id: number, include?: string }): Promise { - 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. * histories - Retrieves the certificate update history * jobs - Retrieves the jobs for this certificate * logs - Retrieves the certificate log * invalid_reasons - Retrieves invalid reasons for this certificate if the certificate is invalid * custom_fields - Retrieves custom fields set for this certificate + * @return {Models.CertificateModel} + */ + + getCertificate({ companyId, id, include }: { companyId: number, id: number, include?: string }): Promise { + var path = this.buildUrl({ + url: `/api/v2/companies/${companyId}/certificates/${id}`, parameters: { $include: include } - }); - var strClientId = - this.appNM + - '; ' + - this.appVer + - '; JavascriptSdk; ' + this.apiVersion + '; ' + - this.machineNM; + }); + var strClientId = + this.appNM + + '; ' + + this.appVer + + '; JavascriptSdk; ' + this.apiVersion + '; ' + + this.machineNM; return this.restCall({ url: path, verb: 'get', payload: null, clientId: strClientId }, Models.CertificateModel); - } - - /** - * Check a company's exemption certificate status. + } + + /** + * 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 @@ -1761,30 +1782,30 @@ export default class AvaTaxClient { * ### Security Policies * * * This API requires one of the following user roles: AccountAdmin, AccountOperator, AccountUser, BatchServiceAdmin, CompanyAdmin, CompanyUser, CSPTester, SSTAdmin, TechnicalSupportAdmin, TechnicalSupportUser. - * * This API depends on the following active services:*Required* (all): AvaTaxPro, ECMEssentials, ECMPro, ECMPremium, VEMPro, VEMPremium, ECMProComms, ECMPremiumComms. - * Swagger Name: AvaTaxClient - * - * - * @param {number} companyId The company ID to check - * @return {Models.ProvisionStatusModel} - */ - - getCertificateSetup({ companyId }: { companyId: number }): Promise { - var path = this.buildUrl({ - url: `/api/v2/companies/${companyId}/certificates/setup`, - parameters: {} - }); - var strClientId = - this.appNM + - '; ' + - this.appVer + - '; JavascriptSdk; ' + this.apiVersion + '; ' + - this.machineNM; + * * This API depends on the following active services:*Required* (all): AvaTaxPro, ECMEssentials, ECMPro, ECMPremium, VEMPro, VEMPremium, ECMProComms, ECMPremiumComms. + * Swagger Name: AvaTaxClient + * + * + * @param {number} companyId The company ID to check + * @return {Models.ProvisionStatusModel} + */ + + getCertificateSetup({ companyId }: { companyId: number }): Promise { + var path = this.buildUrl({ + url: `/api/v2/companies/${companyId}/certificates/setup`, + parameters: {} + }); + var strClientId = + this.appNM + + '; ' + + this.appVer + + '; JavascriptSdk; ' + this.apiVersion + '; ' + + this.machineNM; return this.restCall({ url: path, verb: 'get', payload: null, clientId: strClientId }, Models.ProvisionStatusModel); - } - - /** - * Link attributes to a certificate + } + + /** + * 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 @@ -1803,32 +1824,32 @@ export default class AvaTaxClient { * ### Security Policies * * * This API requires one of the following user roles: AccountAdmin, AccountOperator, AccountUser, BatchServiceAdmin, CompanyAdmin, CompanyUser, CSPTester, SSTAdmin, TechnicalSupportAdmin. - * * This API depends on the following active services:*Required* (all): AvaTaxPro, ECMEssentials, ECMPro, ECMPremium, VEMPro, VEMPremium, ECMProComms, ECMPremiumComms. - * Swagger Name: AvaTaxClient - * + * * This API depends on the following active services:*Required* (all): AvaTaxPro, ECMEssentials, ECMPro, ECMPremium, VEMPro, VEMPremium, ECMProComms, ECMPremiumComms. + * Swagger Name: AvaTaxClient + * * * @param {number} companyId The unique ID number of the company that recorded this certificate * @param {number} id The unique ID number of this certificate - * @param {Models.CertificateAttributeModel[]} model The list of attributes to link to this certificate. - * @return {FetchResult} - */ - - linkAttributesToCertificate({ companyId, id, model }: { companyId: number, id: number, model: Models.CertificateAttributeModel[] }): Promise> { - var path = this.buildUrl({ - url: `/api/v2/companies/${companyId}/certificates/${id}/attributes/link`, - parameters: {} - }); - var strClientId = - this.appNM + - '; ' + - this.appVer + - '; JavascriptSdk; ' + this.apiVersion + '; ' + - this.machineNM; + * @param {Models.CertificateAttributeModel[]} model The list of attributes to link to this certificate. + * @return {FetchResult} + */ + + linkAttributesToCertificate({ companyId, id, model }: { companyId: number, id: number, model: Models.CertificateAttributeModel[] }): Promise> { + var path = this.buildUrl({ + url: `/api/v2/companies/${companyId}/certificates/${id}/attributes/link`, + parameters: {} + }); + var strClientId = + this.appNM + + '; ' + + this.appVer + + '; JavascriptSdk; ' + this.apiVersion + '; ' + + this.machineNM; return this.restCall({ url: path, verb: 'post', payload: model, clientId: strClientId }, FetchResult); - } - - /** - * Link customers to a certificate + } + + /** + * 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 @@ -1848,32 +1869,32 @@ export default class AvaTaxClient { * ### Security Policies * * * This API requires one of the following user roles: AccountAdmin, AccountOperator, AccountUser, BatchServiceAdmin, CompanyAdmin, CompanyUser, CSPTester, SSTAdmin, TechnicalSupportAdmin. - * * This API depends on the following active services:*Required* (all): AvaTaxPro, ECMEssentials, ECMPro, ECMPremium, VEMPro, VEMPremium, ECMProComms, ECMPremiumComms. - * Swagger Name: AvaTaxClient - * + * * This API depends on the following active services:*Required* (all): AvaTaxPro, ECMEssentials, ECMPro, ECMPremium, VEMPro, VEMPremium, ECMProComms, ECMPremiumComms. + * Swagger Name: AvaTaxClient + * * * @param {number} companyId The unique ID number of the company that recorded this certificate * @param {number} id The unique ID number of this certificate - * @param {Models.LinkCustomersModel} model The list of customers needed be added to the Certificate for exemption - * @return {FetchResult} - */ - - linkCustomersToCertificate({ companyId, id, model }: { companyId: number, id: number, model: Models.LinkCustomersModel }): Promise> { - var path = this.buildUrl({ - url: `/api/v2/companies/${companyId}/certificates/${id}/customers/link`, - parameters: {} - }); - var strClientId = - this.appNM + - '; ' + - this.appVer + - '; JavascriptSdk; ' + this.apiVersion + '; ' + - this.machineNM; + * @param {Models.LinkCustomersModel} model The list of customers needed be added to the Certificate for exemption + * @return {FetchResult} + */ + + linkCustomersToCertificate({ companyId, id, model }: { companyId: number, id: number, model: Models.LinkCustomersModel }): Promise> { + var path = this.buildUrl({ + url: `/api/v2/companies/${companyId}/certificates/${id}/customers/link`, + parameters: {} + }); + var strClientId = + this.appNM + + '; ' + + this.appVer + + '; JavascriptSdk; ' + this.apiVersion + '; ' + + this.machineNM; return this.restCall({ url: path, verb: 'post', payload: model, clientId: strClientId }, FetchResult); - } - - /** - * List all attributes applied to this certificate + } + + /** + * 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 @@ -1892,31 +1913,31 @@ export default class AvaTaxClient { * ### Security Policies * * * This API requires one of the following user roles: AccountAdmin, AccountOperator, AccountUser, BatchServiceAdmin, CompanyAdmin, CompanyUser, CSPTester, SSTAdmin, TechnicalSupportAdmin. - * * This API depends on the following active services:*Required* (all): AvaTaxPro, ECMEssentials, ECMPro, ECMPremium, VEMPro, VEMPremium, ECMProComms, ECMPremiumComms. - * Swagger Name: AvaTaxClient - * + * * This API depends on the following active services:*Required* (all): AvaTaxPro, ECMEssentials, ECMPro, ECMPremium, VEMPro, VEMPremium, ECMProComms, ECMPremiumComms. + * Swagger Name: AvaTaxClient + * * * @param {number} companyId The unique ID number of the company that recorded this certificate - * @param {number} id The unique ID number of this certificate - * @return {FetchResult} - */ - - listAttributesForCertificate({ companyId, id }: { companyId: number, id: number }): Promise> { - var path = this.buildUrl({ - url: `/api/v2/companies/${companyId}/certificates/${id}/attributes`, - parameters: {} - }); - var strClientId = - this.appNM + - '; ' + - this.appVer + - '; JavascriptSdk; ' + this.apiVersion + '; ' + - this.machineNM; + * @param {number} id The unique ID number of this certificate + * @return {FetchResult} + */ + + listAttributesForCertificate({ companyId, id }: { companyId: number, id: number }): Promise> { + var path = this.buildUrl({ + url: `/api/v2/companies/${companyId}/certificates/${id}/attributes`, + parameters: {} + }); + var strClientId = + this.appNM + + '; ' + + this.appVer + + '; JavascriptSdk; ' + this.apiVersion + '; ' + + this.machineNM; return this.restCall({ url: path, verb: 'get', payload: null, clientId: strClientId }, FetchResult); - } - - /** - * List customers linked to this certificate + } + + /** + * 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 @@ -1935,34 +1956,34 @@ export default class AvaTaxClient { * ### Security Policies * * * This API requires one of the following user roles: AccountAdmin, AccountOperator, AccountUser, BatchServiceAdmin, CompanyAdmin, CompanyUser, CSPTester, SSTAdmin, TechnicalSupportAdmin. - * * This API depends on the following active services:*Required* (all): AvaTaxPro, ECMEssentials, ECMPro, ECMPremium, VEMPro, VEMPremium, ECMProComms, ECMPremiumComms. - * Swagger Name: AvaTaxClient - * + * * This API depends on the following active services:*Required* (all): AvaTaxPro, ECMEssentials, ECMPro, ECMPremium, VEMPro, VEMPremium, ECMProComms, ECMPremiumComms. + * Swagger Name: AvaTaxClient + * * * @param {number} companyId The unique ID number of the company that recorded this certificate * @param {number} 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 }: { companyId: number, id: number, include?: string }): Promise> { - 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 }: { companyId: number, id: number, include?: string }): Promise> { + var path = this.buildUrl({ + url: `/api/v2/companies/${companyId}/certificates/${id}/customers`, parameters: { $include: include } - }); - var strClientId = - this.appNM + - '; ' + - this.appVer + - '; JavascriptSdk; ' + this.apiVersion + '; ' + - this.machineNM; + }); + var strClientId = + this.appNM + + '; ' + + this.appVer + + '; JavascriptSdk; ' + this.apiVersion + '; ' + + this.machineNM; return this.restCall({ url: path, verb: 'get', payload: null, clientId: strClientId }, FetchResult); - } - - /** - * List all certificates for a company + } + + /** + * 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 @@ -1975,7 +1996,12 @@ export default class AvaTaxClient { * * 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. - * + * * histories - Retrieves the certificate update history + * * jobs - Retrieves the jobs for this certificate + * * logs - Retrieves the certificate log + * * invalid_reasons - Retrieves invalid reasons for this certificate if the certificate is invalid + * * custom_fields - Retrieves custom fields set for this certificate + * * Before you can use any exemption certificates endpoints, you must set up your company for exemption certificate data storage. * Companies that do not have this storage system set up will see `CertCaptureNotConfiguredError` when they call exemption * certificate related APIs. To check if this is set up for a company, call `GetCertificateSetup`. To request setup of exemption @@ -1984,22 +2010,22 @@ export default class AvaTaxClient { * ### Security Policies * * * This API requires one of the following user roles: AccountAdmin, AccountOperator, AccountUser, BatchServiceAdmin, CompanyAdmin, CompanyUser, CSPTester, SSTAdmin, TechnicalSupportAdmin, TechnicalSupportUser. - * * This API depends on the following active services:*Required* (all): AvaTaxPro, ECMEssentials, ECMPro, ECMPremium, VEMPro, VEMPremium, ECMProComms, ECMPremiumComms. - * Swagger Name: AvaTaxClient - * + * * This API depends on the following active services:*Required* (all): AvaTaxPro, ECMEssentials, ECMPro, ECMPremium, VEMPro, VEMPremium, ECMProComms, ECMPremiumComms. + * Swagger Name: AvaTaxClient + * * * @param {number} 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} 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. * histories - Retrieves the certificate update history * jobs - Retrieves the jobs for this certificate * logs - Retrieves the certificate log * invalid_reasons - Retrieves invalid reasons for this certificate if the certificate is invalid * custom_fields - Retrieves custom fields set for this 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, ecmStatus, ecmsId, ecmsStatus, pdf, pages * @param {number} top If nonzero, return no more than this number of results. Used with `$skip` to provide pagination for large datasets. Unless otherwise specified, the maximum number of records that can be returned from an API call is 1,000 records. * @param {number} skip If nonzero, skip this number of results before returning data. Used with `$top` to provide pagination for large datasets. - * @param {string} orderBy A comma separated list of sort statements in the format `(fieldname) [ASC|DESC]`, for example `id ASC`. - * @return {FetchResult} - */ - - queryCertificates({ companyId, include, filter, top, skip, orderBy }: { companyId: number, include?: string, filter?: string, top?: number, skip?: number, orderBy?: string }): Promise> { - 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 }: { companyId: number, include?: string, filter?: string, top?: number, skip?: number, orderBy?: string }): Promise> { + var path = this.buildUrl({ + url: `/api/v2/companies/${companyId}/certificates`, parameters: { $include: include, $filter: filter, @@ -2007,18 +2033,18 @@ export default class AvaTaxClient { $skip: skip, $orderBy: orderBy } - }); - var strClientId = - this.appNM + - '; ' + - this.appVer + - '; JavascriptSdk; ' + this.apiVersion + '; ' + - this.machineNM; + }); + var strClientId = + this.appNM + + '; ' + + this.appVer + + '; JavascriptSdk; ' + this.apiVersion + '; ' + + this.machineNM; return this.restCall({ url: path, verb: 'get', payload: null, clientId: strClientId }, FetchResult); - } - - /** - * Request setup of exemption certificates for this company. + } + + /** + * 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 @@ -2032,30 +2058,30 @@ export default class AvaTaxClient { * ### Security Policies * * * This API requires one of the following user roles: AccountAdmin, AccountOperator, AccountUser, BatchServiceAdmin, CompanyAdmin, CompanyUser, CSPTester, SSTAdmin, TechnicalSupportAdmin, TechnicalSupportUser. - * * This API depends on the following active services:*Required* (all): AvaTaxPro, ECMEssentials, ECMPro, ECMPremium, VEMPro, VEMPremium, ECMProComms, ECMPremiumComms. - * Swagger Name: AvaTaxClient - * - * - * @param {number} companyId - * @return {Models.ProvisionStatusModel} - */ - - requestCertificateSetup({ companyId }: { companyId: number }): Promise { - var path = this.buildUrl({ - url: `/api/v2/companies/${companyId}/certificates/setup`, - parameters: {} - }); - var strClientId = - this.appNM + - '; ' + - this.appVer + - '; JavascriptSdk; ' + this.apiVersion + '; ' + - this.machineNM; + * * This API depends on the following active services:*Required* (all): AvaTaxPro, ECMEssentials, ECMPro, ECMPremium, VEMPro, VEMPremium, ECMProComms, ECMPremiumComms. + * Swagger Name: AvaTaxClient + * + * + * @param {number} companyId + * @return {Models.ProvisionStatusModel} + */ + + requestCertificateSetup({ companyId }: { companyId: number }): Promise { + var path = this.buildUrl({ + url: `/api/v2/companies/${companyId}/certificates/setup`, + parameters: {} + }); + var strClientId = + this.appNM + + '; ' + + this.appVer + + '; JavascriptSdk; ' + this.apiVersion + '; ' + + this.machineNM; return this.restCall({ url: path, verb: 'post', payload: null, clientId: strClientId }, Models.ProvisionStatusModel); - } - - /** - * Unlink attributes from a certificate + } + + /** + * 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 @@ -2074,32 +2100,32 @@ export default class AvaTaxClient { * ### Security Policies * * * This API requires one of the following user roles: AccountAdmin, AccountOperator, AccountUser, BatchServiceAdmin, CompanyAdmin, CompanyUser, CSPTester, SSTAdmin, TechnicalSupportAdmin. - * * This API depends on the following active services:*Required* (all): AvaTaxPro, ECMEssentials, ECMPro, ECMPremium, VEMPro, VEMPremium, ECMProComms, ECMPremiumComms. - * Swagger Name: AvaTaxClient - * + * * This API depends on the following active services:*Required* (all): AvaTaxPro, ECMEssentials, ECMPro, ECMPremium, VEMPro, VEMPremium, ECMProComms, ECMPremiumComms. + * Swagger Name: AvaTaxClient + * * * @param {number} companyId The unique ID number of the company that recorded this certificate * @param {number} id The unique ID number of this certificate - * @param {Models.CertificateAttributeModel[]} model The list of attributes to unlink from this certificate. - * @return {FetchResult} - */ - - unlinkAttributesFromCertificate({ companyId, id, model }: { companyId: number, id: number, model: Models.CertificateAttributeModel[] }): Promise> { - var path = this.buildUrl({ - url: `/api/v2/companies/${companyId}/certificates/${id}/attributes/unlink`, - parameters: {} - }); - var strClientId = - this.appNM + - '; ' + - this.appVer + - '; JavascriptSdk; ' + this.apiVersion + '; ' + - this.machineNM; + * @param {Models.CertificateAttributeModel[]} model The list of attributes to unlink from this certificate. + * @return {FetchResult} + */ + + unlinkAttributesFromCertificate({ companyId, id, model }: { companyId: number, id: number, model: Models.CertificateAttributeModel[] }): Promise> { + var path = this.buildUrl({ + url: `/api/v2/companies/${companyId}/certificates/${id}/attributes/unlink`, + parameters: {} + }); + var strClientId = + this.appNM + + '; ' + + this.appVer + + '; JavascriptSdk; ' + this.apiVersion + '; ' + + this.machineNM; return this.restCall({ url: path, verb: 'post', payload: model, clientId: strClientId }, FetchResult); - } - - /** - * Unlink customers from a certificate + } + + /** + * 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 @@ -2120,32 +2146,32 @@ export default class AvaTaxClient { * ### Security Policies * * * This API requires one of the following user roles: AccountAdmin, AccountOperator, AccountUser, BatchServiceAdmin, CompanyAdmin, CompanyUser, CSPTester, SSTAdmin, TechnicalSupportAdmin. - * * This API depends on the following active services:*Required* (all): AvaTaxPro, ECMEssentials, ECMPro, ECMPremium, VEMPro, VEMPremium, ECMProComms, ECMPremiumComms. - * Swagger Name: AvaTaxClient - * + * * This API depends on the following active services:*Required* (all): AvaTaxPro, ECMEssentials, ECMPro, ECMPremium, VEMPro, VEMPremium, ECMProComms, ECMPremiumComms. + * Swagger Name: AvaTaxClient + * * * @param {number} companyId The unique ID number of the company that recorded this certificate * @param {number} id The unique ID number of this certificate - * @param {Models.LinkCustomersModel} model The list of customers to unlink from this certificate - * @return {FetchResult} - */ - - unlinkCustomersFromCertificate({ companyId, id, model }: { companyId: number, id: number, model: Models.LinkCustomersModel }): Promise> { - var path = this.buildUrl({ - url: `/api/v2/companies/${companyId}/certificates/${id}/customers/unlink`, - parameters: {} - }); - var strClientId = - this.appNM + - '; ' + - this.appVer + - '; JavascriptSdk; ' + this.apiVersion + '; ' + - this.machineNM; + * @param {Models.LinkCustomersModel} model The list of customers to unlink from this certificate + * @return {FetchResult} + */ + + unlinkCustomersFromCertificate({ companyId, id, model }: { companyId: number, id: number, model: Models.LinkCustomersModel }): Promise> { + var path = this.buildUrl({ + url: `/api/v2/companies/${companyId}/certificates/${id}/customers/unlink`, + parameters: {} + }); + var strClientId = + this.appNM + + '; ' + + this.appVer + + '; JavascriptSdk; ' + this.apiVersion + '; ' + + this.machineNM; return this.restCall({ url: path, verb: 'post', payload: model, clientId: strClientId }, FetchResult); - } - - /** - * Update a single certificate + } + + /** + * 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 @@ -2161,32 +2187,32 @@ export default class AvaTaxClient { * ### Security Policies * * * This API requires one of the following user roles: AccountAdmin, AccountOperator, AccountUser, BatchServiceAdmin, CompanyAdmin, CompanyUser, CSPTester, SSTAdmin, TechnicalSupportAdmin. - * * This API depends on the following active services:*Required* (all): AvaTaxPro, ECMEssentials, ECMPro, ECMPremium, VEMPro, VEMPremium, ECMProComms, ECMPremiumComms. - * Swagger Name: AvaTaxClient - * + * * This API depends on the following active services:*Required* (all): AvaTaxPro, ECMEssentials, ECMPro, ECMPremium, VEMPro, VEMPremium, ECMProComms, ECMPremiumComms. + * Swagger Name: AvaTaxClient + * * * @param {number} companyId The ID number of the company that recorded this certificate * @param {number} id The unique ID number of this certificate - * @param {Models.CertificateModel} model The new certificate object that will replace the existing one - * @return {Models.CertificateModel} - */ - - updateCertificate({ companyId, id, model }: { companyId: number, id: number, model: Models.CertificateModel }): Promise { - var path = this.buildUrl({ - url: `/api/v2/companies/${companyId}/certificates/${id}`, - parameters: {} - }); - var strClientId = - this.appNM + - '; ' + - this.appVer + - '; JavascriptSdk; ' + this.apiVersion + '; ' + - this.machineNM; + * @param {Models.CertificateModel} model The new certificate object that will replace the existing one + * @return {Models.CertificateModel} + */ + + updateCertificate({ companyId, id, model }: { companyId: number, id: number, model: Models.CertificateModel }): Promise { + var path = this.buildUrl({ + url: `/api/v2/companies/${companyId}/certificates/${id}`, + parameters: {} + }); + var strClientId = + this.appNM + + '; ' + + this.appVer + + '; JavascriptSdk; ' + this.apiVersion + '; ' + + this.machineNM; return this.restCall({ url: path, verb: 'put', payload: model, clientId: strClientId }, Models.CertificateModel); - } - - /** - * Upload an image or PDF attachment for this certificate + } + + /** + * 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 @@ -2205,32 +2231,102 @@ export default class AvaTaxClient { * ### Security Policies * * * This API requires one of the following user roles: AccountAdmin, AccountOperator, AccountUser, BatchServiceAdmin, CompanyAdmin, CompanyUser, CSPTester, SSTAdmin, TechnicalSupportAdmin, TechnicalSupportUser. - * * This API depends on the following active services:*Required* (all): AvaTaxPro, ECMEssentials, ECMPro, ECMPremium, VEMPro, VEMPremium, ECMProComms, ECMPremiumComms. - * Swagger Name: AvaTaxClient - * + * * This API depends on the following active services:*Required* (all): AvaTaxPro, ECMEssentials, ECMPro, ECMPremium, VEMPro, VEMPremium, ECMProComms, ECMPremiumComms. + * Swagger Name: AvaTaxClient + * * * @param {number} companyId The unique ID number of the company that recorded this certificate * @param {number} id The unique ID number of this certificate - * @param {ReadStream} file The exemption certificate file you wanted to upload. Accepted formats are: PDF, JPEG, TIFF, PNG. - * @return {string} - */ - - uploadCertificateImage({ companyId, id, file }: { companyId: number, id: number, file: ReadStream }): Promise { - var path = this.buildUrl({ - url: `/api/v2/companies/${companyId}/certificates/${id}/attachment`, - parameters: {} - }); - var strClientId = - this.appNM + - '; ' + - this.appVer + - '; JavascriptSdk; ' + this.apiVersion + '; ' + - this.machineNM; + * @param {ReadStream} file The exemption certificate file you wanted to upload. Accepted formats are: PDF, JPEG, TIFF, PNG. + * @return {string} + */ + + uploadCertificateImage({ companyId, id, file }: { companyId: number, id: number, file: ReadStream }): Promise { + var path = this.buildUrl({ + url: `/api/v2/companies/${companyId}/certificates/${id}/attachment`, + parameters: {} + }); + var strClientId = + this.appNM + + '; ' + + this.appVer + + '; JavascriptSdk; ' + this.apiVersion + '; ' + + this.machineNM; return this.restCall({ url: path, verb: 'post', payload: file, clientId: strClientId, isMultiPart: true }, String); - } - - /** - * Checks whether the integration being used to set up this company and run transactions onto this company is compliant to all requirements. + } + + /** + * Retrieve a single communication certificate. + * ### Security Policies + * + * * This API depends on the following active services:*Required* (all): ECMPremiumComms, ECMProComms. + * Swagger Name: AvaTaxClient + * + * + * @param {number} companyId The ID number of the company to search + * @param {number} certificateId The ID number of the certifificate to search + * @return {Models.CommunicationCertificateResponse} + */ + + getCommunicationCertificate({ companyId, certificateId }: { companyId: number, certificateId: number }): Promise { + var path = this.buildUrl({ + url: `/companies/${companyId}/communication-certificates/${certificateId}`, + parameters: {} + }); + var strClientId = + this.appNM + + '; ' + + this.appVer + + '; JavascriptSdk; ' + this.apiVersion + '; ' + + this.machineNM; + return this.restCall({ url: path, verb: 'get', payload: null, clientId: strClientId }, Models.CommunicationCertificateResponse); + } + + /** + * Retrieve all communication certificates. + * 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. + * + * 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. + * For more information about filtering in REST, please see the documentation at http://developer.avalara.com/avatax/filtering-in-rest/ . + * + * ### Security Policies + * + * * This API depends on the following active services:*Required* (all): ECMPremiumComms, ECMProComms. + * 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, ExpirationDate, TaxNumber, Exemptions + * @param {number} top If nonzero, return no more than this number of results. Used with `$skip` to provide pagination for large datasets. Unless otherwise specified, the maximum number of records that can be returned from an API call is 1,000 records. + * @param {number} skip If nonzero, skip this number of results before returning data. Used with `$top` to provide pagination for large datasets. + * @param {string} orderBy A comma separated list of sort statements in the format `(fieldname) [ASC|DESC]`, for example `id ASC`. + * @param {number} companyId The ID number of the company to search + * @return {Models.CommunicationCertificateResponsePage} + */ + + listCommunicationCertificates({ filter, top, skip, orderBy, companyId }: { filter?: string, top?: number, skip?: number, orderBy?: string, companyId: number }): Promise { + var path = this.buildUrl({ + url: `/companies/${companyId}/communication-certificates`, + parameters: { + $filter: filter, + $top: top, + $skip: skip, + $orderBy: orderBy + } + }); + var strClientId = + this.appNM + + '; ' + + this.appVer + + '; JavascriptSdk; ' + this.apiVersion + '; ' + + this.machineNM; + return this.restCall({ url: path, verb: 'get', payload: null, clientId: strClientId }, Models.CommunicationCertificateResponsePage); + } + + /** + * 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. @@ -2257,30 +2353,30 @@ export default class AvaTaxClient { * * ### Security Policies * - * * This API requires one of the following user roles: AccountAdmin, AccountOperator, AccountUser, BatchServiceAdmin, CompanyAdmin, CompanyUser, Compliance Root User, ComplianceAdmin, ComplianceUser, CSPAdmin, CSPTester, ECMAccountUser, ECMCompanyUser, FirmAdmin, FirmUser, ProStoresOperator, Registrar, SiteAdmin, SSTAdmin, SystemAdmin, TechnicalSupportAdmin, TechnicalSupportUser, TreasuryAdmin, TreasuryUser. - * Swagger Name: AvaTaxClient - * - * - * @param {number} id The ID of the company to check if its integration is certified. - * @return {string} - */ - - certifyIntegration({ id }: { id: number }): Promise { - var path = this.buildUrl({ - url: `/api/v2/companies/${id}/certify`, - parameters: {} - }); - var strClientId = - this.appNM + - '; ' + - this.appVer + - '; JavascriptSdk; ' + this.apiVersion + '; ' + - this.machineNM; + * * This API requires one of the following user roles: AccountAdmin, AccountOperator, AccountUser, BatchServiceAdmin, CompanyAdmin, CompanyUser, Compliance Root User, ComplianceAdmin, ComplianceUser, CSPAdmin, CSPTester, ECMAccountUser, ECMCompanyUser, FirmAdmin, FirmUser, ProStoresOperator, Registrar, SiteAdmin, SSTAdmin, SystemAdmin, TechnicalSupportAdmin, TechnicalSupportUser, TreasuryAdmin, TreasuryUser. + * Swagger Name: AvaTaxClient + * + * + * @param {number} id The ID of the company to check if its integration is certified. + * @return {string} + */ + + certifyIntegration({ id }: { id: number }): Promise { + var path = this.buildUrl({ + url: `/api/v2/companies/${id}/certify`, + parameters: {} + }); + var strClientId = + this.appNM + + '; ' + + this.appVer + + '; JavascriptSdk; ' + this.apiVersion + '; ' + + this.machineNM; return this.restCall({ url: path, verb: 'get', payload: null, clientId: strClientId }, String); - } - - /** - * Change the filing status of this company + } + + /** + * 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 @@ -2297,31 +2393,31 @@ export default class AvaTaxClient { * * ### Security Policies * - * * This API requires one of the following user roles: AccountAdmin, AccountOperator, AccountUser, BatchServiceAdmin, CompanyAdmin, CompanyUser, Compliance Root User, ComplianceAdmin, ComplianceUser, CSPAdmin, CSPTester, ECMAccountUser, ECMCompanyUser, FirmAdmin, FirmUser, ProStoresOperator, Registrar, SiteAdmin, SSTAdmin, SystemAdmin, TechnicalSupportAdmin, TechnicalSupportUser, TreasuryAdmin, TreasuryUser. - * Swagger Name: AvaTaxClient - * + * * This API requires one of the following user roles: AccountAdmin, AccountOperator, AccountUser, BatchServiceAdmin, CompanyAdmin, CompanyUser, Compliance Root User, ComplianceAdmin, ComplianceUser, CSPAdmin, CSPTester, ECMAccountUser, ECMCompanyUser, FirmAdmin, FirmUser, ProStoresOperator, Registrar, SiteAdmin, SSTAdmin, SystemAdmin, TechnicalSupportAdmin, TechnicalSupportUser, TreasuryAdmin, TreasuryUser. + * Swagger Name: AvaTaxClient + * * * @param {number} id - * @param {Models.FilingStatusChangeModel} model - * @return {string} - */ - - changeFilingStatus({ id, model }: { id: number, model: Models.FilingStatusChangeModel }): Promise { - var path = this.buildUrl({ - url: `/api/v2/companies/${id}/filingstatus`, - parameters: {} - }); - var strClientId = - this.appNM + - '; ' + - this.appVer + - '; JavascriptSdk; ' + this.apiVersion + '; ' + - this.machineNM; + * @param {Models.FilingStatusChangeModel} model + * @return {string} + */ + + changeFilingStatus({ id, model }: { id: number, model: Models.FilingStatusChangeModel }): Promise { + var path = this.buildUrl({ + url: `/api/v2/companies/${id}/filingstatus`, + parameters: {} + }); + var strClientId = + this.appNM + + '; ' + + this.appVer + + '; JavascriptSdk; ' + this.apiVersion + '; ' + + this.machineNM; return this.restCall({ url: path, verb: 'post', payload: model, clientId: strClientId }, String); - } - - /** - * Quick setup for a company with a single physical address + } + + /** + * 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: * @@ -2337,30 +2433,30 @@ export default class AvaTaxClient { * * ### Security Policies * - * * This API requires one of the following user roles: AccountAdmin, BatchServiceAdmin, CompanyAdmin, CSPTester, FirmAdmin, Registrar, SiteAdmin, SSTAdmin, SystemAdmin, TechnicalSupportAdmin. - * Swagger Name: AvaTaxClient - * - * - * @param {Models.CompanyInitializationModel} model Information about the company you wish to create. - * @return {Models.CompanyModel} - */ - - companyInitialize({ model }: { model: Models.CompanyInitializationModel }): Promise { - var path = this.buildUrl({ - url: `/api/v2/companies/initialize`, - parameters: {} - }); - var strClientId = - this.appNM + - '; ' + - this.appVer + - '; JavascriptSdk; ' + this.apiVersion + '; ' + - this.machineNM; + * * This API requires one of the following user roles: AccountAdmin, BatchServiceAdmin, CompanyAdmin, CSPTester, FirmAdmin, Registrar, SiteAdmin, SSTAdmin, SystemAdmin, TechnicalSupportAdmin. + * Swagger Name: AvaTaxClient + * + * + * @param {Models.CompanyInitializationModel} model Information about the company you wish to create. + * @return {Models.CompanyModel} + */ + + companyInitialize({ model }: { model: Models.CompanyInitializationModel }): Promise { + var path = this.buildUrl({ + url: `/api/v2/companies/initialize`, + parameters: {} + }); + var strClientId = + this.appNM + + '; ' + + this.appVer + + '; JavascriptSdk; ' + this.apiVersion + '; ' + + this.machineNM; return this.restCall({ url: path, verb: 'post', payload: model, clientId: strClientId }, Models.CompanyModel); - } - - /** - * Create new companies + } + + /** + * 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. @@ -2369,30 +2465,30 @@ export default class AvaTaxClient { * * ### Security Policies * - * * This API requires one of the following user roles: AccountAdmin, BatchServiceAdmin, CompanyAdmin, CSPTester, FirmAdmin, Registrar, SiteAdmin, SSTAdmin, SystemAdmin, TechnicalSupportAdmin. - * Swagger Name: AvaTaxClient - * - * - * @param {Models.CompanyModel[]} model Either a single company object or an array of companies to create - * @return {Models.CompanyModel[]} - */ - - createCompanies({ model }: { model: Models.CompanyModel[] }): Promise> { - var path = this.buildUrl({ - url: `/api/v2/companies`, - parameters: {} - }); - var strClientId = - this.appNM + - '; ' + - this.appVer + - '; JavascriptSdk; ' + this.apiVersion + '; ' + - this.machineNM; + * * This API requires one of the following user roles: AccountAdmin, BatchServiceAdmin, CompanyAdmin, CSPTester, FirmAdmin, Registrar, SiteAdmin, SSTAdmin, SystemAdmin, TechnicalSupportAdmin. + * Swagger Name: AvaTaxClient + * + * + * @param {Models.CompanyModel[]} model Either a single company object or an array of companies to create + * @return {Models.CompanyModel[]} + */ + + createCompanies({ model }: { model: Models.CompanyModel[] }): Promise> { + var path = this.buildUrl({ + url: `/api/v2/companies`, + parameters: {} + }); + var strClientId = + this.appNM + + '; ' + + this.appVer + + '; JavascriptSdk; ' + this.apiVersion + '; ' + + this.machineNM; return this.restCall({ url: path, verb: 'post', payload: model, clientId: strClientId }, Array); - } - - /** - * Add parameters to a company. + } + + /** + * 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". @@ -2407,31 +2503,31 @@ export default class AvaTaxClient { * * ### Security Policies * - * * This API requires one of the following user roles: AccountAdmin, BatchServiceAdmin, CompanyAdmin, CSPTester, FirmAdmin, Registrar, SiteAdmin, SSTAdmin, SystemAdmin, TechnicalSupportAdmin. - * Swagger Name: AvaTaxClient - * + * * This API requires one of the following user roles: AccountAdmin, BatchServiceAdmin, CompanyAdmin, CSPTester, FirmAdmin, Registrar, SiteAdmin, SSTAdmin, SystemAdmin, TechnicalSupportAdmin. + * Swagger Name: AvaTaxClient + * * * @param {number} companyId The ID of the company that owns this company parameter. - * @param {Models.CompanyParameterDetailModel[]} model The company parameters you wish to create. - * @return {Models.CompanyParameterDetailModel[]} - */ - - createCompanyParameters({ companyId, model }: { companyId: number, model: Models.CompanyParameterDetailModel[] }): Promise> { - var path = this.buildUrl({ - url: `/api/v2/companies/${companyId}/parameters`, - parameters: {} - }); - var strClientId = - this.appNM + - '; ' + - this.appVer + - '; JavascriptSdk; ' + this.apiVersion + '; ' + - this.machineNM; + * @param {Models.CompanyParameterDetailModel[]} model The company parameters you wish to create. + * @return {Models.CompanyParameterDetailModel[]} + */ + + createCompanyParameters({ companyId, model }: { companyId: number, model: Models.CompanyParameterDetailModel[] }): Promise> { + var path = this.buildUrl({ + url: `/api/v2/companies/${companyId}/parameters`, + parameters: {} + }); + var strClientId = + this.appNM + + '; ' + + this.appVer + + '; JavascriptSdk; ' + this.apiVersion + '; ' + + this.machineNM; return this.restCall({ url: path, verb: 'post', payload: model, clientId: strClientId }, Array); - } - - /** - * Request managed returns funding setup for a company + } + + /** + * 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 @@ -2446,64 +2542,64 @@ 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, BatchServiceAdmin, CompanyAdmin, CompanyUser, Compliance Root User, ComplianceAdmin, ComplianceUser, CSPAdmin, CSPTester, ECMAccountUser, ECMCompanyUser, FirmAdmin, FirmUser, ProStoresOperator, Registrar, SiteAdmin, SSTAdmin, SystemAdmin, TechnicalSupportAdmin, TechnicalSupportUser, TreasuryAdmin, TreasuryUser. - * Swagger Name: AvaTaxClient - * + * * This API requires one of the following user roles: AccountAdmin, AccountOperator, AccountUser, BatchServiceAdmin, CompanyAdmin, CompanyUser, Compliance Root User, ComplianceAdmin, ComplianceUser, CSPAdmin, CSPTester, ECMAccountUser, ECMCompanyUser, FirmAdmin, FirmUser, ProStoresOperator, Registrar, SiteAdmin, SSTAdmin, SystemAdmin, TechnicalSupportAdmin, TechnicalSupportUser, TreasuryAdmin, TreasuryUser. + * Swagger Name: AvaTaxClient + * * * @param {number} id The unique identifier of the company * @param {Enums.POABusinessUnit} businessUnit The company's business unit (See POABusinessUnit::* for a list of allowable values) * @param {Enums.POASubscriptionType} subscriptionType The company's subscription type (See POASubscriptionType::* for a list of allowable values) - * @param {Models.FundingInitiateModel} model The funding initialization request - * @return {Models.FundingStatusModel} - */ - - createFundingRequest({ id, businessUnit, subscriptionType, model }: { id: number, businessUnit?: Enums.POABusinessUnit, subscriptionType?: Enums.POASubscriptionType, model: Models.FundingInitiateModel }): Promise { - var path = this.buildUrl({ - url: `/api/v2/companies/${id}/funding/setup`, + * @param {Models.FundingInitiateModel} model The funding initialization request + * @return {Models.FundingStatusModel} + */ + + createFundingRequest({ id, businessUnit, subscriptionType, model }: { id: number, businessUnit?: Enums.POABusinessUnit, subscriptionType?: Enums.POASubscriptionType, model: Models.FundingInitiateModel }): Promise { + var path = this.buildUrl({ + url: `/api/v2/companies/${id}/funding/setup`, parameters: { businessUnit: businessUnit, subscriptionType: subscriptionType } - }); - var strClientId = - this.appNM + - '; ' + - this.appVer + - '; JavascriptSdk; ' + this.apiVersion + '; ' + - this.machineNM; + }); + var strClientId = + this.appNM + + '; ' + + this.appVer + + '; JavascriptSdk; ' + this.apiVersion + '; ' + + this.machineNM; return this.restCall({ url: path, verb: 'post', payload: model, clientId: strClientId }, Models.FundingStatusModel); - } - - /** - * Delete a single company + } + + /** + * 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, BatchServiceAdmin, CompanyAdmin, CSPTester, FirmAdmin, SSTAdmin, TechnicalSupportAdmin. - * Swagger Name: AvaTaxClient - * + * * This API requires one of the following user roles: AccountAdmin, BatchServiceAdmin, CompanyAdmin, CSPTester, FirmAdmin, SSTAdmin, TechnicalSupportAdmin. + * Swagger Name: AvaTaxClient + * * - * @param {number} id The ID of the company you wish to delete. - * @return {Models.ErrorDetail[]} - */ - - deleteCompany({ id }: { id: number }): Promise> { - var path = this.buildUrl({ - url: `/api/v2/companies/${id}`, + * @param {number} id The ID of the company you wish to delete. + * @return {Models.ErrorDetail[]} + */ + + deleteCompany({ id }: { id: number }): Promise> { + var path = this.buildUrl({ + url: `/api/v2/companies/${id}`, parameters: {} - }); - var strClientId = - this.appNM + - '; ' + - this.appVer + - '; JavascriptSdk; ' + this.apiVersion + '; ' + - this.machineNM; + }); + var strClientId = + this.appNM + + '; ' + + this.appVer + + '; JavascriptSdk; ' + this.apiVersion + '; ' + + this.machineNM; return this.restCall({ url: path, verb: 'delete', payload: null, clientId: strClientId }, Array); - } - - /** - * Delete a single company parameter + } + + /** + * 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". * @@ -2513,31 +2609,31 @@ export default class AvaTaxClient { * * ### Security Policies * - * * This API requires one of the following user roles: AccountAdmin, BatchServiceAdmin, CompanyAdmin, CSPTester, FirmAdmin, SSTAdmin, TechnicalSupportAdmin. - * Swagger Name: AvaTaxClient - * + * * This API requires one of the following user roles: AccountAdmin, BatchServiceAdmin, CompanyAdmin, CSPTester, FirmAdmin, SSTAdmin, TechnicalSupportAdmin. + * Swagger Name: AvaTaxClient + * * * @param {number} companyId The company id - * @param {number} id The parameter id - * @return {Models.ErrorDetail[]} - */ - - deleteCompanyParameter({ companyId, id }: { companyId: number, id: number }): Promise> { - var path = this.buildUrl({ - url: `/api/v2/companies/${companyId}/parameters/${id}`, - parameters: {} - }); - var strClientId = - this.appNM + - '; ' + - this.appVer + - '; JavascriptSdk; ' + this.apiVersion + '; ' + - this.machineNM; + * @param {number} id The parameter id + * @return {Models.ErrorDetail[]} + */ + + deleteCompanyParameter({ companyId, id }: { companyId: number, id: number }): Promise> { + var path = this.buildUrl({ + url: `/api/v2/companies/${companyId}/parameters/${id}`, + parameters: {} + }); + var strClientId = + this.appNM + + '; ' + + this.appVer + + '; JavascriptSdk; ' + this.apiVersion + '; ' + + this.machineNM; return this.restCall({ url: path, verb: 'delete', payload: null, clientId: strClientId }, Array); - } - - /** - * Check the funding configuration of a company + } + + /** + * 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. @@ -2546,30 +2642,30 @@ export default class AvaTaxClient { * ### Security Policies * * * This API requires one of the following user roles: AccountAdmin, AccountOperator, AccountUser, BatchServiceAdmin, CompanyAdmin, CompanyUser, Compliance Root User, ComplianceAdmin, ComplianceUser, CSPAdmin, CSPTester, ECMAccountUser, ECMCompanyUser, 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. - * Swagger Name: AvaTaxClient - * - * - * @param {number} companyId The unique identifier of the company - * @return {Models.FundingConfigurationModel} - */ - - fundingConfigurationByCompany({ companyId }: { companyId: number }): Promise { - var path = this.buildUrl({ - url: `/api/v2/companies/${companyId}/funding/configuration`, - parameters: {} - }); - var strClientId = - this.appNM + - '; ' + - this.appVer + - '; JavascriptSdk; ' + this.apiVersion + '; ' + - this.machineNM; + * * 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 {number} companyId The unique identifier of the company + * @return {Models.FundingConfigurationModel} + */ + + fundingConfigurationByCompany({ companyId }: { companyId: number }): Promise { + var path = this.buildUrl({ + url: `/api/v2/companies/${companyId}/funding/configuration`, + parameters: {} + }); + var strClientId = + this.appNM + + '; ' + + this.appVer + + '; JavascriptSdk; ' + this.apiVersion + '; ' + + this.machineNM; return this.restCall({ url: path, verb: 'get', payload: null, clientId: strClientId }, Models.FundingConfigurationModel); - } - - /** - * Check the funding configuration of a company + } + + /** + * 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. @@ -2578,33 +2674,33 @@ export default class AvaTaxClient { * ### Security Policies * * * This API requires one of the following user roles: AccountAdmin, AccountOperator, AccountUser, BatchServiceAdmin, CompanyAdmin, CompanyUser, Compliance Root User, ComplianceAdmin, ComplianceUser, CSPAdmin, CSPTester, ECMAccountUser, ECMCompanyUser, 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. - * Swagger Name: AvaTaxClient - * + * * 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 {number} companyId The unique identifier of the company - * @param {string} currency The currency of the funding. USD and CAD are the only valid currencies - * @return {Models.FundingConfigurationModel[]} - */ - - fundingConfigurationsByCompanyAndCurrency({ companyId, currency }: { companyId: number, currency?: string }): Promise> { - 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 {Models.FundingConfigurationModel[]} + */ + + fundingConfigurationsByCompanyAndCurrency({ companyId, currency }: { companyId: number, currency?: string }): Promise> { + var path = this.buildUrl({ + url: `/api/v2/companies/${companyId}/funding/configurations`, parameters: { currency: currency } - }); - var strClientId = - this.appNM + - '; ' + - this.appVer + - '; JavascriptSdk; ' + this.apiVersion + '; ' + - this.machineNM; + }); + var strClientId = + this.appNM + + '; ' + + this.appVer + + '; JavascriptSdk; ' + this.apiVersion + '; ' + + this.machineNM; return this.restCall({ url: path, verb: 'get', payload: null, clientId: strClientId }, Array); - } - - /** - * Retrieve a single company + } + + /** + * 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: @@ -2621,33 +2717,33 @@ export default class AvaTaxClient { * * ### Security Policies * - * * This API requires one of the following user roles: AccountAdmin, AccountOperator, AccountUser, BatchServiceAdmin, CompanyAdmin, CompanyUser, Compliance Root User, ComplianceAdmin, ComplianceUser, CSPAdmin, CSPTester, ECMAccountUser, ECMCompanyUser, FirmAdmin, FirmUser, ProStoresOperator, Registrar, SiteAdmin, SSTAdmin, SystemAdmin, TechnicalSupportAdmin, TechnicalSupportUser, TreasuryAdmin, TreasuryUser. - * Swagger Name: AvaTaxClient - * + * * This API requires one of the following user roles: AccountAdmin, AccountOperator, AccountUser, BatchServiceAdmin, CompanyAdmin, CompanyUser, Compliance Root User, ComplianceAdmin, ComplianceUser, CSPAdmin, CSPTester, ECMAccountUser, ECMCompanyUser, FirmAdmin, FirmUser, ProStoresOperator, Registrar, SiteAdmin, SSTAdmin, SystemAdmin, TechnicalSupportAdmin, TechnicalSupportUser, TreasuryAdmin, TreasuryUser. + * Swagger Name: AvaTaxClient + * * * @param {number} 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 {Models.CompanyModel} - */ - - getCompany({ id, include }: { id: number, include?: string }): Promise { - 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 {Models.CompanyModel} + */ + + getCompany({ id, include }: { id: number, include?: string }): Promise { + var path = this.buildUrl({ + url: `/api/v2/companies/${id}`, parameters: { $include: include } - }); - var strClientId = - this.appNM + - '; ' + - this.appVer + - '; JavascriptSdk; ' + this.apiVersion + '; ' + - this.machineNM; + }); + var strClientId = + this.appNM + + '; ' + + this.appVer + + '; JavascriptSdk; ' + this.apiVersion + '; ' + + this.machineNM; return this.restCall({ url: path, verb: 'get', payload: null, clientId: strClientId }, Models.CompanyModel); - } - - /** - * Get configuration settings for this company + } + + /** + * 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 @@ -2663,30 +2759,30 @@ export default class AvaTaxClient { * * ### Security Policies * - * * This API requires one of the following user roles: AccountAdmin, AccountUser, BatchServiceAdmin, CompanyAdmin, CompanyUser, CSPAdmin, CSPTester, ECMAccountUser, ECMCompanyUser, SiteAdmin, SSTAdmin, SystemAdmin, TechnicalSupportAdmin, TechnicalSupportUser. - * Swagger Name: AvaTaxClient - * + * * This API requires one of the following user roles: AccountAdmin, AccountUser, BatchServiceAdmin, CompanyAdmin, CompanyUser, CSPAdmin, CSPTester, ECMAccountUser, ECMCompanyUser, SiteAdmin, SSTAdmin, SystemAdmin, TechnicalSupportAdmin, TechnicalSupportUser. + * Swagger Name: AvaTaxClient + * * - * @param {number} id - * @return {Models.CompanyConfigurationModel[]} - */ - - getCompanyConfiguration({ id }: { id: number }): Promise> { - var path = this.buildUrl({ - url: `/api/v2/companies/${id}/configuration`, - parameters: {} - }); - var strClientId = - this.appNM + - '; ' + - this.appVer + - '; JavascriptSdk; ' + this.apiVersion + '; ' + - this.machineNM; + * @param {number} id + * @return {Models.CompanyConfigurationModel[]} + */ + + getCompanyConfiguration({ id }: { id: number }): Promise> { + var path = this.buildUrl({ + url: `/api/v2/companies/${id}/configuration`, + parameters: {} + }); + var strClientId = + this.appNM + + '; ' + + this.appVer + + '; JavascriptSdk; ' + this.apiVersion + '; ' + + this.machineNM; return this.restCall({ url: path, verb: 'get', payload: null, clientId: strClientId }, Array); - } - - /** - * Retrieve a single company parameter + } + + /** + * 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". @@ -2697,31 +2793,31 @@ export default class AvaTaxClient { * * ### Security Policies * - * * This API requires one of the following user roles: AccountAdmin, AccountOperator, AccountUser, BatchServiceAdmin, CompanyAdmin, CompanyUser, Compliance Root User, ComplianceAdmin, ComplianceUser, CSPAdmin, CSPTester, ECMAccountUser, ECMCompanyUser, FirmAdmin, FirmUser, ProStoresOperator, Registrar, SiteAdmin, SSTAdmin, SystemAdmin, TechnicalSupportAdmin, TechnicalSupportUser, TreasuryAdmin, TreasuryUser. - * Swagger Name: AvaTaxClient - * + * * This API requires one of the following user roles: AccountAdmin, AccountOperator, AccountUser, BatchServiceAdmin, CompanyAdmin, CompanyUser, Compliance Root User, ComplianceAdmin, ComplianceUser, CSPAdmin, CSPTester, ECMAccountUser, ECMCompanyUser, FirmAdmin, FirmUser, ProStoresOperator, Registrar, SiteAdmin, SSTAdmin, SystemAdmin, TechnicalSupportAdmin, TechnicalSupportUser, TreasuryAdmin, TreasuryUser. + * Swagger Name: AvaTaxClient + * * * @param {number} companyId - * @param {number} id - * @return {Models.CompanyParameterDetailModel} - */ - - getCompanyParameterDetail({ companyId, id }: { companyId: number, id: number }): Promise { - var path = this.buildUrl({ - url: `/api/v2/companies/${companyId}/parameters/${id}`, - parameters: {} - }); - var strClientId = - this.appNM + - '; ' + - this.appVer + - '; JavascriptSdk; ' + this.apiVersion + '; ' + - this.machineNM; + * @param {number} id + * @return {Models.CompanyParameterDetailModel} + */ + + getCompanyParameterDetail({ companyId, id }: { companyId: number, id: number }): Promise { + var path = this.buildUrl({ + url: `/api/v2/companies/${companyId}/parameters/${id}`, + parameters: {} + }); + var strClientId = + this.appNM + + '; ' + + this.appVer + + '; JavascriptSdk; ' + this.apiVersion + '; ' + + this.machineNM; return this.restCall({ url: path, verb: 'get', payload: null, clientId: strClientId }, Models.CompanyParameterDetailModel); - } - - /** - * Get this company's filing status + } + + /** + * 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 @@ -2739,30 +2835,30 @@ export default class AvaTaxClient { * * ### Security Policies * - * * This API requires one of the following user roles: AccountAdmin, AccountOperator, AccountUser, BatchServiceAdmin, CompanyAdmin, CompanyUser, Compliance Root User, ComplianceAdmin, ComplianceUser, CSPAdmin, CSPTester, ECMAccountUser, ECMCompanyUser, FirmAdmin, FirmUser, ProStoresOperator, Registrar, SiteAdmin, SSTAdmin, SystemAdmin, TechnicalSupportAdmin, TechnicalSupportUser, TreasuryAdmin, TreasuryUser. - * Swagger Name: AvaTaxClient - * + * * This API requires one of the following user roles: AccountAdmin, AccountOperator, AccountUser, BatchServiceAdmin, CompanyAdmin, CompanyUser, Compliance Root User, ComplianceAdmin, ComplianceUser, CSPAdmin, CSPTester, ECMAccountUser, ECMCompanyUser, FirmAdmin, FirmUser, ProStoresOperator, Registrar, SiteAdmin, SSTAdmin, SystemAdmin, TechnicalSupportAdmin, TechnicalSupportUser, TreasuryAdmin, TreasuryUser. + * Swagger Name: AvaTaxClient + * * - * @param {number} id - * @return {string} - */ - - getFilingStatus({ id }: { id: number }): Promise { - var path = this.buildUrl({ - url: `/api/v2/companies/${id}/filingstatus`, - parameters: {} - }); - var strClientId = - this.appNM + - '; ' + - this.appVer + - '; JavascriptSdk; ' + this.apiVersion + '; ' + - this.machineNM; + * @param {number} id + * @return {string} + */ + + getFilingStatus({ id }: { id: number }): Promise { + var path = this.buildUrl({ + url: `/api/v2/companies/${id}/filingstatus`, + parameters: {} + }); + var strClientId = + this.appNM + + '; ' + + this.appVer + + '; JavascriptSdk; ' + this.apiVersion + '; ' + + this.machineNM; return this.restCall({ url: path, verb: 'get', payload: null, clientId: strClientId }, String); - } - - /** - * Get ACH entry detail report for company and period + } + + /** + * Get ACH entry detail report for company and period * This API is available by invitation only. * Requires a subscription to Avalara Managed Returns or SST Certified Service Provider. * Returns a list of ACH entry details for the given company and period. @@ -2771,32 +2867,32 @@ 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, BatchServiceAdmin, CompanyAdmin, CompanyUser, Compliance Root User, ComplianceAdmin, ComplianceUser, CSPAdmin, CSPTester, ECMAccountUser, ECMCompanyUser, FirmAdmin, FirmUser, ProStoresOperator, Registrar, SiteAdmin, SSTAdmin, SystemAdmin, TechnicalSupportAdmin, TechnicalSupportUser, TreasuryAdmin, TreasuryUser. - * Swagger Name: AvaTaxClient - * + * * This API requires one of the following user roles: AccountAdmin, AccountOperator, AccountUser, BatchServiceAdmin, CompanyAdmin, CompanyUser, Compliance Root User, ComplianceAdmin, ComplianceUser, CSPAdmin, CSPTester, ECMAccountUser, ECMCompanyUser, FirmAdmin, FirmUser, ProStoresOperator, Registrar, SiteAdmin, SSTAdmin, SystemAdmin, TechnicalSupportAdmin, TechnicalSupportUser, TreasuryAdmin, TreasuryUser. + * Swagger Name: AvaTaxClient + * * * @param {number} id The unique identifier of the company * @param {number} periodyear The period year - * @param {number} periodmonth The period month - * @return {Models.ACHEntryDetailModel[]} - */ - - listACHEntryDetailsForCompany({ id, periodyear, periodmonth }: { id: number, periodyear: number, periodmonth: number }): Promise> { - var path = this.buildUrl({ - url: `/api/v2/companies/${id}/paymentdetails/${periodyear}/${periodmonth}`, - parameters: {} - }); - var strClientId = - this.appNM + - '; ' + - this.appVer + - '; JavascriptSdk; ' + this.apiVersion + '; ' + - this.machineNM; + * @param {number} periodmonth The period month + * @return {Models.ACHEntryDetailModel[]} + */ + + listACHEntryDetailsForCompany({ id, periodyear, periodmonth }: { id: number, periodyear: number, periodmonth: number }): Promise> { + var path = this.buildUrl({ + url: `/api/v2/companies/${id}/paymentdetails/${periodyear}/${periodmonth}`, + parameters: {} + }); + var strClientId = + this.appNM + + '; ' + + this.appVer + + '; JavascriptSdk; ' + this.apiVersion + '; ' + + this.machineNM; return this.restCall({ url: path, verb: 'get', payload: null, clientId: strClientId }, Array); - } - - /** - * Retrieve parameters for a company + } + + /** + * 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". @@ -2810,39 +2906,39 @@ export default class AvaTaxClient { * * ### Security Policies * - * * This API requires one of the following user roles: AccountAdmin, AccountOperator, AccountUser, BatchServiceAdmin, CompanyAdmin, CompanyUser, Compliance Root User, ComplianceAdmin, ComplianceUser, CSPAdmin, CSPTester, ECMAccountUser, ECMCompanyUser, FirmAdmin, FirmUser, ProStoresOperator, Registrar, SiteAdmin, SSTAdmin, SystemAdmin, TechnicalSupportAdmin, TechnicalSupportUser, TreasuryAdmin, TreasuryUser. - * Swagger Name: AvaTaxClient - * + * * This API requires one of the following user roles: AccountAdmin, AccountOperator, AccountUser, BatchServiceAdmin, CompanyAdmin, CompanyUser, Compliance Root User, ComplianceAdmin, ComplianceUser, CSPAdmin, CSPTester, ECMAccountUser, ECMCompanyUser, FirmAdmin, FirmUser, ProStoresOperator, Registrar, SiteAdmin, SSTAdmin, SystemAdmin, TechnicalSupportAdmin, TechnicalSupportUser, TreasuryAdmin, TreasuryUser. + * Swagger Name: AvaTaxClient + * * * @param {number} 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 {number} top If nonzero, return no more than this number of results. Used with `$skip` to provide pagination for large datasets. Unless otherwise specified, the maximum number of records that can be returned from an API call is 1,000 records. * @param {number} skip If nonzero, skip this number of results before returning data. Used with `$top` to provide pagination for large datasets. - * @param {string} orderBy A comma separated list of sort statements in the format `(fieldname) [ASC|DESC]`, for example `id ASC`. - * @return {FetchResult} - */ - - listCompanyParameterDetails({ companyId, filter, top, skip, orderBy }: { companyId: number, filter?: string, top?: number, skip?: number, orderBy?: string }): Promise> { - 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 }: { companyId: number, filter?: string, top?: number, skip?: number, orderBy?: string }): Promise> { + var path = this.buildUrl({ + url: `/api/v2/companies/${companyId}/parameters`, parameters: { $filter: filter, $top: top, $skip: skip, $orderBy: orderBy } - }); - var strClientId = - this.appNM + - '; ' + - this.appVer + - '; JavascriptSdk; ' + this.apiVersion + '; ' + - this.machineNM; + }); + var strClientId = + this.appNM + + '; ' + + this.appVer + + '; JavascriptSdk; ' + this.apiVersion + '; ' + + this.machineNM; return this.restCall({ url: path, verb: 'get', payload: null, clientId: strClientId }, FetchResult); - } - - /** - * Check managed returns funding status for a company + } + + /** + * 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. @@ -2851,59 +2947,59 @@ 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, BatchServiceAdmin, CompanyAdmin, CompanyUser, Compliance Root User, ComplianceAdmin, ComplianceUser, CSPAdmin, CSPTester, ECMAccountUser, ECMCompanyUser, FirmAdmin, FirmUser, ProStoresOperator, Registrar, SiteAdmin, SSTAdmin, SystemAdmin, TechnicalSupportAdmin, TechnicalSupportUser, TreasuryAdmin, TreasuryUser. - * Swagger Name: AvaTaxClient - * - * - * @param {number} id The unique identifier of the company - * @return {Models.FundingStatusModel[]} - */ - - listFundingRequestsByCompany({ id }: { id: number }): Promise> { - var path = this.buildUrl({ - url: `/api/v2/companies/${id}/funding`, - parameters: {} - }); - var strClientId = - this.appNM + - '; ' + - this.appVer + - '; JavascriptSdk; ' + this.apiVersion + '; ' + - this.machineNM; + * * This API requires one of the following user roles: AccountAdmin, AccountOperator, AccountUser, BatchServiceAdmin, CompanyAdmin, CompanyUser, Compliance Root User, ComplianceAdmin, ComplianceUser, CSPAdmin, CSPTester, ECMAccountUser, ECMCompanyUser, FirmAdmin, FirmUser, ProStoresOperator, Registrar, SiteAdmin, SSTAdmin, SystemAdmin, TechnicalSupportAdmin, TechnicalSupportUser, TreasuryAdmin, TreasuryUser. + * Swagger Name: AvaTaxClient + * + * + * @param {number} id The unique identifier of the company + * @return {Models.FundingStatusModel[]} + */ + + listFundingRequestsByCompany({ id }: { id: number }): Promise> { + var path = this.buildUrl({ + url: `/api/v2/companies/${id}/funding`, + parameters: {} + }); + var strClientId = + this.appNM + + '; ' + + this.appVer + + '; JavascriptSdk; ' + this.apiVersion + '; ' + + this.machineNM; return this.restCall({ url: path, verb: 'get', payload: null, clientId: strClientId }, Array); - } - - /** - * Retrieve a list of MRS Companies with account + } + + /** + * 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, BatchServiceAdmin, CompanyAdmin, CompanyUser, Compliance Root User, ComplianceAdmin, ComplianceUser, CSPAdmin, CSPTester, ECMAccountUser, ECMCompanyUser, FirmAdmin, FirmUser, ProStoresOperator, Registrar, SiteAdmin, SSTAdmin, SystemAdmin, TechnicalSupportAdmin, TechnicalSupportUser, TreasuryAdmin, TreasuryUser. - * Swagger Name: AvaTaxClient - * - * - * @return {FetchResult} - */ - - listMrsCompanies(): Promise> { - var path = this.buildUrl({ - url: `/api/v2/companies/mrs`, - parameters: {} - }); - var strClientId = - this.appNM + - '; ' + - this.appVer + - '; JavascriptSdk; ' + this.apiVersion + '; ' + - this.machineNM; + * * This API requires one of the following user roles: AccountAdmin, AccountOperator, AccountUser, BatchServiceAdmin, CompanyAdmin, CompanyUser, Compliance Root User, ComplianceAdmin, ComplianceUser, CSPAdmin, CSPTester, ECMAccountUser, ECMCompanyUser, FirmAdmin, FirmUser, ProStoresOperator, Registrar, SiteAdmin, SSTAdmin, SystemAdmin, TechnicalSupportAdmin, TechnicalSupportUser, TreasuryAdmin, TreasuryUser. + * Swagger Name: AvaTaxClient + * + * + * @return {FetchResult} + */ + + listMrsCompanies(): Promise> { + var path = this.buildUrl({ + url: `/api/v2/companies/mrs`, + parameters: {} + }); + var strClientId = + this.appNM + + '; ' + + this.appVer + + '; JavascriptSdk; ' + this.apiVersion + '; ' + + this.machineNM; return this.restCall({ url: path, verb: 'get', payload: null, clientId: strClientId }, FetchResult); - } - - /** - * Retrieve all companies + } + + /** + * Retrieve all companies * Get multiple company objects. * * A `company` represents a single corporation or individual that is registered to handle transactional taxes. @@ -2924,21 +3020,21 @@ export default class AvaTaxClient { * * ### Security Policies * - * * This API requires one of the following user roles: AccountAdmin, AccountOperator, AccountUser, BatchServiceAdmin, CompanyAdmin, CompanyUser, Compliance Root User, ComplianceAdmin, ComplianceUser, CSPAdmin, CSPTester, ECMAccountUser, ECMCompanyUser, FirmAdmin, FirmUser, ProStoresOperator, Registrar, SiteAdmin, SSTAdmin, SystemAdmin, TechnicalSupportAdmin, TechnicalSupportUser, TreasuryAdmin, TreasuryUser. - * Swagger Name: AvaTaxClient - * + * * This API requires one of the following user roles: AccountAdmin, AccountOperator, AccountUser, BatchServiceAdmin, CompanyAdmin, CompanyUser, Compliance Root User, ComplianceAdmin, ComplianceUser, CSPAdmin, CSPTester, ECMAccountUser, ECMCompanyUser, 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 {number} top If nonzero, return no more than this number of results. Used with `$skip` to provide pagination for large datasets. Unless otherwise specified, the maximum number of records that can be returned from an API call is 1,000 records. * @param {number} skip If nonzero, skip this number of results before returning data. Used with `$top` to provide pagination for large datasets. - * @param {string} orderBy A comma separated list of sort statements in the format `(fieldname) [ASC|DESC]`, for example `id ASC`. - * @return {FetchResult} - */ - - queryCompanies({ include, filter, top, skip, orderBy }: { include?: string, filter?: string, top?: number, skip?: number, orderBy?: string }): Promise> { - 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 }: { include?: string, filter?: string, top?: number, skip?: number, orderBy?: string }): Promise> { + var path = this.buildUrl({ + url: `/api/v2/companies`, parameters: { $include: include, $filter: filter, @@ -2946,18 +3042,18 @@ export default class AvaTaxClient { $skip: skip, $orderBy: orderBy } - }); - var strClientId = - this.appNM + - '; ' + - this.appVer + - '; JavascriptSdk; ' + this.apiVersion + '; ' + - this.machineNM; + }); + var strClientId = + this.appNM + + '; ' + + this.appVer + + '; JavascriptSdk; ' + this.apiVersion + '; ' + + this.machineNM; return this.restCall({ url: path, verb: 'get', payload: null, clientId: strClientId }, FetchResult); - } - - /** - * Change configuration settings for this company + } + + /** + * 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 @@ -2973,31 +3069,31 @@ export default class AvaTaxClient { * * ### Security Policies * - * * This API requires one of the following user roles: AccountAdmin, BatchServiceAdmin, CompanyAdmin, CSPTester, SSTAdmin, TechnicalSupportAdmin. - * Swagger Name: AvaTaxClient - * + * * This API requires one of the following user roles: AccountAdmin, BatchServiceAdmin, CompanyAdmin, CSPTester, SSTAdmin, TechnicalSupportAdmin. + * Swagger Name: AvaTaxClient + * * * @param {number} id - * @param {Models.CompanyConfigurationModel[]} model - * @return {Models.CompanyConfigurationModel[]} - */ - - setCompanyConfiguration({ id, model }: { id: number, model: Models.CompanyConfigurationModel[] }): Promise> { - var path = this.buildUrl({ - url: `/api/v2/companies/${id}/configuration`, - parameters: {} - }); - var strClientId = - this.appNM + - '; ' + - this.appVer + - '; JavascriptSdk; ' + this.apiVersion + '; ' + - this.machineNM; + * @param {Models.CompanyConfigurationModel[]} model + * @return {Models.CompanyConfigurationModel[]} + */ + + setCompanyConfiguration({ id, model }: { id: number, model: Models.CompanyConfigurationModel[] }): Promise> { + var path = this.buildUrl({ + url: `/api/v2/companies/${id}/configuration`, + parameters: {} + }); + var strClientId = + this.appNM + + '; ' + + this.appVer + + '; JavascriptSdk; ' + this.apiVersion + '; ' + + this.machineNM; return this.restCall({ url: path, verb: 'post', payload: model, clientId: strClientId }, Array); - } - - /** - * Update a single company + } + + /** + * 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. @@ -3012,31 +3108,31 @@ export default class AvaTaxClient { * * ### Security Policies * - * * This API requires one of the following user roles: AccountAdmin, BatchServiceAdmin, CompanyAdmin, CSPTester, FirmAdmin, Registrar, SiteAdmin, SSTAdmin, SystemAdmin, TechnicalSupportAdmin. - * Swagger Name: AvaTaxClient - * + * * This API requires one of the following user roles: AccountAdmin, BatchServiceAdmin, CompanyAdmin, CSPTester, FirmAdmin, Registrar, SiteAdmin, SSTAdmin, SystemAdmin, TechnicalSupportAdmin. + * Swagger Name: AvaTaxClient + * * * @param {number} id The ID of the company you wish to update. - * @param {Models.CompanyModel} model The company object you wish to update. - * @return {Models.CompanyModel} - */ - - updateCompany({ id, model }: { id: number, model?: Models.CompanyModel }): Promise { - var path = this.buildUrl({ - url: `/api/v2/companies/${id}`, - parameters: {} - }); - var strClientId = - this.appNM + - '; ' + - this.appVer + - '; JavascriptSdk; ' + this.apiVersion + '; ' + - this.machineNM; + * @param {Models.CompanyModel} model The company object you wish to update. + * @return {Models.CompanyModel} + */ + + updateCompany({ id, model }: { id: number, model?: Models.CompanyModel }): Promise { + var path = this.buildUrl({ + url: `/api/v2/companies/${id}`, + parameters: {} + }); + var strClientId = + this.appNM + + '; ' + + this.appVer + + '; JavascriptSdk; ' + this.apiVersion + '; ' + + this.machineNM; return this.restCall({ url: path, verb: 'put', payload: model, clientId: strClientId }, Models.CompanyModel); - } - - /** - * Update a company parameter + } + + /** + * 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". @@ -3047,37 +3143,37 @@ export default class AvaTaxClient { * * ### Security Policies * - * * This API requires one of the following user roles: AccountAdmin, BatchServiceAdmin, CompanyAdmin, CSPTester, FirmAdmin, Registrar, SiteAdmin, SSTAdmin, SystemAdmin, TechnicalSupportAdmin. - * Swagger Name: AvaTaxClient - * + * * This API requires one of the following user roles: AccountAdmin, BatchServiceAdmin, CompanyAdmin, CSPTester, FirmAdmin, Registrar, SiteAdmin, SSTAdmin, SystemAdmin, TechnicalSupportAdmin. + * Swagger Name: AvaTaxClient + * * * @param {number} companyId The company id. * @param {number} id The company parameter id - * @param {Models.CompanyParameterDetailModel} model The company parameter object you wish to update. - * @return {Models.CompanyParameterDetailModel} - */ - - updateCompanyParameterDetail({ companyId, id, model }: { companyId: number, id: number, model?: Models.CompanyParameterDetailModel }): Promise { - var path = this.buildUrl({ - url: `/api/v2/companies/${companyId}/parameters/${id}`, - parameters: {} - }); - var strClientId = - this.appNM + - '; ' + - this.appVer + - '; JavascriptSdk; ' + this.apiVersion + '; ' + - this.machineNM; + * @param {Models.CompanyParameterDetailModel} model The company parameter object you wish to update. + * @return {Models.CompanyParameterDetailModel} + */ + + updateCompanyParameterDetail({ companyId, id, model }: { companyId: number, id: number, model?: Models.CompanyParameterDetailModel }): Promise { + var path = this.buildUrl({ + url: `/api/v2/companies/${companyId}/parameters/${id}`, + parameters: {} + }); + var strClientId = + this.appNM + + '; ' + + this.appVer + + '; JavascriptSdk; ' + this.apiVersion + '; ' + + this.machineNM; return this.restCall({ url: path, verb: 'put', payload: model, clientId: strClientId }, Models.CompanyParameterDetailModel); - } - - /** - * Retrieve all unique jurisnames based on filter. + } + + /** + * Retrieve all unique jurisnames based on filter. * ### 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 - * + * * 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} country The two-character ISO-3166 code for the country. * @param {string} region The two or three character region code for the region. @@ -3086,13 +3182,13 @@ 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 {number} top If nonzero, return no more than this number of results. Used with `$skip` to provide pagination for large datasets. Unless otherwise specified, the maximum number of records that can be returned from an API call is 1,000 records. * @param {number} skip If nonzero, skip this number of results before returning data. Used with `$top` to provide pagination for large datasets. - * @param {string} orderBy A comma separated list of sort statements in the format `(fieldname) [ASC|DESC]`, for example `id ASC`. - * @return {FetchResult} - */ - - queryJurisNames({ country, region, effectiveDate, endDate, filter, top, skip, orderBy }: { country: string, region: string, effectiveDate?: Date, endDate?: Date, filter?: string, top?: number, skip?: number, orderBy?: string }): Promise> { - var path = this.buildUrl({ - url: `/api/v2/compliance/jurisnames/${country}/${region}`, + * @param {string} orderBy A comma separated list of sort statements in the format `(fieldname) [ASC|DESC]`, for example `id ASC`. + * @return {FetchResult} + */ + + queryJurisNames({ country, region, effectiveDate, endDate, filter, top, skip, orderBy }: { country: string, region: string, effectiveDate?: Date, endDate?: Date, filter?: string, top?: number, skip?: number, orderBy?: string }): Promise> { + var path = this.buildUrl({ + url: `/api/v2/compliance/jurisnames/${country}/${region}`, parameters: { effectiveDate: effectiveDate, endDate: endDate, @@ -3101,25 +3197,25 @@ export default class AvaTaxClient { $skip: skip, $orderBy: orderBy } - }); - var strClientId = - this.appNM + - '; ' + - this.appVer + - '; JavascriptSdk; ' + this.apiVersion + '; ' + - this.machineNM; + }); + var strClientId = + this.appNM + + '; ' + + this.appVer + + '; JavascriptSdk; ' + this.apiVersion + '; ' + + this.machineNM; return this.restCall({ url: path, verb: 'get', payload: null, clientId: strClientId }, FetchResult); - } - - /** - * Retrieve all RateOptions. + } + + /** + * Retrieve all RateOptions. * 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 - * + * * 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} country The two-character ISO-3166 code for the country. * @param {string} region The two or three character region code for the region. @@ -3129,13 +3225,13 @@ export default class AvaTaxClient { * @param {number} top If nonzero, return no more than this number of results. Used with `$skip` to provide pagination for large datasets. Unless otherwise specified, the maximum number of records that can be returned from an API call is 1,000 records. * @param {number} skip If nonzero, skip this number of results before returning data. Used with `$top` to provide pagination for large datasets. * @param {string} 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:* taxRegionId, taxTypeCodeName, taxSubTypeCode, taxSubTypeCodeName, rateTypeCodeName, componentRate, taxAuthorityId, cityName, countyName, effDate, endDate - * @param {string} orderBy A comma separated list of sort statements in the format `(fieldname) [ASC|DESC]`, for example `id ASC`. - * @return {FetchResult} - */ - - queryRateOptions({ country, region, effectiveDate, endDate, aggregationOption, top, skip, filter, orderBy }: { country: string, region: string, effectiveDate?: Date, endDate?: Date, aggregationOption?: Enums.StackAggregationOption, top?: number, skip?: number, filter?: string, orderBy?: string }): Promise> { - var path = this.buildUrl({ - url: `/api/v2/compliance/rateOptions/${country}/${region}`, + * @param {string} orderBy A comma separated list of sort statements in the format `(fieldname) [ASC|DESC]`, for example `id ASC`. + * @return {FetchResult} + */ + + queryRateOptions({ country, region, effectiveDate, endDate, aggregationOption, top, skip, filter, orderBy }: { country: string, region: string, effectiveDate?: Date, endDate?: Date, aggregationOption?: Enums.StackAggregationOption, top?: number, skip?: number, filter?: string, orderBy?: string }): Promise> { + var path = this.buildUrl({ + url: `/api/v2/compliance/rateOptions/${country}/${region}`, parameters: { effectiveDate: effectiveDate, endDate: endDate, @@ -3145,59 +3241,59 @@ export default class AvaTaxClient { $filter: filter, $orderBy: orderBy } - }); - var strClientId = - this.appNM + - '; ' + - this.appVer + - '; JavascriptSdk; ' + this.apiVersion + '; ' + - this.machineNM; + }); + var strClientId = + this.appNM + + '; ' + + this.appVer + + '; JavascriptSdk; ' + this.apiVersion + '; ' + + this.machineNM; return this.restCall({ url: path, verb: 'get', payload: null, clientId: strClientId }, FetchResult); - } - - /** - * Retrieve StateConfig information + } + + /** + * Retrieve StateConfig information * 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 - * + * * 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:* effDate, endDate, hasBoundary, hasRates, isLocalAdmin, isLocalNexus, isSerState, minBoundaryLevelId, sstStatusId, state, stateFips, boundaryTableBaseName, stjCount, tsStateId, isJaasEnabled, hasSSTBoundary * @param {number} top If nonzero, return no more than this number of results. Used with `$skip` to provide pagination for large datasets. Unless otherwise specified, the maximum number of records that can be returned from an API call is 1,000 records. * @param {number} skip If nonzero, skip this number of results before returning data. Used with `$top` to provide pagination for large datasets. - * @param {string} orderBy A comma separated list of sort statements in the format `(fieldname) [ASC|DESC]`, for example `id ASC`. - * @return {FetchResult} - */ - - queryStateConfig({ filter, top, skip, orderBy }: { filter?: string, top?: number, skip?: number, orderBy?: string }): Promise> { - var path = this.buildUrl({ - url: `/api/v2/compliance/stateconfig`, + * @param {string} orderBy A comma separated list of sort statements in the format `(fieldname) [ASC|DESC]`, for example `id ASC`. + * @return {FetchResult} + */ + + queryStateConfig({ filter, top, skip, orderBy }: { filter?: string, top?: number, skip?: number, orderBy?: string }): Promise> { + var path = this.buildUrl({ + url: `/api/v2/compliance/stateconfig`, parameters: { $filter: filter, $top: top, $skip: skip, $orderBy: orderBy } - }); - var strClientId = - this.appNM + - '; ' + - this.appVer + - '; JavascriptSdk; ' + this.apiVersion + '; ' + - this.machineNM; + }); + var strClientId = + this.appNM + + '; ' + + this.appVer + + '; JavascriptSdk; ' + this.apiVersion + '; ' + + this.machineNM; return this.restCall({ url: path, verb: 'get', payload: null, clientId: strClientId }, FetchResult); - } - - /** - * Retrieve all State Reporting Codes based on filter. + } + + /** + * Retrieve all State Reporting Codes based on filter. * ### 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 - * + * * 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} country The two-character ISO-3166 code for the country. * @param {string} region The two or three character region code for the region. @@ -3206,13 +3302,13 @@ 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:* label * @param {number} top If nonzero, return no more than this number of results. Used with `$skip` to provide pagination for large datasets. Unless otherwise specified, the maximum number of records that can be returned from an API call is 1,000 records. * @param {number} skip If nonzero, skip this number of results before returning data. Used with `$top` to provide pagination for large datasets. - * @param {string} orderBy A comma separated list of sort statements in the format `(fieldname) [ASC|DESC]`, for example `id ASC`. - * @return {FetchResult} - */ - - queryStateReportingCodes({ country, region, effectiveDate, endDate, filter, top, skip, orderBy }: { country: string, region: string, effectiveDate?: Date, endDate?: Date, filter?: string, top?: number, skip?: number, orderBy?: string }): Promise> { - var path = this.buildUrl({ - url: `/api/v2/compliance/stateReportingCodes/${country}/${region}`, + * @param {string} orderBy A comma separated list of sort statements in the format `(fieldname) [ASC|DESC]`, for example `id ASC`. + * @return {FetchResult} + */ + + queryStateReportingCodes({ country, region, effectiveDate, endDate, filter, top, skip, orderBy }: { country: string, region: string, effectiveDate?: Date, endDate?: Date, filter?: string, top?: number, skip?: number, orderBy?: string }): Promise> { + var path = this.buildUrl({ + url: `/api/v2/compliance/stateReportingCodes/${country}/${region}`, parameters: { effectiveDate: effectiveDate, endDate: endDate, @@ -3221,143 +3317,143 @@ export default class AvaTaxClient { $skip: skip, $orderBy: orderBy } - }); - var strClientId = - this.appNM + - '; ' + - this.appVer + - '; JavascriptSdk; ' + this.apiVersion + '; ' + - this.machineNM; + }); + var strClientId = + this.appNM + + '; ' + + this.appVer + + '; JavascriptSdk; ' + this.apiVersion + '; ' + + this.machineNM; return this.restCall({ url: path, verb: 'get', payload: null, clientId: strClientId }, FetchResult); - } - - /** - * Retrieve all tax type mappings based on filter. + } + + /** + * Retrieve all tax type mappings based on filter. * ### 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 - * + * * 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:* taxTypeGroupIdSK, taxTypeIdSK, taxSubTypeIdSK, generalOrStandardRateTypeIdSK, taxTypeGroupId, taxTypeId, country, generalOrStandardRateTypeId * @param {number} top If nonzero, return no more than this number of results. Used with `$skip` to provide pagination for large datasets. Unless otherwise specified, the maximum number of records that can be returned from an API call is 1,000 records. * @param {number} skip If nonzero, skip this number of results before returning data. Used with `$top` to provide pagination for large datasets. - * @param {string} orderBy A comma separated list of sort statements in the format `(fieldname) [ASC|DESC]`, for example `id ASC`. - * @return {FetchResult} - */ - - queryTaxTypeMappings({ filter, top, skip, orderBy }: { filter?: string, top?: number, skip?: number, orderBy?: string }): Promise> { - var path = this.buildUrl({ - url: `/api/v2/compliance/taxtypemappings`, + * @param {string} orderBy A comma separated list of sort statements in the format `(fieldname) [ASC|DESC]`, for example `id ASC`. + * @return {FetchResult} + */ + + queryTaxTypeMappings({ filter, top, skip, orderBy }: { filter?: string, top?: number, skip?: number, orderBy?: string }): Promise> { + var path = this.buildUrl({ + url: `/api/v2/compliance/taxtypemappings`, parameters: { $filter: filter, $top: top, $skip: skip, $orderBy: orderBy } - }); - var strClientId = - this.appNM + - '; ' + - this.appVer + - '; JavascriptSdk; ' + this.apiVersion + '; ' + - this.machineNM; + }); + var strClientId = + this.appNM + + '; ' + + this.appVer + + '; JavascriptSdk; ' + this.apiVersion + '; ' + + this.machineNM; return this.restCall({ url: path, verb: 'get', payload: null, clientId: strClientId }, FetchResult); - } - - /** - * Create a new contact + } + + /** + * 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, BatchServiceAdmin, CompanyAdmin, CSPTester, FirmAdmin, SSTAdmin, TechnicalSupportAdmin. - * Swagger Name: AvaTaxClient - * + * * This API requires one of the following user roles: AccountAdmin, BatchServiceAdmin, CompanyAdmin, CSPTester, FirmAdmin, SSTAdmin, TechnicalSupportAdmin. + * Swagger Name: AvaTaxClient + * * * @param {number} companyId The ID of the company that owns this contact. - * @param {Models.ContactModel[]} model The contacts you wish to create. - * @return {Models.ContactModel[]} - */ - - createContacts({ companyId, model }: { companyId: number, model: Models.ContactModel[] }): Promise> { - var path = this.buildUrl({ - url: `/api/v2/companies/${companyId}/contacts`, - parameters: {} - }); - var strClientId = - this.appNM + - '; ' + - this.appVer + - '; JavascriptSdk; ' + this.apiVersion + '; ' + - this.machineNM; + * @param {Models.ContactModel[]} model The contacts you wish to create. + * @return {Models.ContactModel[]} + */ + + createContacts({ companyId, model }: { companyId: number, model: Models.ContactModel[] }): Promise> { + var path = this.buildUrl({ + url: `/api/v2/companies/${companyId}/contacts`, + parameters: {} + }); + var strClientId = + this.appNM + + '; ' + + this.appVer + + '; JavascriptSdk; ' + this.apiVersion + '; ' + + this.machineNM; return this.restCall({ url: path, verb: 'post', payload: model, clientId: strClientId }, Array); - } - - /** - * Delete a single contact + } + + /** + * 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, BatchServiceAdmin, CompanyAdmin, CSPTester, FirmAdmin, SSTAdmin, TechnicalSupportAdmin. - * Swagger Name: AvaTaxClient - * + * * This API requires one of the following user roles: AccountAdmin, BatchServiceAdmin, CompanyAdmin, CSPTester, FirmAdmin, SSTAdmin, TechnicalSupportAdmin. + * Swagger Name: AvaTaxClient + * * * @param {number} companyId The ID of the company that owns this contact. - * @param {number} id The ID of the contact you wish to delete. - * @return {Models.ErrorDetail[]} - */ - - deleteContact({ companyId, id }: { companyId: number, id: number }): Promise> { - var path = this.buildUrl({ - url: `/api/v2/companies/${companyId}/contacts/${id}`, - parameters: {} - }); - var strClientId = - this.appNM + - '; ' + - this.appVer + - '; JavascriptSdk; ' + this.apiVersion + '; ' + - this.machineNM; + * @param {number} id The ID of the contact you wish to delete. + * @return {Models.ErrorDetail[]} + */ + + deleteContact({ companyId, id }: { companyId: number, id: number }): Promise> { + var path = this.buildUrl({ + url: `/api/v2/companies/${companyId}/contacts/${id}`, + parameters: {} + }); + var strClientId = + this.appNM + + '; ' + + this.appVer + + '; JavascriptSdk; ' + this.apiVersion + '; ' + + this.machineNM; return this.restCall({ url: path, verb: 'delete', payload: null, clientId: strClientId }, Array); - } - - /** - * Retrieve a single contact + } + + /** + * 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, BatchServiceAdmin, CompanyAdmin, CompanyUser, CSPAdmin, CSPTester, FirmAdmin, SiteAdmin, SSTAdmin, SystemAdmin, TechnicalSupportAdmin, TechnicalSupportUser, TreasuryAdmin, TreasuryUser. - * Swagger Name: AvaTaxClient - * + * * This API requires one of the following user roles: AccountAdmin, AccountUser, BatchServiceAdmin, CompanyAdmin, CompanyUser, CSPAdmin, CSPTester, FirmAdmin, SiteAdmin, SSTAdmin, SystemAdmin, TechnicalSupportAdmin, TechnicalSupportUser, TreasuryAdmin, TreasuryUser. + * Swagger Name: AvaTaxClient + * * * @param {number} companyId The ID of the company for this contact - * @param {number} id The primary key of this contact - * @return {Models.ContactModel} - */ - - getContact({ companyId, id }: { companyId: number, id: number }): Promise { - var path = this.buildUrl({ - url: `/api/v2/companies/${companyId}/contacts/${id}`, - parameters: {} - }); - var strClientId = - this.appNM + - '; ' + - this.appVer + - '; JavascriptSdk; ' + this.apiVersion + '; ' + - this.machineNM; + * @param {number} id The primary key of this contact + * @return {Models.ContactModel} + */ + + getContact({ companyId, id }: { companyId: number, id: number }): Promise { + var path = this.buildUrl({ + url: `/api/v2/companies/${companyId}/contacts/${id}`, + parameters: {} + }); + var strClientId = + this.appNM + + '; ' + + this.appVer + + '; JavascriptSdk; ' + this.apiVersion + '; ' + + this.machineNM; return this.restCall({ url: path, verb: 'get', payload: null, clientId: strClientId }, Models.ContactModel); - } - - /** - * Retrieve contacts for this company + } + + /** + * 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/) . @@ -3365,39 +3461,39 @@ export default class AvaTaxClient { * * ### Security Policies * - * * This API requires one of the following user roles: AccountAdmin, AccountUser, BatchServiceAdmin, CompanyAdmin, CompanyUser, CSPAdmin, CSPTester, FirmAdmin, SiteAdmin, SSTAdmin, SystemAdmin, TechnicalSupportAdmin, TechnicalSupportUser, TreasuryAdmin, TreasuryUser. - * Swagger Name: AvaTaxClient - * + * * This API requires one of the following user roles: AccountAdmin, AccountUser, BatchServiceAdmin, CompanyAdmin, CompanyUser, CSPAdmin, CSPTester, FirmAdmin, SiteAdmin, SSTAdmin, SystemAdmin, TechnicalSupportAdmin, TechnicalSupportUser, TreasuryAdmin, TreasuryUser. + * Swagger Name: AvaTaxClient + * * * @param {number} 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 {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:* scsContactId * @param {number} top If nonzero, return no more than this number of results. Used with `$skip` to provide pagination for large datasets. Unless otherwise specified, the maximum number of records that can be returned from an API call is 1,000 records. * @param {number} skip If nonzero, skip this number of results before returning data. Used with `$top` to provide pagination for large datasets. - * @param {string} orderBy A comma separated list of sort statements in the format `(fieldname) [ASC|DESC]`, for example `id ASC`. - * @return {FetchResult} - */ - - listContactsByCompany({ companyId, filter, top, skip, orderBy }: { companyId: number, filter?: string, top?: number, skip?: number, orderBy?: string }): Promise> { - 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 }: { companyId: number, filter?: string, top?: number, skip?: number, orderBy?: string }): Promise> { + var path = this.buildUrl({ + url: `/api/v2/companies/${companyId}/contacts`, parameters: { $filter: filter, $top: top, $skip: skip, $orderBy: orderBy } - }); - var strClientId = - this.appNM + - '; ' + - this.appVer + - '; JavascriptSdk; ' + this.apiVersion + '; ' + - this.machineNM; + }); + var strClientId = + this.appNM + + '; ' + + this.appVer + + '; JavascriptSdk; ' + this.apiVersion + '; ' + + this.machineNM; return this.restCall({ url: path, verb: 'get', payload: null, clientId: strClientId }, FetchResult); - } - - /** - * Retrieve all contacts + } + + /** + * 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. @@ -3407,38 +3503,38 @@ export default class AvaTaxClient { * * ### Security Policies * - * * This API requires one of the following user roles: AccountAdmin, AccountUser, BatchServiceAdmin, CompanyAdmin, CompanyUser, CSPAdmin, CSPTester, FirmAdmin, SiteAdmin, SSTAdmin, SystemAdmin, TechnicalSupportAdmin, TechnicalSupportUser, TreasuryAdmin, TreasuryUser. - * Swagger Name: AvaTaxClient - * + * * This API requires one of the following user roles: AccountAdmin, AccountUser, BatchServiceAdmin, 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 {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:* scsContactId * @param {number} top If nonzero, return no more than this number of results. Used with `$skip` to provide pagination for large datasets. Unless otherwise specified, the maximum number of records that can be returned from an API call is 1,000 records. * @param {number} skip If nonzero, skip this number of results before returning data. Used with `$top` to provide pagination for large datasets. - * @param {string} orderBy A comma separated list of sort statements in the format `(fieldname) [ASC|DESC]`, for example `id ASC`. - * @return {FetchResult} - */ - - queryContacts({ filter, top, skip, orderBy }: { filter?: string, top?: number, skip?: number, orderBy?: string }): Promise> { - 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 }: { filter?: string, top?: number, skip?: number, orderBy?: string }): Promise> { + var path = this.buildUrl({ + url: `/api/v2/contacts`, parameters: { $filter: filter, $top: top, $skip: skip, $orderBy: orderBy } - }); - var strClientId = - this.appNM + - '; ' + - this.appVer + - '; JavascriptSdk; ' + this.apiVersion + '; ' + - this.machineNM; + }); + var strClientId = + this.appNM + + '; ' + + this.appVer + + '; JavascriptSdk; ' + this.apiVersion + '; ' + + this.machineNM; return this.restCall({ url: path, verb: 'get', payload: null, clientId: strClientId }, FetchResult); - } - - /** - * Update a single contact + } + + /** + * 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. @@ -3447,150 +3543,150 @@ export default class AvaTaxClient { * * ### Security Policies * - * * This API requires one of the following user roles: AccountAdmin, BatchServiceAdmin, CompanyAdmin, CSPTester, FirmAdmin, SSTAdmin, TechnicalSupportAdmin. - * Swagger Name: AvaTaxClient - * + * * This API requires one of the following user roles: AccountAdmin, BatchServiceAdmin, CompanyAdmin, CSPTester, FirmAdmin, SSTAdmin, TechnicalSupportAdmin. + * Swagger Name: AvaTaxClient + * * * @param {number} companyId The ID of the company that this contact belongs to. * @param {number} id The ID of the contact you wish to update - * @param {Models.ContactModel} model The contact you wish to update. - * @return {Models.ContactModel} - */ - - updateContact({ companyId, id, model }: { companyId: number, id: number, model: Models.ContactModel }): Promise { - var path = this.buildUrl({ - url: `/api/v2/companies/${companyId}/contacts/${id}`, - parameters: {} - }); - var strClientId = - this.appNM + - '; ' + - this.appVer + - '; JavascriptSdk; ' + this.apiVersion + '; ' + - this.machineNM; + * @param {Models.ContactModel} model The contact you wish to update. + * @return {Models.ContactModel} + */ + + updateContact({ companyId, id, model }: { companyId: number, id: number, model: Models.ContactModel }): Promise { + var path = this.buildUrl({ + url: `/api/v2/companies/${companyId}/contacts/${id}`, + parameters: {} + }); + var strClientId = + this.appNM + + '; ' + + this.appVer + + '; JavascriptSdk; ' + this.apiVersion + '; ' + + this.machineNM; return this.restCall({ url: path, verb: 'put', payload: model, clientId: strClientId }, Models.ContactModel); - } - - /** - * Bulk upload cost centers - * Allows bulk upload of cost centers for the specified company. Use the companyId path parameter to identify the company for which the cost centers should be uploaded. - * Swagger Name: AvaTaxClient - * + } + + /** + * Bulk upload cost centers + * Allows bulk upload of cost centers for the specified company. Use the companyId path parameter to identify the company for which the cost centers should be uploaded. + * Swagger Name: AvaTaxClient + * * * @param {number} companyid The ID of the company that owns this cost center object - * @param {Models.CostCenterBulkUploadInputModel} model The cost center bulk upload model. - * @return {Models.CostCenterBulkUploadOutputModel} - */ - - bulkUploadCostCenters({ companyid, model }: { companyid: number, model?: Models.CostCenterBulkUploadInputModel }): Promise { - var path = this.buildUrl({ - url: `/api/v2/companies/${companyid}/costcenters/$upload`, - parameters: {} - }); - var strClientId = - this.appNM + - '; ' + - this.appVer + - '; JavascriptSdk; ' + this.apiVersion + '; ' + - this.machineNM; + * @param {Models.CostCenterBulkUploadInputModel} model The cost center bulk upload model. + * @return {Models.CostCenterBulkUploadOutputModel} + */ + + bulkUploadCostCenters({ companyid, model }: { companyid: number, model?: Models.CostCenterBulkUploadInputModel }): Promise { + var path = this.buildUrl({ + url: `/api/v2/companies/${companyid}/costcenters/$upload`, + parameters: {} + }); + var strClientId = + this.appNM + + '; ' + + this.appVer + + '; JavascriptSdk; ' + this.apiVersion + '; ' + + this.machineNM; return this.restCall({ url: path, verb: 'post', payload: model, clientId: strClientId }, Models.CostCenterBulkUploadOutputModel); - } - - /** - * Create new cost center + } + + /** + * Create new cost center * Creates one or more new item objects attached to this company. * - * Costcenter is defined as function or department within a company which is not directly going to generate revenues and profits to the company but is still incurring expenses to the company for its operations. - * Swagger Name: AvaTaxClient - * + * Costcenter is defined as function or department within a company which is not directly going to generate revenues and profits to the company but is still incurring expenses to the company for its operations. + * Swagger Name: AvaTaxClient + * * * @param {number} companyid The ID of the company that owns this cost center object - * @param {Models.CostCenterRequestModel} model The cost center you wish to create. - * @return {Models.CostCenterSuccessResponseModel} - */ - - createCostCenter({ companyid, model }: { companyid: number, model?: Models.CostCenterRequestModel }): Promise { - var path = this.buildUrl({ - url: `/api/v2/companies/${companyid}/costcenters`, - parameters: {} - }); - var strClientId = - this.appNM + - '; ' + - this.appVer + - '; JavascriptSdk; ' + this.apiVersion + '; ' + - this.machineNM; + * @param {Models.CostCenterRequestModel} model The cost center you wish to create. + * @return {Models.CostCenterSuccessResponseModel} + */ + + createCostCenter({ companyid, model }: { companyid: number, model?: Models.CostCenterRequestModel }): Promise { + var path = this.buildUrl({ + url: `/api/v2/companies/${companyid}/costcenters`, + parameters: {} + }); + var strClientId = + this.appNM + + '; ' + + this.appVer + + '; JavascriptSdk; ' + this.apiVersion + '; ' + + this.machineNM; return this.restCall({ url: path, verb: 'post', payload: model, clientId: strClientId }, Models.CostCenterSuccessResponseModel); - } - - /** - * Delete cost center for the given id - * Deletes a cost center with the specified costcenterId that belongs to the company. - * Swagger Name: AvaTaxClient - * + } + + /** + * Delete cost center for the given id + * Deletes a cost center with the specified costcenterId that belongs to the company. + * Swagger Name: AvaTaxClient + * * * @param {number} companyid The ID of the company that owns this cost center object - * @param {number} costcenterid The primary key of this cost center - * @return {Models.TaxProfileErrorResponseModel} - */ - - deleteCostCenter({ companyid, costcenterid }: { companyid: number, costcenterid: number }): Promise { - var path = this.buildUrl({ - url: `/api/v2/companies/${companyid}/costcenters/${costcenterid}`, - parameters: {} - }); - var strClientId = - this.appNM + - '; ' + - this.appVer + - '; JavascriptSdk; ' + this.apiVersion + '; ' + - this.machineNM; + * @param {number} costcenterid The primary key of this cost center + * @return {Models.TaxProfileErrorResponseModel} + */ + + deleteCostCenter({ companyid, costcenterid }: { companyid: number, costcenterid: number }): Promise { + var path = this.buildUrl({ + url: `/api/v2/companies/${companyid}/costcenters/${costcenterid}`, + parameters: {} + }); + var strClientId = + this.appNM + + '; ' + + this.appVer + + '; JavascriptSdk; ' + this.apiVersion + '; ' + + this.machineNM; return this.restCall({ url: path, verb: 'delete', payload: null, clientId: strClientId }, Models.TaxProfileErrorResponseModel); - } - - /** - * Retrieve a single cost center - * Retrieves details of a single cost center identified by costcenterId, which is owned by the company. - * Swagger Name: AvaTaxClient - * + } + + /** + * Retrieve a single cost center + * Retrieves details of a single cost center identified by costcenterId, which is owned by the company. + * Swagger Name: AvaTaxClient + * * * @param {number} companyid The ID of the company that owns this cost center object - * @param {number} costcenterid The primary key of this cost center - * @return {Models.CostCenterSuccessResponseModel} - */ - - getCostCenterById({ companyid, costcenterid }: { companyid: number, costcenterid: number }): Promise { - var path = this.buildUrl({ - url: `/api/v2/companies/${companyid}/costcenters/${costcenterid}`, - parameters: {} - }); - var strClientId = - this.appNM + - '; ' + - this.appVer + - '; JavascriptSdk; ' + this.apiVersion + '; ' + - this.machineNM; + * @param {number} costcenterid The primary key of this cost center + * @return {Models.CostCenterSuccessResponseModel} + */ + + getCostCenterById({ companyid, costcenterid }: { companyid: number, costcenterid: number }): Promise { + var path = this.buildUrl({ + url: `/api/v2/companies/${companyid}/costcenters/${costcenterid}`, + parameters: {} + }); + var strClientId = + this.appNM + + '; ' + + this.appVer + + '; JavascriptSdk; ' + this.apiVersion + '; ' + + this.machineNM; return this.restCall({ url: path, verb: 'get', payload: null, clientId: strClientId }, Models.CostCenterSuccessResponseModel); - } - - /** - * Retrieve cost centers for this company - * Retrieves a list of cost centers attached to this company. You can apply filters to retrieve specific records. - * Swagger Name: AvaTaxClient - * + } + + /** + * Retrieve cost centers for this company + * Retrieves a list of cost centers attached to this company. You can apply filters to retrieve specific records. + * Swagger Name: AvaTaxClient + * * * @param {number} companyid The ID of the company that defined these cost centers * @param {string} filter A filter statement to identify specific records to retrieve. For more information on filtering, see [Filtering in REST](http://developer.avalara.com/avatax/filtering-in-rest/).
*Not filterable:* companyId, meta, defaultItem * @param {string} include A comma separated list of objects to fetch underneath this company. Any object with a URL path underneath this company can be fetched by specifying its name. * @param {number} top If nonzero, return no more than this number of results. Used with `$skip` to provide pagination for large datasets. Unless otherwise specified, the maximum number of records that can be returned from an API call is 1,000 records. * @param {number} skip If nonzero, skip this number of results before returning data. Used with `$top` to provide pagination for large datasets. - * @param {string} orderBy A comma separated list of sort statements in the format `(fieldname) [ASC|DESC]`, for example `id ASC`. - * @return {FetchResult} - */ - - listCostCentersByCompany({ companyid, filter, include, top, skip, orderBy }: { companyid: number, filter?: string, include?: string, top?: number, skip?: number, orderBy?: string }): Promise> { - var path = this.buildUrl({ - url: `/api/v2/companies/${companyid}/costcenters`, + * @param {string} orderBy A comma separated list of sort statements in the format `(fieldname) [ASC|DESC]`, for example `id ASC`. + * @return {FetchResult} + */ + + listCostCentersByCompany({ companyid, filter, include, top, skip, orderBy }: { companyid: number, filter?: string, include?: string, top?: number, skip?: number, orderBy?: string }): Promise> { + var path = this.buildUrl({ + url: `/api/v2/companies/${companyid}/costcenters`, parameters: { $filter: filter, $include: include, @@ -3598,33 +3694,33 @@ export default class AvaTaxClient { $skip: skip, $orderBy: orderBy } - }); - var strClientId = - this.appNM + - '; ' + - this.appVer + - '; JavascriptSdk; ' + this.apiVersion + '; ' + - this.machineNM; + }); + var strClientId = + this.appNM + + '; ' + + this.appVer + + '; JavascriptSdk; ' + this.apiVersion + '; ' + + this.machineNM; return this.restCall({ url: path, verb: 'get', payload: null, clientId: strClientId }, FetchResult); - } - - /** - * Retrieve all cost centers - * Retrieves all cost centers available. You can apply filters to retrieve specific records. - * Swagger Name: AvaTaxClient - * + } + + /** + * Retrieve all cost centers + * Retrieves all cost centers available. You can apply filters to retrieve specific records. + * 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:* companyId, meta, defaultItem * @param {string} include A comma separated list of objects to fetch underneath this company. Any object with a URL path underneath this company can be fetched by specifying its name. * @param {number} top If nonzero, return no more than this number of results. Used with `$skip` to provide pagination for large datasets. Unless otherwise specified, the maximum number of records that can be returned from an API call is 1,000 records. * @param {number} skip If nonzero, skip this number of results before returning data. Used with `$top` to provide pagination for large datasets. - * @param {string} orderBy A comma separated list of sort statements in the format `(fieldname) [ASC|DESC]`, for example `id ASC`. - * @return {FetchResult} - */ - - queryCostCenters({ filter, include, top, skip, orderBy }: { filter?: string, include?: string, top?: number, skip?: number, orderBy?: string }): Promise> { - var path = this.buildUrl({ - url: `/api/v2/costcenters`, + * @param {string} orderBy A comma separated list of sort statements in the format `(fieldname) [ASC|DESC]`, for example `id ASC`. + * @return {FetchResult} + */ + + queryCostCenters({ filter, include, top, skip, orderBy }: { filter?: string, include?: string, top?: number, skip?: number, orderBy?: string }): Promise> { + var path = this.buildUrl({ + url: `/api/v2/costcenters`, parameters: { $filter: filter, $include: include, @@ -3632,44 +3728,44 @@ export default class AvaTaxClient { $skip: skip, $orderBy: orderBy } - }); - var strClientId = - this.appNM + - '; ' + - this.appVer + - '; JavascriptSdk; ' + this.apiVersion + '; ' + - this.machineNM; + }); + var strClientId = + this.appNM + + '; ' + + this.appVer + + '; JavascriptSdk; ' + this.apiVersion + '; ' + + this.machineNM; return this.restCall({ url: path, verb: 'get', payload: null, clientId: strClientId }, FetchResult); - } - - /** - * Update a single cost center - * Updates a single cost center owned by the company. Use the costcenterId path parameter to identify the cost center to update. - * Swagger Name: AvaTaxClient - * + } + + /** + * Update a single cost center + * Updates a single cost center owned by the company. Use the costcenterId path parameter to identify the cost center to update. + * Swagger Name: AvaTaxClient + * * * @param {number} companyid The ID of the company that owns this cost center object * @param {number} costcenterid The primary key of this cost center - * @param {Models.CostCenterRequestModel} model The cost center object you wish to update. - * @return {Models.CostCenterSuccessResponseModel} - */ - - updateCostCenter({ companyid, costcenterid, model }: { companyid: number, costcenterid: number, model?: Models.CostCenterRequestModel }): Promise { - var path = this.buildUrl({ - url: `/api/v2/companies/${companyid}/costcenters/${costcenterid}`, - parameters: {} - }); - var strClientId = - this.appNM + - '; ' + - this.appVer + - '; JavascriptSdk; ' + this.apiVersion + '; ' + - this.machineNM; + * @param {Models.CostCenterRequestModel} model The cost center object you wish to update. + * @return {Models.CostCenterSuccessResponseModel} + */ + + updateCostCenter({ companyid, costcenterid, model }: { companyid: number, costcenterid: number, model?: Models.CostCenterRequestModel }): Promise { + var path = this.buildUrl({ + url: `/api/v2/companies/${companyid}/costcenters/${costcenterid}`, + parameters: {} + }); + var strClientId = + this.appNM + + '; ' + + this.appVer + + '; JavascriptSdk; ' + this.apiVersion + '; ' + + this.machineNM; return this.restCall({ url: path, verb: 'put', payload: model, clientId: strClientId }, Models.CostCenterSuccessResponseModel); - } - - /** - * Create customers for this company + } + + /** + * 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 @@ -3689,31 +3785,31 @@ export default class AvaTaxClient { * ### Security Policies * * * This API requires one of the following user roles: AccountAdmin, AccountOperator, AccountUser, BatchServiceAdmin, CompanyAdmin, CompanyUser, CSPTester, SSTAdmin, TechnicalSupportAdmin. - * * This API depends on the following active services:*Required* (all): AvaTaxPro, ECMEssentials, ECMPro, ECMPremium, VEMPro, VEMPremium, ECMProComms, ECMPremiumComms. - * Swagger Name: AvaTaxClient - * + * * This API depends on the following active services:*Required* (all): AvaTaxPro, ECMEssentials, ECMPro, ECMPremium, VEMPro, VEMPremium, ECMProComms, ECMPremiumComms. + * Swagger Name: AvaTaxClient + * * * @param {number} companyId The unique ID number of the company that recorded this customer - * @param {Models.CustomerModel[]} model The list of customer objects to be created - * @return {Models.CustomerModel[]} - */ - - createCustomers({ companyId, model }: { companyId: number, model: Models.CustomerModel[] }): Promise> { - var path = this.buildUrl({ - url: `/api/v2/companies/${companyId}/customers`, - parameters: {} - }); - var strClientId = - this.appNM + - '; ' + - this.appVer + - '; JavascriptSdk; ' + this.apiVersion + '; ' + - this.machineNM; + * @param {Models.CustomerModel[]} model The list of customer objects to be created + * @return {Models.CustomerModel[]} + */ + + createCustomers({ companyId, model }: { companyId: number, model: Models.CustomerModel[] }): Promise> { + var path = this.buildUrl({ + url: `/api/v2/companies/${companyId}/customers`, + parameters: {} + }); + var strClientId = + this.appNM + + '; ' + + this.appVer + + '; JavascriptSdk; ' + this.apiVersion + '; ' + + this.machineNM; return this.restCall({ url: path, verb: 'post', payload: model, clientId: strClientId }, Array); - } - - /** - * Delete a customer record + } + + /** + * 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 @@ -3730,31 +3826,31 @@ export default class AvaTaxClient { * ### Security Policies * * * This API requires one of the following user roles: AccountAdmin, AccountOperator, AccountUser, BatchServiceAdmin, CompanyAdmin, CompanyUser, CSPTester, SSTAdmin, TechnicalSupportAdmin. - * * This API depends on the following active services:*Required* (all): AvaTaxPro, ECMEssentials, ECMPro, ECMPremium, VEMPro, VEMPremium, ECMProComms, ECMPremiumComms. - * Swagger Name: AvaTaxClient - * + * * This API depends on the following active services:*Required* (all): AvaTaxPro, ECMEssentials, ECMPro, ECMPremium, VEMPro, VEMPremium, ECMProComms, ECMPremiumComms. + * Swagger Name: AvaTaxClient + * * * @param {number} companyId The unique ID number of the company that recorded this customer - * @param {string} customerCode The unique code representing this customer - * @return {} - */ - - deleteCustomer({ companyId, customerCode }: { companyId: number, customerCode: string }): Promise { - var path = this.buildUrl({ - url: `/api/v2/companies/${companyId}/customers/${customerCode}`, - parameters: {} - }); - var strClientId = - this.appNM + - '; ' + - this.appVer + - '; JavascriptSdk; ' + this.apiVersion + '; ' + - this.machineNM; + * @param {string} customerCode The unique code representing this customer + * @return {} + */ + + deleteCustomer({ companyId, customerCode }: { companyId: number, customerCode: string }): Promise { + var path = this.buildUrl({ + url: `/api/v2/companies/${companyId}/customers/${customerCode}`, + parameters: {} + }); + var strClientId = + this.appNM + + '; ' + + this.appVer + + '; JavascriptSdk; ' + this.apiVersion + '; ' + + this.machineNM; return this.restCall({ url: path, verb: 'delete', payload: null, clientId: strClientId }, null); - } - - /** - * Retrieve a single customer + } + + /** + * 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 @@ -3765,9 +3861,16 @@ export default class AvaTaxClient { * * You can use the `$include` parameter to fetch the following additional objects for expansion: * - * * Certificates - Fetch a list of certificates linked to this customer. - * * CustomFields - Fetch a list of custom fields associated to this customer. + * * certificates - Fetch a list of certificates linked to this customer. * * attributes - Retrieves all attributes applied to the customer. + * * active_certificates - Retrieves all the active certificates linked to this customer + * * histories - Retrieves the update history for this customer + * * logs - Retrieves customer logs + * * jobs - Retrieves customer jobs + * * billTos - Retrieves bill-tos linked with this customer + * * shipTos - Retrieves ship-tos linked with this customer + * * shipToStates - Retrieves ship-to states for this customer + * * custom_fields - Retrieves custom fields set for this customer * * Before you can use any exemption certificates endpoints, you must set up your company for exemption certificate data storage. * Companies that do not have this storage system set up will see `CertCaptureNotConfiguredError` when they call exemption @@ -3777,34 +3880,34 @@ export default class AvaTaxClient { * ### Security Policies * * * This API requires one of the following user roles: AccountAdmin, AccountOperator, AccountUser, BatchServiceAdmin, CompanyAdmin, CompanyUser, CSPTester, SSTAdmin, TechnicalSupportAdmin, TechnicalSupportUser. - * * This API depends on the following active services:*Required* (all): AvaTaxPro, ECMEssentials, ECMPro, ECMPremium, VEMPro, VEMPremium, ECMProComms, ECMPremiumComms. - * Swagger Name: AvaTaxClient - * + * * This API depends on the following active services:*Required* (all): AvaTaxPro, ECMEssentials, ECMPro, ECMPremium, VEMPro, VEMPremium, ECMProComms, ECMPremiumComms. + * Swagger Name: AvaTaxClient + * * * @param {number} 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 {Models.CustomerModel} - */ - - getCustomer({ companyId, customerCode, include }: { companyId: number, customerCode: string, include?: string }): Promise { - 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 {Models.CustomerModel} + */ + + getCustomer({ companyId, customerCode, include }: { companyId: number, customerCode: string, include?: string }): Promise { + var path = this.buildUrl({ + url: `/api/v2/companies/${companyId}/customers/${customerCode}`, parameters: { $include: include } - }); - var strClientId = - this.appNM + - '; ' + - this.appVer + - '; JavascriptSdk; ' + this.apiVersion + '; ' + - this.machineNM; + }); + var strClientId = + this.appNM + + '; ' + + this.appVer + + '; JavascriptSdk; ' + this.apiVersion + '; ' + + this.machineNM; return this.restCall({ url: path, verb: 'get', payload: null, clientId: strClientId }, Models.CustomerModel); - } - - /** - * Link attributes to a customer + } + + /** + * 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 @@ -3824,32 +3927,32 @@ export default class AvaTaxClient { * ### Security Policies * * * This API requires one of the following user roles: AccountAdmin, AccountOperator, AccountUser, BatchServiceAdmin, CompanyAdmin, CompanyUser, CSPTester, SSTAdmin, TechnicalSupportAdmin. - * * This API depends on the following active services:*Required* (all): AvaTaxPro, ECMEssentials, ECMPro, ECMPremium, VEMPro, VEMPremium, ECMProComms, ECMPremiumComms. - * Swagger Name: AvaTaxClient - * + * * This API depends on the following active services:*Required* (all): AvaTaxPro, ECMEssentials, ECMPro, ECMPremium, VEMPro, VEMPremium, ECMProComms, ECMPremiumComms. + * Swagger Name: AvaTaxClient + * * * @param {number} companyId The unique ID number of the company that recorded the provided customer * @param {string} customerCode The unique code representing the current customer - * @param {Models.CustomerAttributeModel[]} model The list of attributes to link to the customer. - * @return {FetchResult} - */ - - linkAttributesToCustomer({ companyId, customerCode, model }: { companyId: number, customerCode: string, model: Models.CustomerAttributeModel[] }): Promise> { - var path = this.buildUrl({ - url: `/api/v2/companies/${companyId}/customers/${customerCode}/attributes/link`, - parameters: {} - }); - var strClientId = - this.appNM + - '; ' + - this.appVer + - '; JavascriptSdk; ' + this.apiVersion + '; ' + - this.machineNM; + * @param {Models.CustomerAttributeModel[]} model The list of attributes to link to the customer. + * @return {FetchResult} + */ + + linkAttributesToCustomer({ companyId, customerCode, model }: { companyId: number, customerCode: string, model: Models.CustomerAttributeModel[] }): Promise> { + var path = this.buildUrl({ + url: `/api/v2/companies/${companyId}/customers/${customerCode}/attributes/link`, + parameters: {} + }); + var strClientId = + this.appNM + + '; ' + + this.appVer + + '; JavascriptSdk; ' + this.apiVersion + '; ' + + this.machineNM; return this.restCall({ url: path, verb: 'put', payload: model, clientId: strClientId }, FetchResult); - } - - /** - * Link certificates to a customer + } + + /** + * 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 @@ -3866,32 +3969,32 @@ export default class AvaTaxClient { * ### Security Policies * * * This API requires one of the following user roles: AccountAdmin, AccountOperator, AccountUser, BatchServiceAdmin, CompanyAdmin, CompanyUser, CSPTester, SSTAdmin, TechnicalSupportAdmin, TechnicalSupportUser. - * * This API depends on the following active services:*Required* (all): AvaTaxPro, ECMEssentials, ECMPro, ECMPremium, VEMPro, VEMPremium, ECMProComms, ECMPremiumComms. - * Swagger Name: AvaTaxClient - * + * * This API depends on the following active services:*Required* (all): AvaTaxPro, ECMEssentials, ECMPro, ECMPremium, VEMPro, VEMPremium, ECMProComms, ECMPremiumComms. + * Swagger Name: AvaTaxClient + * * * @param {number} companyId The unique ID number of the company that recorded this customer * @param {string} customerCode The unique code representing this customer - * @param {Models.LinkCertificatesModel} model The list of certificates to link to this customer - * @return {FetchResult} - */ - - linkCertificatesToCustomer({ companyId, customerCode, model }: { companyId: number, customerCode: string, model: Models.LinkCertificatesModel }): Promise> { - var path = this.buildUrl({ - url: `/api/v2/companies/${companyId}/customers/${customerCode}/certificates/link`, - parameters: {} - }); - var strClientId = - this.appNM + - '; ' + - this.appVer + - '; JavascriptSdk; ' + this.apiVersion + '; ' + - this.machineNM; + * @param {Models.LinkCertificatesModel} model The list of certificates to link to this customer + * @return {FetchResult} + */ + + linkCertificatesToCustomer({ companyId, customerCode, model }: { companyId: number, customerCode: string, model: Models.LinkCertificatesModel }): Promise> { + var path = this.buildUrl({ + url: `/api/v2/companies/${companyId}/customers/${customerCode}/certificates/link`, + parameters: {} + }); + var strClientId = + this.appNM + + '; ' + + this.appVer + + '; JavascriptSdk; ' + this.apiVersion + '; ' + + this.machineNM; return this.restCall({ url: path, verb: 'post', payload: model, clientId: strClientId }, FetchResult); - } - - /** - * Link two customer records together + } + + /** + * 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 @@ -3909,32 +4012,32 @@ export default class AvaTaxClient { * ### Security Policies * * * This API requires one of the following user roles: AccountAdmin, AccountOperator, AccountUser, BatchServiceAdmin, CompanyAdmin, CompanyUser, CSPTester, SSTAdmin, TechnicalSupportAdmin, TechnicalSupportUser. - * * This API depends on the following active services:*Required* (all): AvaTaxPro, ECMEssentials, ECMPro, ECMPremium, VEMPro, VEMPremium, ECMProComms, ECMPremiumComms. - * Swagger Name: AvaTaxClient - * + * * This API depends on the following active services:*Required* (all): AvaTaxPro, ECMEssentials, ECMPro, ECMPremium, VEMPro, VEMPremium, ECMProComms, ECMPremiumComms. + * Swagger Name: AvaTaxClient + * * * @param {number} companyId The unique ID number of the company defining customers. * @param {string} code The code of the bill-to customer to link. - * @param {Models.LinkCustomersModel} model A list of information about ship-to customers to link to this bill-to customer. - * @return {Models.CustomerModel} - */ - - linkShipToCustomersToBillCustomer({ companyId, code, model }: { companyId: number, code: string, model: Models.LinkCustomersModel }): Promise { - var path = this.buildUrl({ - url: `/api/v2/companies/${companyId}/customers/billto/${code}/shipto/link`, - parameters: {} - }); - var strClientId = - this.appNM + - '; ' + - this.appVer + - '; JavascriptSdk; ' + this.apiVersion + '; ' + - this.machineNM; + * @param {Models.LinkCustomersModel} model A list of information about ship-to customers to link to this bill-to customer. + * @return {Models.CustomerModel} + */ + + linkShipToCustomersToBillCustomer({ companyId, code, model }: { companyId: number, code: string, model: Models.LinkCustomersModel }): Promise { + var path = this.buildUrl({ + url: `/api/v2/companies/${companyId}/customers/billto/${code}/shipto/link`, + parameters: {} + }); + var strClientId = + this.appNM + + '; ' + + this.appVer + + '; JavascriptSdk; ' + this.apiVersion + '; ' + + this.machineNM; return this.restCall({ url: path, verb: 'post', payload: model, clientId: strClientId }, Models.CustomerModel); - } - - /** - * Retrieve a customer's attributes + } + + /** + * 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 @@ -3954,31 +4057,31 @@ export default class AvaTaxClient { * ### Security Policies * * * This API requires one of the following user roles: AccountAdmin, AccountOperator, AccountUser, BatchServiceAdmin, CompanyAdmin, CompanyUser, CSPTester, SSTAdmin, TechnicalSupportAdmin, TechnicalSupportUser. - * * This API depends on the following active services:*Required* (all): AvaTaxPro, ECMEssentials, ECMPro, ECMPremium, VEMPro, VEMPremium, ECMProComms, ECMPremiumComms. - * Swagger Name: AvaTaxClient - * + * * This API depends on the following active services:*Required* (all): AvaTaxPro, ECMEssentials, ECMPro, ECMPremium, VEMPro, VEMPremium, ECMProComms, ECMPremiumComms. + * Swagger Name: AvaTaxClient + * * * @param {number} 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 }: { companyId: number, customerCode: string }): Promise> { - var path = this.buildUrl({ - url: `/api/v2/companies/${companyId}/customers/${customerCode}/attributes`, - parameters: {} - }); - var strClientId = - this.appNM + - '; ' + - this.appVer + - '; JavascriptSdk; ' + this.apiVersion + '; ' + - this.machineNM; + * @param {string} customerCode The unique code representing the current customer + * @return {FetchResult} + */ + + listAttributesForCustomer({ companyId, customerCode }: { companyId: number, customerCode: string }): Promise> { + var path = this.buildUrl({ + url: `/api/v2/companies/${companyId}/customers/${customerCode}/attributes`, + parameters: {} + }); + var strClientId = + this.appNM + + '; ' + + this.appVer + + '; JavascriptSdk; ' + this.apiVersion + '; ' + + this.machineNM; return this.restCall({ url: path, verb: 'get', payload: null, clientId: strClientId }, FetchResult); - } - - /** - * List certificates linked to a customer + } + + /** + * 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 @@ -3995,23 +4098,23 @@ export default class AvaTaxClient { * ### Security Policies * * * This API requires one of the following user roles: AccountAdmin, AccountOperator, AccountUser, BatchServiceAdmin, CompanyAdmin, CompanyUser, CSPTester, SSTAdmin, TechnicalSupportAdmin, TechnicalSupportUser. - * * This API depends on the following active services:*Required* (all): AvaTaxPro, ECMEssentials, ECMPro, ECMPremium, VEMPro, VEMPremium, ECMProComms, ECMPremiumComms. - * Swagger Name: AvaTaxClient - * + * * This API depends on the following active services:*Required* (all): AvaTaxPro, ECMEssentials, ECMPro, ECMPremium, VEMPro, VEMPremium, ECMProComms, ECMPremiumComms. + * Swagger Name: AvaTaxClient + * * * @param {number} companyId The unique ID number of the company that recorded this customer * @param {string} customerCode The unique code representing this customer - * @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} 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. * histories - Retrieves the certificate update history * jobs - Retrieves the jobs for this certificate * logs - Retrieves the certificate log * invalid_reasons - Retrieves invalid reasons for this certificate if the certificate is invalid * custom_fields - Retrieves custom fields set for this 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, ecmStatus, ecmsId, ecmsStatus, pdf, pages * @param {number} top If nonzero, return no more than this number of results. Used with `$skip` to provide pagination for large datasets. Unless otherwise specified, the maximum number of records that can be returned from an API call is 1,000 records. * @param {number} skip If nonzero, skip this number of results before returning data. Used with `$top` to provide pagination for large datasets. - * @param {string} orderBy A comma separated list of sort statements in the format `(fieldname) [ASC|DESC]`, for example `id ASC`. - * @return {FetchResult} - */ - - listCertificatesForCustomer({ companyId, customerCode, include, filter, top, skip, orderBy }: { companyId: number, customerCode: string, include?: string, filter?: string, top?: number, skip?: number, orderBy?: string }): Promise> { - 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 }: { companyId: number, customerCode: string, include?: string, filter?: string, top?: number, skip?: number, orderBy?: string }): Promise> { + var path = this.buildUrl({ + url: `/api/v2/companies/${companyId}/customers/${customerCode}/certificates`, parameters: { $include: include, $filter: filter, @@ -4019,18 +4122,18 @@ export default class AvaTaxClient { $skip: skip, $orderBy: orderBy } - }); - var strClientId = - this.appNM + - '; ' + - this.appVer + - '; JavascriptSdk; ' + this.apiVersion + '; ' + - this.machineNM; + }); + var strClientId = + this.appNM + + '; ' + + this.appVer + + '; JavascriptSdk; ' + this.apiVersion + '; ' + + this.machineNM; return this.restCall({ url: path, verb: 'get', payload: null, clientId: strClientId }, FetchResult); - } - - /** - * List valid certificates for a location + } + + /** + * 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 @@ -4050,33 +4153,33 @@ export default class AvaTaxClient { * ### Security Policies * * * This API requires one of the following user roles: AccountAdmin, AccountOperator, AccountUser, BatchServiceAdmin, CompanyAdmin, CompanyUser, CSPTester, SSTAdmin, TechnicalSupportAdmin, TechnicalSupportUser. - * * This API depends on the following active services:*Required* (all): AvaTaxPro, ECMEssentials, ECMPro, ECMPremium, VEMPro, VEMPremium, ECMProComms, ECMPremiumComms. - * Swagger Name: AvaTaxClient - * + * * This API depends on the following active services:*Required* (all): AvaTaxPro, ECMEssentials, ECMPro, ECMPremium, VEMPro, VEMPremium, ECMProComms, ECMPremiumComms. + * Swagger Name: AvaTaxClient + * * * @param {number} 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 {Models.ExemptionStatusModel} - */ - - listValidCertificatesForCustomer({ companyId, customerCode, country, region }: { companyId: number, customerCode: string, country: string, region: string }): Promise { - var path = this.buildUrl({ - url: `/api/v2/companies/${companyId}/customers/${customerCode}/certificates/${country}/${region}`, - parameters: {} - }); - var strClientId = - this.appNM + - '; ' + - this.appVer + - '; JavascriptSdk; ' + this.apiVersion + '; ' + - this.machineNM; + * @param {string} region Search for certificates matching this region. Uses the ISO 3166 two or three character state, region, or province code. + * @return {Models.ExemptionStatusModel} + */ + + listValidCertificatesForCustomer({ companyId, customerCode, country, region }: { companyId: number, customerCode: string, country: string, region: string }): Promise { + var path = this.buildUrl({ + url: `/api/v2/companies/${companyId}/customers/${customerCode}/certificates/${country}/${region}`, + parameters: {} + }); + var strClientId = + this.appNM + + '; ' + + this.appVer + + '; JavascriptSdk; ' + this.apiVersion + '; ' + + this.machineNM; return this.restCall({ url: path, verb: 'get', payload: null, clientId: strClientId }, Models.ExemptionStatusModel); - } - - /** - * List all customers for this company + } + + /** + * 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 @@ -4087,9 +4190,17 @@ export default class AvaTaxClient { * * You can use the `$include` parameter to fetch the following additional objects for expansion: * - * * Certificates - Fetch a list of certificates linked to this customer. + * * certificates - Fetch a list of certificates linked to this customer. * * attributes - Retrieves all attributes applied to the customer. - * + * * active_certificates - Retrieves all the active certificates linked to this customer + * * histories - Retrieves the update history for this customer + * * logs - Retrieves customer logs + * * jobs - Retrieves customer jobs + * * billTos - Retrieves bill-tos linked with this customer + * * shipTos - Retrieves ship-tos linked with this customer + * * shipToStates - Retrieves ship-to states for this customer + * * custom_fields - Retrieves custom fields set for this customer + * * Before you can use any exemption certificates endpoints, you must set up your company for exemption certificate data storage. * Companies that do not have this storage system set up will see `CertCaptureNotConfiguredError` when they call exemption * certificate related APIs. To check if this is set up for a company, call `GetCertificateSetup`. To request setup of exemption @@ -4098,22 +4209,22 @@ export default class AvaTaxClient { * ### Security Policies * * * This API requires one of the following user roles: AccountAdmin, AccountOperator, AccountUser, BatchServiceAdmin, CompanyAdmin, CompanyUser, CSPTester, SSTAdmin, TechnicalSupportAdmin, TechnicalSupportUser. - * * This API depends on the following active services:*Required* (all): AvaTaxPro, ECMEssentials, ECMPro, ECMPremium, VEMPro, VEMPremium, ECMProComms, ECMPremiumComms. - * Swagger Name: AvaTaxClient - * + * * This API depends on the following active services:*Required* (all): AvaTaxPro, ECMEssentials, ECMPro, ECMPremium, VEMPro, VEMPremium, ECMProComms, ECMPremiumComms. + * Swagger Name: AvaTaxClient + * * * @param {number} 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} include OPTIONAL - You can specify any of the values in `certificates`, `attributes`, `active_certificates`, `histories`, `logs`, `jobs`, `billTos`, `shipTos`, `shipToStates`, and `custom_fields` to fetch additional information for this 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/). * @param {number} top If nonzero, return no more than this number of results. Used with `$skip` to provide pagination for large datasets. Unless otherwise specified, the maximum number of records that can be returned from an API call is 1,000 records. * @param {number} skip If nonzero, skip this number of results before returning data. Used with `$top` to provide pagination for large datasets. - * @param {string} orderBy A comma separated list of sort statements in the format `(fieldname) [ASC|DESC]`, for example `id ASC`. - * @return {FetchResult} - */ - - queryCustomers({ companyId, include, filter, top, skip, orderBy }: { companyId: number, include?: string, filter?: string, top?: number, skip?: number, orderBy?: string }): Promise> { - 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 }: { companyId: number, include?: string, filter?: string, top?: number, skip?: number, orderBy?: string }): Promise> { + var path = this.buildUrl({ + url: `/api/v2/companies/${companyId}/customers`, parameters: { $include: include, $filter: filter, @@ -4121,18 +4232,18 @@ export default class AvaTaxClient { $skip: skip, $orderBy: orderBy } - }); - var strClientId = - this.appNM + - '; ' + - this.appVer + - '; JavascriptSdk; ' + this.apiVersion + '; ' + - this.machineNM; + }); + var strClientId = + this.appNM + + '; ' + + this.appVer + + '; JavascriptSdk; ' + this.apiVersion + '; ' + + this.machineNM; return this.restCall({ url: path, verb: 'get', payload: null, clientId: strClientId }, FetchResult); - } - - /** - * Unlink attributes from a customer + } + + /** + * 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 @@ -4152,32 +4263,32 @@ export default class AvaTaxClient { * ### Security Policies * * * This API requires one of the following user roles: AccountAdmin, AccountOperator, AccountUser, BatchServiceAdmin, CompanyAdmin, CompanyUser, CSPTester, SSTAdmin, TechnicalSupportAdmin. - * * This API depends on the following active services:*Required* (all): AvaTaxPro, ECMEssentials, ECMPro, ECMPremium, VEMPro, VEMPremium, ECMProComms, ECMPremiumComms. - * Swagger Name: AvaTaxClient - * + * * This API depends on the following active services:*Required* (all): AvaTaxPro, ECMEssentials, ECMPro, ECMPremium, VEMPro, VEMPremium, ECMProComms, ECMPremiumComms. + * Swagger Name: AvaTaxClient + * * * @param {number} companyId The unique ID number of the company that recorded the customer * @param {string} customerCode The unique code representing the current customer - * @param {Models.CustomerAttributeModel[]} model The list of attributes to unlink from the customer. - * @return {FetchResult} - */ - - unlinkAttributesFromCustomer({ companyId, customerCode, model }: { companyId: number, customerCode: string, model: Models.CustomerAttributeModel[] }): Promise> { - var path = this.buildUrl({ - url: `/api/v2/companies/${companyId}/customers/${customerCode}/attributes/unlink`, - parameters: {} - }); - var strClientId = - this.appNM + - '; ' + - this.appVer + - '; JavascriptSdk; ' + this.apiVersion + '; ' + - this.machineNM; + * @param {Models.CustomerAttributeModel[]} model The list of attributes to unlink from the customer. + * @return {FetchResult} + */ + + unlinkAttributesFromCustomer({ companyId, customerCode, model }: { companyId: number, customerCode: string, model: Models.CustomerAttributeModel[] }): Promise> { + var path = this.buildUrl({ + url: `/api/v2/companies/${companyId}/customers/${customerCode}/attributes/unlink`, + parameters: {} + }); + var strClientId = + this.appNM + + '; ' + + this.appVer + + '; JavascriptSdk; ' + this.apiVersion + '; ' + + this.machineNM; return this.restCall({ url: path, verb: 'put', payload: model, clientId: strClientId }, FetchResult); - } - - /** - * Unlink certificates from a customer + } + + /** + * 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 @@ -4194,32 +4305,32 @@ export default class AvaTaxClient { * ### Security Policies * * * This API requires one of the following user roles: AccountAdmin, AccountOperator, AccountUser, BatchServiceAdmin, CompanyAdmin, CompanyUser, CSPTester, SSTAdmin, TechnicalSupportAdmin, TechnicalSupportUser. - * * This API depends on the following active services:*Required* (all): AvaTaxPro, ECMEssentials, ECMPro, ECMPremium, VEMPro, VEMPremium, ECMProComms, ECMPremiumComms. - * Swagger Name: AvaTaxClient - * + * * This API depends on the following active services:*Required* (all): AvaTaxPro, ECMEssentials, ECMPro, ECMPremium, VEMPro, VEMPremium, ECMProComms, ECMPremiumComms. + * Swagger Name: AvaTaxClient + * * * @param {number} companyId The unique ID number of the company that recorded this customer * @param {string} customerCode The unique code representing this customer - * @param {Models.LinkCertificatesModel} model The list of certificates to link to this customer - * @return {FetchResult} - */ - - unlinkCertificatesFromCustomer({ companyId, customerCode, model }: { companyId: number, customerCode: string, model: Models.LinkCertificatesModel }): Promise> { - var path = this.buildUrl({ - url: `/api/v2/companies/${companyId}/customers/${customerCode}/certificates/unlink`, - parameters: {} - }); - var strClientId = - this.appNM + - '; ' + - this.appVer + - '; JavascriptSdk; ' + this.apiVersion + '; ' + - this.machineNM; + * @param {Models.LinkCertificatesModel} model The list of certificates to link to this customer + * @return {FetchResult} + */ + + unlinkCertificatesFromCustomer({ companyId, customerCode, model }: { companyId: number, customerCode: string, model: Models.LinkCertificatesModel }): Promise> { + var path = this.buildUrl({ + url: `/api/v2/companies/${companyId}/customers/${customerCode}/certificates/unlink`, + parameters: {} + }); + var strClientId = + this.appNM + + '; ' + + this.appVer + + '; JavascriptSdk; ' + this.apiVersion + '; ' + + this.machineNM; return this.restCall({ url: path, verb: 'post', payload: model, clientId: strClientId }, FetchResult); - } - - /** - * Update a single customer + } + + /** + * 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 @@ -4236,160 +4347,160 @@ export default class AvaTaxClient { * ### Security Policies * * * This API requires one of the following user roles: AccountAdmin, AccountOperator, AccountUser, BatchServiceAdmin, CompanyAdmin, CompanyUser, CSPTester, SSTAdmin, TechnicalSupportAdmin. - * * This API depends on the following active services:*Required* (all): AvaTaxPro, ECMEssentials, ECMPro, ECMPremium, VEMPro, VEMPremium, ECMProComms, ECMPremiumComms. - * Swagger Name: AvaTaxClient - * + * * This API depends on the following active services:*Required* (all): AvaTaxPro, ECMEssentials, ECMPro, ECMPremium, VEMPro, VEMPremium, ECMProComms, ECMPremiumComms. + * Swagger Name: AvaTaxClient + * * * @param {number} companyId The unique ID number of the company that recorded this customer * @param {string} customerCode The unique code representing this customer - * @param {Models.CustomerModel} model The new customer model that will replace the existing record at this URL - * @return {Models.CustomerModel} - */ - - updateCustomer({ companyId, customerCode, model }: { companyId: number, customerCode: string, model: Models.CustomerModel }): Promise { - var path = this.buildUrl({ - url: `/api/v2/companies/${companyId}/customers/${customerCode}`, - parameters: {} - }); - var strClientId = - this.appNM + - '; ' + - this.appVer + - '; JavascriptSdk; ' + this.apiVersion + '; ' + - this.machineNM; + * @param {Models.CustomerModel} model The new customer model that will replace the existing record at this URL + * @return {Models.CustomerModel} + */ + + updateCustomer({ companyId, customerCode, model }: { companyId: number, customerCode: string, model: Models.CustomerModel }): Promise { + var path = this.buildUrl({ + url: `/api/v2/companies/${companyId}/customers/${customerCode}`, + parameters: {} + }); + var strClientId = + this.appNM + + '; ' + + this.appVer + + '; JavascriptSdk; ' + this.apiVersion + '; ' + + this.machineNM; return this.restCall({ url: path, verb: 'put', payload: model, clientId: strClientId }, Models.CustomerModel); - } - - /** - * Create and store new datasources for the respective companies. + } + + /** + * 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, BatchServiceAdmin, CompanyAdmin, CSPTester, FirmAdmin, Registrar, SiteAdmin, SSTAdmin, SystemAdmin, TechnicalSupportAdmin. - * * This API depends on the following active services:*Required* (all): AvaTaxPro, BasicReturns. - * Swagger Name: AvaTaxClient - * + * * This API depends on the following active services:*Required* (all): AvaTaxPro, BasicReturns. + * Swagger Name: AvaTaxClient + * * * @param {number} companyId The id of the company you which to create the datasources - * @param {Models.DataSourceModel[]} model - * @return {Models.DataSourceModel[]} - */ - - createDataSources({ companyId, model }: { companyId: number, model: Models.DataSourceModel[] }): Promise> { - var path = this.buildUrl({ - url: `/api/v2/companies/${companyId}/datasources`, - parameters: {} - }); - var strClientId = - this.appNM + - '; ' + - this.appVer + - '; JavascriptSdk; ' + this.apiVersion + '; ' + - this.machineNM; + * @param {Models.DataSourceModel[]} model + * @return {Models.DataSourceModel[]} + */ + + createDataSources({ companyId, model }: { companyId: number, model: Models.DataSourceModel[] }): Promise> { + var path = this.buildUrl({ + url: `/api/v2/companies/${companyId}/datasources`, + parameters: {} + }); + var strClientId = + this.appNM + + '; ' + + this.appVer + + '; JavascriptSdk; ' + this.apiVersion + '; ' + + this.machineNM; return this.restCall({ url: path, verb: 'post', payload: model, clientId: strClientId }, Array); - } - - /** - * Delete a datasource by datasource id for a company. + } + + /** + * 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, BatchServiceAdmin, CompanyAdmin, CSPTester, FirmAdmin, Registrar, SiteAdmin, SSTAdmin, SystemAdmin, TechnicalSupportAdmin. - * * This API depends on the following active services:*Required* (all): AvaTaxPro, BasicReturns. - * Swagger Name: AvaTaxClient - * + * * This API depends on the following active services:*Required* (all): AvaTaxPro, BasicReturns. + * Swagger Name: AvaTaxClient + * * * @param {number} companyId The id of the company the datasource belongs to. - * @param {number} id The id of the datasource you wish to delete. - * @return {Models.ErrorDetail[]} - */ - - deleteDataSource({ companyId, id }: { companyId: number, id: number }): Promise> { - var path = this.buildUrl({ - url: `/api/v2/companies/${companyId}/datasources/${id}`, - parameters: {} - }); - var strClientId = - this.appNM + - '; ' + - this.appVer + - '; JavascriptSdk; ' + this.apiVersion + '; ' + - this.machineNM; + * @param {number} id The id of the datasource you wish to delete. + * @return {Models.ErrorDetail[]} + */ + + deleteDataSource({ companyId, id }: { companyId: number, id: number }): Promise> { + var path = this.buildUrl({ + url: `/api/v2/companies/${companyId}/datasources/${id}`, + parameters: {} + }); + var strClientId = + this.appNM + + '; ' + + this.appVer + + '; JavascriptSdk; ' + this.apiVersion + '; ' + + this.machineNM; return this.restCall({ url: path, verb: 'delete', payload: null, clientId: strClientId }, Array); - } - - /** - * Get data source by data source id + } + + /** + * 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, BatchServiceAdmin, CompanyAdmin, CompanyUser, Compliance Root User, ComplianceAdmin, ComplianceUser, CSPAdmin, CSPTester, ECMAccountUser, ECMCompanyUser, 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 - * + * * This API depends on the following active services:*Required* (all): AvaTaxPro, BasicReturns. + * Swagger Name: AvaTaxClient + * * * @param {number} companyId - * @param {number} id data source id - * @return {Models.DataSourceModel} - */ - - getDataSourceById({ companyId, id }: { companyId: number, id: number }): Promise { - var path = this.buildUrl({ - url: `/api/v2/companies/${companyId}/datasources/${id}`, - parameters: {} - }); - var strClientId = - this.appNM + - '; ' + - this.appVer + - '; JavascriptSdk; ' + this.apiVersion + '; ' + - this.machineNM; + * @param {number} id data source id + * @return {Models.DataSourceModel} + */ + + getDataSourceById({ companyId, id }: { companyId: number, id: number }): Promise { + var path = this.buildUrl({ + url: `/api/v2/companies/${companyId}/datasources/${id}`, + parameters: {} + }); + var strClientId = + this.appNM + + '; ' + + this.appVer + + '; JavascriptSdk; ' + this.apiVersion + '; ' + + this.machineNM; return this.restCall({ url: path, verb: 'get', payload: null, clientId: strClientId }, Models.DataSourceModel); - } - - /** - * Retrieve all datasources for this company + } + + /** + * 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, BatchServiceAdmin, CompanyAdmin, CompanyUser, Compliance Root User, ComplianceAdmin, ComplianceUser, CSPAdmin, CSPTester, ECMAccountUser, ECMCompanyUser, 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 - * + * * This API depends on the following active services:*Required* (all): AvaTaxPro, BasicReturns. + * Swagger Name: AvaTaxClient + * * * @param {number} 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 {number} top If nonzero, return no more than this number of results. Used with `$skip` to provide pagination for large datasets. Unless otherwise specified, the maximum number of records that can be returned from an API call is 1,000 records. * @param {number} skip If nonzero, skip this number of results before returning data. Used with `$top` to provide pagination for large datasets. - * @param {string} orderBy A comma separated list of sort statements in the format `(fieldname) [ASC|DESC]`, for example `id ASC`. - * @return {FetchResult} - */ - - listDataSources({ companyId, filter, top, skip, orderBy }: { companyId: number, filter?: string, top?: number, skip?: number, orderBy?: string }): Promise> { - 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 }: { companyId: number, filter?: string, top?: number, skip?: number, orderBy?: string }): Promise> { + var path = this.buildUrl({ + url: `/api/v2/companies/${companyId}/datasources`, parameters: { $filter: filter, $top: top, $skip: skip, $orderBy: orderBy } - }); - var strClientId = - this.appNM + - '; ' + - this.appVer + - '; JavascriptSdk; ' + this.apiVersion + '; ' + - this.machineNM; + }); + var strClientId = + this.appNM + + '; ' + + this.appVer + + '; JavascriptSdk; ' + this.apiVersion + '; ' + + this.machineNM; return this.restCall({ url: path, verb: 'get', payload: null, clientId: strClientId }, FetchResult); - } - - /** - * Retrieve all datasources + } + + /** + * 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/) . @@ -4398,69 +4509,69 @@ export default class AvaTaxClient { * ### Security Policies * * * This API requires one of the following user roles: AccountAdmin, AccountOperator, AccountUser, BatchServiceAdmin, CompanyAdmin, CompanyUser, Compliance Root User, ComplianceAdmin, ComplianceUser, CSPAdmin, CSPTester, ECMAccountUser, ECMCompanyUser, 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 - * + * * 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 {number} top If nonzero, return no more than this number of results. Used with `$skip` to provide pagination for large datasets. Unless otherwise specified, the maximum number of records that can be returned from an API call is 1,000 records. * @param {number} skip If nonzero, skip this number of results before returning data. Used with `$top` to provide pagination for large datasets. - * @param {string} orderBy A comma separated list of sort statements in the format `(fieldname) [ASC|DESC]`, for example `id ASC`. - * @return {FetchResult} - */ - - queryDataSources({ filter, top, skip, orderBy }: { filter?: string, top?: number, skip?: number, orderBy?: string }): Promise> { - 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 }: { filter?: string, top?: number, skip?: number, orderBy?: string }): Promise> { + var path = this.buildUrl({ + url: `/api/v2/datasources`, parameters: { $filter: filter, $top: top, $skip: skip, $orderBy: orderBy } - }); - var strClientId = - this.appNM + - '; ' + - this.appVer + - '; JavascriptSdk; ' + this.apiVersion + '; ' + - this.machineNM; + }); + var strClientId = + this.appNM + + '; ' + + this.appVer + + '; JavascriptSdk; ' + this.apiVersion + '; ' + + this.machineNM; return this.restCall({ url: path, verb: 'get', payload: null, clientId: strClientId }, FetchResult); - } - - /** - * Update a datasource identified by id for a company + } + + /** + * 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, BatchServiceAdmin, CompanyAdmin, CSPTester, FirmAdmin, Registrar, SiteAdmin, SSTAdmin, SystemAdmin, TechnicalSupportAdmin. - * * This API depends on the following active services:*Required* (all): AvaTaxPro, BasicReturns. - * Swagger Name: AvaTaxClient - * + * * This API depends on the following active services:*Required* (all): AvaTaxPro, BasicReturns. + * Swagger Name: AvaTaxClient + * * * @param {number} companyId The id of the company the datasource belongs to. * @param {number} id The id of the datasource you wish to delete. - * @param {Models.DataSourceModel} model - * @return {Models.DataSourceModel} - */ - - updateDataSource({ companyId, id, model }: { companyId: number, id: number, model: Models.DataSourceModel }): Promise { - var path = this.buildUrl({ - url: `/api/v2/companies/${companyId}/datasources/${id}`, - parameters: {} - }); - var strClientId = - this.appNM + - '; ' + - this.appVer + - '; JavascriptSdk; ' + this.apiVersion + '; ' + - this.machineNM; + * @param {Models.DataSourceModel} model + * @return {Models.DataSourceModel} + */ + + updateDataSource({ companyId, id, model }: { companyId: number, id: number, model: Models.DataSourceModel }): Promise { + var path = this.buildUrl({ + url: `/api/v2/companies/${companyId}/datasources/${id}`, + parameters: {} + }); + var strClientId = + this.appNM + + '; ' + + this.appVer + + '; JavascriptSdk; ' + this.apiVersion + '; ' + + this.machineNM; return this.restCall({ url: path, verb: 'put', payload: model, clientId: strClientId }, Models.DataSourceModel); - } - - /** - * Lists all parents of an HS Code. + } + + /** + * 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 @@ -4474,155 +4585,155 @@ export default class AvaTaxClient { * * ### Security Policies * - * * This API depends on the following active services:*Required* (all): AvaTaxGlobal. - * Swagger Name: AvaTaxClient - * + * * 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 }: { country: string, hsCode: string }): Promise> { - var path = this.buildUrl({ - url: `/api/v2/definitions/crossborder/${country}/${hsCode}/hierarchy`, - parameters: {} - }); - var strClientId = - this.appNM + - '; ' + - this.appVer + - '; JavascriptSdk; ' + this.apiVersion + '; ' + - this.machineNM; + * @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 }: { country: string, hsCode: string }): Promise> { + var path = this.buildUrl({ + url: `/api/v2/definitions/crossborder/${country}/${hsCode}/hierarchy`, + parameters: {} + }); + var strClientId = + this.appNM + + '; ' + + this.appVer + + '; JavascriptSdk; ' + this.apiVersion + '; ' + + this.machineNM; return this.restCall({ url: path, verb: 'get', payload: null, clientId: strClientId }, FetchResult); - } - - /** - * Test whether a form supports online login verification + } + + /** + * 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. - * Swagger Name: AvaTaxClient - * + * 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 {number} top If nonzero, return no more than this number of results. Used with `$skip` to provide pagination for large datasets. Unless otherwise specified, the maximum number of records that can be returned from an API call is 1,000 records. * @param {number} skip If nonzero, skip this number of results before returning data. Used with `$top` to provide pagination for large datasets. - * @param {string} orderBy A comma separated list of sort statements in the format `(fieldname) [ASC|DESC]`, for example `id ASC`. - * @return {FetchResult} - */ - - getLoginVerifierByForm({ form, filter, top, skip, orderBy }: { form: string, filter?: string, top?: number, skip?: number, orderBy?: string }): Promise> { - 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 }: { form: string, filter?: string, top?: number, skip?: number, orderBy?: string }): Promise> { + var path = this.buildUrl({ + url: `/api/v2/definitions/filingcalendars/loginverifiers/${form}`, parameters: { $filter: filter, $top: top, $skip: skip, $orderBy: orderBy } - }); - var strClientId = - this.appNM + - '; ' + - this.appVer + - '; JavascriptSdk; ' + this.apiVersion + '; ' + - this.machineNM; + }); + var strClientId = + this.appNM + + '; ' + + this.appVer + + '; JavascriptSdk; ' + this.apiVersion + '; ' + + this.machineNM; return this.restCall({ url: path, verb: 'get', payload: null, clientId: strClientId }, FetchResult); - } - - /** - * List all market place locations. - * List all market place locations. - * Swagger Name: AvaTaxClient - * + } + + /** + * 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 {number} top If nonzero, return no more than this number of results. Used with `$skip` to provide pagination for large datasets. Unless otherwise specified, the maximum number of records that can be returned from an API call is 1,000 records. * @param {number} skip If nonzero, skip this number of results before returning data. Used with `$top` to provide pagination for large datasets. - * @param {string} orderBy A comma separated list of sort statements in the format `(fieldname) [ASC|DESC]`, for example `id ASC`. - * @return {FetchResult} - */ - - listAllMarketplaceLocations({ filter, top, skip, orderBy }: { filter?: string, top?: number, skip?: number, orderBy?: string }): Promise> { - 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 }: { filter?: string, top?: number, skip?: number, orderBy?: string }): Promise> { + var path = this.buildUrl({ + url: `/api/v2/definitions/listallmarketplacelocations`, parameters: { $filter: filter, $top: top, $skip: skip, $orderBy: orderBy } - }); - var strClientId = - this.appNM + - '; ' + - this.appVer + - '; JavascriptSdk; ' + this.apiVersion + '; ' + - this.machineNM; + }); + var strClientId = + this.appNM + + '; ' + + this.appVer + + '; JavascriptSdk; ' + this.apiVersion + '; ' + + this.machineNM; return this.restCall({ url: path, verb: 'get', payload: null, clientId: strClientId }, FetchResult); - } - - /** - * Retrieve the full list of the AvaFile Forms available + } + + /** + * 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 - * Swagger Name: AvaTaxClient - * + * 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 {number} top If nonzero, return no more than this number of results. Used with `$skip` to provide pagination for large datasets. Unless otherwise specified, the maximum number of records that can be returned from an API call is 1,000 records. * @param {number} skip If nonzero, skip this number of results before returning data. Used with `$top` to provide pagination for large datasets. - * @param {string} orderBy A comma separated list of sort statements in the format `(fieldname) [ASC|DESC]`, for example `id ASC`. - * @return {FetchResult} - */ - - listAvaFileForms({ filter, top, skip, orderBy }: { filter?: string, top?: number, skip?: number, orderBy?: string }): Promise> { - 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 }: { filter?: string, top?: number, skip?: number, orderBy?: string }): Promise> { + var path = this.buildUrl({ + url: `/api/v2/definitions/avafileforms`, parameters: { $filter: filter, $top: top, $skip: skip, $orderBy: orderBy } - }); - var strClientId = - this.appNM + - '; ' + - this.appVer + - '; JavascriptSdk; ' + this.apiVersion + '; ' + - this.machineNM; + }); + var strClientId = + this.appNM + + '; ' + + this.appVer + + '; JavascriptSdk; ' + this.apiVersion + '; ' + + this.machineNM; return this.restCall({ url: path, verb: 'get', payload: null, clientId: strClientId }, FetchResult); - } - - /** - * List certificate attributes used by a company + } + + /** + * 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. - * Swagger Name: AvaTaxClient - * + * check and provision account. + * Swagger Name: AvaTaxClient + * * * @param {number} 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 {number} top If nonzero, return no more than this number of results. Used with `$skip` to provide pagination for large datasets. Unless otherwise specified, the maximum number of records that can be returned from an API call is 1,000 records. * @param {number} skip If nonzero, skip this number of results before returning data. Used with `$top` to provide pagination for large datasets. - * @param {string} orderBy A comma separated list of sort statements in the format `(fieldname) [ASC|DESC]`, for example `id ASC`. - * @return {FetchResult} - */ - - listCertificateAttributes({ companyid, filter, top, skip, orderBy }: { companyid?: number, filter?: string, top?: number, skip?: number, orderBy?: string }): Promise> { - 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 }: { companyid?: number, filter?: string, top?: number, skip?: number, orderBy?: string }): Promise> { + var path = this.buildUrl({ + url: `/api/v2/definitions/certificateattributes`, parameters: { companyid: companyid, $filter: filter, @@ -4630,261 +4741,261 @@ export default class AvaTaxClient { $skip: skip, $orderBy: orderBy } - }); - var strClientId = - this.appNM + - '; ' + - this.appVer + - '; JavascriptSdk; ' + this.apiVersion + '; ' + - this.machineNM; + }); + var strClientId = + this.appNM + + '; ' + + this.appVer + + '; JavascriptSdk; ' + this.apiVersion + '; ' + + this.machineNM; return this.restCall({ url: path, verb: 'get', payload: null, clientId: strClientId }, FetchResult); - } - - /** - * List the certificate exempt reasons defined by a company + } + + /** + * 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. - * Swagger Name: AvaTaxClient - * + * 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 {number} top If nonzero, return no more than this number of results. Used with `$skip` to provide pagination for large datasets. Unless otherwise specified, the maximum number of records that can be returned from an API call is 1,000 records. * @param {number} skip If nonzero, skip this number of results before returning data. Used with `$top` to provide pagination for large datasets. - * @param {string} orderBy A comma separated list of sort statements in the format `(fieldname) [ASC|DESC]`, for example `id ASC`. - * @return {FetchResult} - */ - - listCertificateExemptReasons({ filter, top, skip, orderBy }: { filter?: string, top?: number, skip?: number, orderBy?: string }): Promise> { - 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 }: { filter?: string, top?: number, skip?: number, orderBy?: string }): Promise> { + var path = this.buildUrl({ + url: `/api/v2/definitions/certificateexemptreasons`, parameters: { $filter: filter, $top: top, $skip: skip, $orderBy: orderBy } - }); - var strClientId = - this.appNM + - '; ' + - this.appVer + - '; JavascriptSdk; ' + this.apiVersion + '; ' + - this.machineNM; + }); + var strClientId = + this.appNM + + '; ' + + this.appVer + + '; JavascriptSdk; ' + this.apiVersion + '; ' + + this.machineNM; return this.restCall({ url: path, verb: 'get', payload: null, clientId: strClientId }, FetchResult); - } - - /** - * List certificate exposure zones used by a company + } + + /** + * 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. - * Swagger Name: AvaTaxClient - * + * 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 {number} top If nonzero, return no more than this number of results. Used with `$skip` to provide pagination for large datasets. Unless otherwise specified, the maximum number of records that can be returned from an API call is 1,000 records. * @param {number} skip If nonzero, skip this number of results before returning data. Used with `$top` to provide pagination for large datasets. - * @param {string} orderBy A comma separated list of sort statements in the format `(fieldname) [ASC|DESC]`, for example `id ASC`. - * @return {FetchResult} - */ - - listCertificateExposureZones({ filter, top, skip, orderBy }: { filter?: string, top?: number, skip?: number, orderBy?: string }): Promise> { - 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 }: { filter?: string, top?: number, skip?: number, orderBy?: string }): Promise> { + var path = this.buildUrl({ + url: `/api/v2/definitions/certificateexposurezones`, parameters: { $filter: filter, $top: top, $skip: skip, $orderBy: orderBy } - }); - var strClientId = - this.appNM + - '; ' + - this.appVer + - '; JavascriptSdk; ' + this.apiVersion + '; ' + - this.machineNM; + }); + var strClientId = + this.appNM + + '; ' + + this.appVer + + '; JavascriptSdk; ' + this.apiVersion + '; ' + + this.machineNM; return this.restCall({ url: path, verb: 'get', payload: null, clientId: strClientId }, FetchResult); - } - - /** - * Retrieve the full list of Avalara-supported usage of extra parameters for classification of a item. + } + + /** + * 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. - * Swagger Name: AvaTaxClient - * + * 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:* attributeSubType, values * @param {number} top If nonzero, return no more than this number of results. Used with `$skip` to provide pagination for large datasets. Unless otherwise specified, the maximum number of records that can be returned from an API call is 1,000 records. * @param {number} skip If nonzero, skip this number of results before returning data. Used with `$top` to provide pagination for large datasets. - * @param {string} orderBy A comma separated list of sort statements in the format `(fieldname) [ASC|DESC]`, for example `id ASC`. - * @return {FetchResult} - */ - - listClassificationParametersUsage({ filter, top, skip, orderBy }: { filter?: string, top?: number, skip?: number, orderBy?: string }): Promise> { - 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 }: { filter?: string, top?: number, skip?: number, orderBy?: string }): Promise> { + var path = this.buildUrl({ + url: `/api/v2/definitions/classification/parametersusage`, parameters: { $filter: filter, $top: top, $skip: skip, $orderBy: orderBy } - }); - var strClientId = - this.appNM + - '; ' + - this.appVer + - '; JavascriptSdk; ' + this.apiVersion + '; ' + - this.machineNM; + }); + var strClientId = + this.appNM + + '; ' + + this.appVer + + '; JavascriptSdk; ' + this.apiVersion + '; ' + + this.machineNM; return this.restCall({ url: path, verb: 'get', payload: null, clientId: strClientId }, FetchResult); - } - - /** - * Retrieve the full list of communications service types - * Returns full list of service types for a given transaction type ID. - * Swagger Name: AvaTaxClient - * + } + + /** + * Retrieve the full list of communications service types + * Returns full list of service types for a given transaction type ID. + * Swagger Name: AvaTaxClient + * * * @param {number} 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 {number} top If nonzero, return no more than this number of results. Used with `$skip` to provide pagination for large datasets. Unless otherwise specified, the maximum number of records that can be returned from an API call is 1,000 records. * @param {number} skip If nonzero, skip this number of results before returning data. Used with `$top` to provide pagination for large datasets. - * @param {string} orderBy A comma separated list of sort statements in the format `(fieldname) [ASC|DESC]`, for example `id ASC`. - * @return {FetchResult} - */ - - listCommunicationsServiceTypes({ id, filter, top, skip, orderBy }: { id: number, filter?: string, top?: number, skip?: number, orderBy?: string }): Promise> { - 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 }: { id: number, filter?: string, top?: number, skip?: number, orderBy?: string }): Promise> { + var path = this.buildUrl({ + url: `/api/v2/definitions/communications/transactiontypes/${id}/servicetypes`, parameters: { $filter: filter, $top: top, $skip: skip, $orderBy: orderBy } - }); - var strClientId = - this.appNM + - '; ' + - this.appVer + - '; JavascriptSdk; ' + this.apiVersion + '; ' + - this.machineNM; + }); + var strClientId = + this.appNM + + '; ' + + this.appVer + + '; JavascriptSdk; ' + this.apiVersion + '; ' + + this.machineNM; return this.restCall({ url: path, verb: 'get', payload: null, clientId: strClientId }, FetchResult); - } - - /** - * Retrieve the full list of communications transactiontypes + } + + /** + * Retrieve the full list of communications transactiontypes * Returns full list of communications transaction types which - * are accepted in communication tax calculation requests. - * Swagger Name: AvaTaxClient - * + * 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 {number} top If nonzero, return no more than this number of results. Used with `$skip` to provide pagination for large datasets. Unless otherwise specified, the maximum number of records that can be returned from an API call is 1,000 records. * @param {number} skip If nonzero, skip this number of results before returning data. Used with `$top` to provide pagination for large datasets. - * @param {string} orderBy A comma separated list of sort statements in the format `(fieldname) [ASC|DESC]`, for example `id ASC`. - * @return {FetchResult} - */ - - listCommunicationsTransactionTypes({ filter, top, skip, orderBy }: { filter?: string, top?: number, skip?: number, orderBy?: string }): Promise> { - 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 }: { filter?: string, top?: number, skip?: number, orderBy?: string }): Promise> { + var path = this.buildUrl({ + url: `/api/v2/definitions/communications/transactiontypes`, parameters: { $filter: filter, $top: top, $skip: skip, $orderBy: orderBy } - }); - var strClientId = - this.appNM + - '; ' + - this.appVer + - '; JavascriptSdk; ' + this.apiVersion + '; ' + - this.machineNM; + }); + var strClientId = + this.appNM + + '; ' + + this.appVer + + '; JavascriptSdk; ' + this.apiVersion + '; ' + + this.machineNM; return this.restCall({ url: path, verb: 'get', payload: null, clientId: strClientId }, FetchResult); - } - - /** - * Retrieve the full list of communications transaction/service type pairs + } + + /** + * 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. - * Swagger Name: AvaTaxClient - * + * 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 {number} top If nonzero, return no more than this number of results. Used with `$skip` to provide pagination for large datasets. Unless otherwise specified, the maximum number of records that can be returned from an API call is 1,000 records. * @param {number} skip If nonzero, skip this number of results before returning data. Used with `$top` to provide pagination for large datasets. - * @param {string} orderBy A comma separated list of sort statements in the format `(fieldname) [ASC|DESC]`, for example `id ASC`. - * @return {FetchResult} - */ - - listCommunicationsTSPairs({ filter, top, skip, orderBy }: { filter?: string, top?: number, skip?: number, orderBy?: string }): Promise> { - 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 }: { filter?: string, top?: number, skip?: number, orderBy?: string }): Promise> { + var path = this.buildUrl({ + url: `/api/v2/definitions/communications/tspairs`, parameters: { $filter: filter, $top: top, $skip: skip, $orderBy: orderBy } - }); - var strClientId = - this.appNM + - '; ' + - this.appVer + - '; JavascriptSdk; ' + this.apiVersion + '; ' + - this.machineNM; + }); + var strClientId = + this.appNM + + '; ' + + this.appVer + + '; JavascriptSdk; ' + this.apiVersion + '; ' + + this.machineNM; return this.restCall({ url: path, verb: 'get', payload: null, clientId: strClientId }, FetchResult); - } - - /** - * List all ISO 3166 countries + } + + /** + * 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. - * Swagger Name: AvaTaxClient - * + * 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 {number} top If nonzero, return no more than this number of results. Used with `$skip` to provide pagination for large datasets. Unless otherwise specified, the maximum number of records that can be returned from an API call is 1,000 records. * @param {number} skip If nonzero, skip this number of results before returning data. Used with `$top` to provide pagination for large datasets. - * @param {string} orderBy A comma separated list of sort statements in the format `(fieldname) [ASC|DESC]`, for example `id ASC`. - * @return {FetchResult} - */ - - listCountries({ filter, top, skip, orderBy }: { filter?: string, top?: number, skip?: number, orderBy?: string }): Promise> { - 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 }: { filter?: string, top?: number, skip?: number, orderBy?: string }): Promise> { + var path = this.buildUrl({ + url: `/api/v2/definitions/countries`, parameters: { $filter: filter, $top: top, $skip: skip, $orderBy: orderBy } - }); - var strClientId = - this.appNM + - '; ' + - this.appVer + - '; JavascriptSdk; ' + this.apiVersion + '; ' + - this.machineNM; + }); + var strClientId = + this.appNM + + '; ' + + this.appVer + + '; JavascriptSdk; ' + this.apiVersion + '; ' + + this.machineNM; return this.restCall({ url: path, verb: 'get', payload: null, clientId: strClientId }, FetchResult); - } - - /** - * List certificate exposure zones used by a company + } + + /** + * 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 @@ -4892,38 +5003,38 @@ 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. - * Swagger Name: AvaTaxClient - * + * 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 {number} top If nonzero, return no more than this number of results. Used with `$skip` to provide pagination for large datasets. Unless otherwise specified, the maximum number of records that can be returned from an API call is 1,000 records. * @param {number} skip If nonzero, skip this number of results before returning data. Used with `$top` to provide pagination for large datasets. - * @param {string} orderBy A comma separated list of sort statements in the format `(fieldname) [ASC|DESC]`, for example `id ASC`. - * @return {FetchResult} - */ - - listCoverLetters({ filter, top, skip, orderBy }: { filter?: string, top?: number, skip?: number, orderBy?: string }): Promise> { - 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 }: { filter?: string, top?: number, skip?: number, orderBy?: string }): Promise> { + var path = this.buildUrl({ + url: `/api/v2/definitions/coverletters`, parameters: { $filter: filter, $top: top, $skip: skip, $orderBy: orderBy } - }); - var strClientId = - this.appNM + - '; ' + - this.appVer + - '; JavascriptSdk; ' + this.apiVersion + '; ' + - this.machineNM; + }); + var strClientId = + this.appNM + + '; ' + + this.appVer + + '; JavascriptSdk; ' + this.apiVersion + '; ' + + this.machineNM; return this.restCall({ url: path, verb: 'get', payload: null, clientId: strClientId }, FetchResult); - } - - /** - * Lists the next level of HS Codes given a destination country and HS Code prefix. + } + + /** + * 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. * @@ -4935,40 +5046,40 @@ export default class AvaTaxClient { * * ### Security Policies * - * * This API depends on the following active services:*Required* (all): AvaTaxGlobal. - * Swagger Name: AvaTaxClient - * + * * 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 {number} top If nonzero, return no more than this number of results. Used with `$skip` to provide pagination for large datasets. Unless otherwise specified, the maximum number of records that can be returned from an API call is 1,000 records. * @param {number} skip If nonzero, skip this number of results before returning data. Used with `$top` to provide pagination for large datasets. - * @param {string} orderBy A comma separated list of sort statements in the format `(fieldname) [ASC|DESC]`, for example `id ASC`. - * @return {FetchResult} - */ - - listCrossBorderCodes({ country, hsCode, filter, top, skip, orderBy }: { country: string, hsCode: string, filter?: string, top?: number, skip?: number, orderBy?: string }): Promise> { - 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 }: { country: string, hsCode: string, filter?: string, top?: number, skip?: number, orderBy?: string }): Promise> { + var path = this.buildUrl({ + url: `/api/v2/definitions/crossborder/${country}/${hsCode}`, parameters: { $filter: filter, $top: top, $skip: skip, $orderBy: orderBy } - }); - var strClientId = - this.appNM + - '; ' + - this.appVer + - '; JavascriptSdk; ' + this.apiVersion + '; ' + - this.machineNM; + }); + var strClientId = + this.appNM + + '; ' + + this.appVer + + '; JavascriptSdk; ' + this.apiVersion + '; ' + + this.machineNM; return this.restCall({ url: path, verb: 'get', payload: null, clientId: strClientId }, FetchResult); - } - - /** - * List top level HS Code Sections. + } + + /** + * 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. @@ -4978,229 +5089,229 @@ export default class AvaTaxClient { * * ### Security Policies * - * * This API depends on the following active services:*Required* (all): AvaTaxGlobal. - * Swagger Name: AvaTaxClient - * - * - * @return {FetchResult} - */ - - listCrossBorderSections(): Promise> { - var path = this.buildUrl({ - url: `/api/v2/definitions/crossborder/sections`, - parameters: {} - }); - var strClientId = - this.appNM + - '; ' + - this.appVer + - '; JavascriptSdk; ' + this.apiVersion + '; ' + - this.machineNM; + * * This API depends on the following active services:*Required* (all): AvaTaxGlobal. + * Swagger Name: AvaTaxClient + * + * + * @return {FetchResult} + */ + + listCrossBorderSections(): Promise> { + var path = this.buildUrl({ + url: `/api/v2/definitions/crossborder/sections`, + parameters: {} + }); + var strClientId = + this.appNM + + '; ' + + this.appVer + + '; JavascriptSdk; ' + this.apiVersion + '; ' + + this.machineNM; return this.restCall({ url: path, verb: 'get', payload: null, clientId: strClientId }, FetchResult); - } - - /** - * List all ISO 4217 currencies supported by AvaTax. + } + + /** + * 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`. - * Swagger Name: AvaTaxClient - * + * `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 {number} top If nonzero, return no more than this number of results. Used with `$skip` to provide pagination for large datasets. Unless otherwise specified, the maximum number of records that can be returned from an API call is 1,000 records. * @param {number} skip If nonzero, skip this number of results before returning data. Used with `$top` to provide pagination for large datasets. - * @param {string} orderBy A comma separated list of sort statements in the format `(fieldname) [ASC|DESC]`, for example `id ASC`. - * @return {FetchResult} - */ - - listCurrencies({ filter, top, skip, orderBy }: { filter?: string, top?: number, skip?: number, orderBy?: string }): Promise> { - 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 }: { filter?: string, top?: number, skip?: number, orderBy?: string }): Promise> { + var path = this.buildUrl({ + url: `/api/v2/definitions/currencies`, parameters: { $filter: filter, $top: top, $skip: skip, $orderBy: orderBy } - }); - var strClientId = - this.appNM + - '; ' + - this.appVer + - '; JavascriptSdk; ' + this.apiVersion + '; ' + - this.machineNM; + }); + var strClientId = + this.appNM + + '; ' + + this.appVer + + '; JavascriptSdk; ' + this.apiVersion + '; ' + + this.machineNM; return this.restCall({ url: path, verb: 'get', payload: null, clientId: strClientId }, FetchResult); - } - - /** - * Retrieve the full list of Avalara-supported entity use codes + } + + /** + * 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. - * Swagger Name: AvaTaxClient - * + * 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 {number} top If nonzero, return no more than this number of results. Used with `$skip` to provide pagination for large datasets. Unless otherwise specified, the maximum number of records that can be returned from an API call is 1,000 records. * @param {number} skip If nonzero, skip this number of results before returning data. Used with `$top` to provide pagination for large datasets. - * @param {string} orderBy A comma separated list of sort statements in the format `(fieldname) [ASC|DESC]`, for example `id ASC`. - * @return {FetchResult} - */ - - listEntityUseCodes({ filter, top, skip, orderBy }: { filter?: string, top?: number, skip?: number, orderBy?: string }): Promise> { - 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 }: { filter?: string, top?: number, skip?: number, orderBy?: string }): Promise> { + var path = this.buildUrl({ + url: `/api/v2/definitions/entityusecodes`, parameters: { $filter: filter, $top: top, $skip: skip, $orderBy: orderBy } - }); - var strClientId = - this.appNM + - '; ' + - this.appVer + - '; JavascriptSdk; ' + this.apiVersion + '; ' + - this.machineNM; + }); + var strClientId = + this.appNM + + '; ' + + this.appVer + + '; JavascriptSdk; ' + this.apiVersion + '; ' + + this.machineNM; return this.restCall({ url: path, verb: 'get', payload: null, clientId: strClientId }, FetchResult); - } - - /** - * Retrieve the full list of Avalara-supported filing frequencies. + } + + /** + * 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. - * Swagger Name: AvaTaxClient - * + * 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 {number} top If nonzero, return no more than this number of results. Used with `$skip` to provide pagination for large datasets. Unless otherwise specified, the maximum number of records that can be returned from an API call is 1,000 records. * @param {number} skip If nonzero, skip this number of results before returning data. Used with `$top` to provide pagination for large datasets. - * @param {string} orderBy A comma separated list of sort statements in the format `(fieldname) [ASC|DESC]`, for example `id ASC`. - * @return {FetchResult} - */ - - listFilingFrequencies({ filter, top, skip, orderBy }: { filter?: string, top?: number, skip?: number, orderBy?: string }): Promise> { - 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 }: { filter?: string, top?: number, skip?: number, orderBy?: string }): Promise> { + var path = this.buildUrl({ + url: `/api/v2/definitions/filingfrequencies`, parameters: { $filter: filter, $top: top, $skip: skip, $orderBy: orderBy } - }); - var strClientId = - this.appNM + - '; ' + - this.appVer + - '; JavascriptSdk; ' + this.apiVersion + '; ' + - this.machineNM; + }); + var strClientId = + this.appNM + + '; ' + + this.appVer + + '; JavascriptSdk; ' + this.apiVersion + '; ' + + this.machineNM; return this.restCall({ url: path, verb: 'get', payload: null, clientId: strClientId }, FetchResult); - } - - /** - * List of all recommendation status which can be assigned to an item + } + + /** + * List of all recommendation status which can be assigned to an item * ### Security Policies * - * * This API requires one of the following user roles: AccountAdmin, AccountUser, BatchServiceAdmin, CompanyAdmin, CompanyUser, CSPAdmin, CSPTester, SiteAdmin, SSTAdmin, SystemAdmin, TechnicalSupportAdmin, TechnicalSupportUser. - * Swagger Name: AvaTaxClient - * - * - * @return {Models.ItemTaxCodeRecommendationStatusModel[]} - */ - - listItemsRecommendationsStatus(): Promise> { - var path = this.buildUrl({ - url: `/api/v2/definitions/items/recommendationstatus`, - parameters: {} - }); - var strClientId = - this.appNM + - '; ' + - this.appVer + - '; JavascriptSdk; ' + this.apiVersion + '; ' + - this.machineNM; + * * This API requires one of the following user roles: AccountAdmin, AccountUser, BatchServiceAdmin, CompanyAdmin, CompanyUser, CSPAdmin, CSPTester, SiteAdmin, SSTAdmin, SystemAdmin, TechnicalSupportAdmin, TechnicalSupportUser. + * Swagger Name: AvaTaxClient + * + * + * @return {Models.ItemTaxCodeRecommendationStatusModel[]} + */ + + listItemsRecommendationsStatus(): Promise> { + var path = this.buildUrl({ + url: `/api/v2/definitions/items/recommendationstatus`, + parameters: {} + }); + var strClientId = + this.appNM + + '; ' + + this.appVer + + '; JavascriptSdk; ' + this.apiVersion + '; ' + + this.machineNM; return this.restCall({ url: path, verb: 'get', payload: null, clientId: strClientId }, Array); - } - - /** - * List of all possible status which can be assigned to an item + } + + /** + * List of all possible status which can be assigned to an item * ### Security Policies * - * * This API requires one of the following user roles: AccountAdmin, AccountUser, BatchServiceAdmin, CompanyAdmin, CompanyUser, CSPAdmin, CSPTester, SiteAdmin, SSTAdmin, SystemAdmin, TechnicalSupportAdmin, TechnicalSupportUser. - * Swagger Name: AvaTaxClient - * - * - * @return {Models.ItemStatusModel[]} - */ - - listItemsStatus(): Promise> { - var path = this.buildUrl({ - url: `/api/v2/definitions/items/status`, - parameters: {} - }); - var strClientId = - this.appNM + - '; ' + - this.appVer + - '; JavascriptSdk; ' + this.apiVersion + '; ' + - this.machineNM; + * * This API requires one of the following user roles: AccountAdmin, AccountUser, BatchServiceAdmin, CompanyAdmin, CompanyUser, CSPAdmin, CSPTester, SiteAdmin, SSTAdmin, SystemAdmin, TechnicalSupportAdmin, TechnicalSupportUser. + * Swagger Name: AvaTaxClient + * + * + * @return {Models.ItemStatusModel[]} + */ + + listItemsStatus(): Promise> { + var path = this.buildUrl({ + url: `/api/v2/definitions/items/status`, + parameters: {} + }); + var strClientId = + this.appNM + + '; ' + + this.appVer + + '; JavascriptSdk; ' + this.apiVersion + '; ' + + this.machineNM; return this.restCall({ url: path, verb: 'get', payload: null, clientId: strClientId }, Array); - } - - /** - * List jurisdictions based on the filter provided + } + + /** + * 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. - * Swagger Name: AvaTaxClient - * + * 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, isAcm, isSst, createDate, isLocalAdmin, taxAuthorityTypeId * @param {number} top If nonzero, return no more than this number of results. Used with `$skip` to provide pagination for large datasets. Unless otherwise specified, the maximum number of records that can be returned from an API call is 1,000 records. * @param {number} skip If nonzero, skip this number of results before returning data. Used with `$top` to provide pagination for large datasets. - * @param {string} orderBy A comma separated list of sort statements in the format `(fieldname) [ASC|DESC]`, for example `id ASC`. - * @return {FetchResult} - */ - - listJurisdictions({ filter, top, skip, orderBy }: { filter?: string, top?: number, skip?: number, orderBy?: string }): Promise> { - 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 }: { filter?: string, top?: number, skip?: number, orderBy?: string }): Promise> { + var path = this.buildUrl({ + url: `/api/v2/definitions/jurisdictions`, parameters: { $filter: filter, $top: top, $skip: skip, $orderBy: orderBy } - }); - var strClientId = - this.appNM + - '; ' + - this.appVer + - '; JavascriptSdk; ' + this.apiVersion + '; ' + - this.machineNM; + }); + var strClientId = + this.appNM + + '; ' + + this.appVer + + '; JavascriptSdk; ' + this.apiVersion + '; ' + + this.machineNM; return this.restCall({ url: path, verb: 'get', payload: null, clientId: strClientId }, FetchResult); - } - - /** - * List jurisdictions near a specific address + } + + /** + * 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. - * Swagger Name: AvaTaxClient - * + * 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. @@ -5212,13 +5323,13 @@ 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 {number} top If nonzero, return no more than this number of results. Used with `$skip` to provide pagination for large datasets. Unless otherwise specified, the maximum number of records that can be returned from an API call is 1,000 records. * @param {number} skip If nonzero, skip this number of results before returning data. Used with `$top` to provide pagination for large datasets. - * @param {string} orderBy A comma separated list of sort statements in the format `(fieldname) [ASC|DESC]`, for example `id ASC`. - * @return {FetchResult} - */ - - listJurisdictionsByAddress({ line1, line2, line3, city, region, postalCode, country, filter, top, skip, orderBy }: { line1?: string, line2?: string, line3?: string, city?: string, region?: string, postalCode?: string, country: string, filter?: string, top?: number, skip?: number, orderBy?: string }): Promise> { - 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 }: { line1?: string, line2?: string, line3?: string, city?: string, region?: string, postalCode?: string, country: string, filter?: string, top?: number, skip?: number, orderBy?: string }): Promise> { + var path = this.buildUrl({ + url: `/api/v2/definitions/jurisdictionsnearaddress`, parameters: { line1: line1, line2: line2, @@ -5232,18 +5343,18 @@ export default class AvaTaxClient { $skip: skip, $orderBy: orderBy } - }); - var strClientId = - this.appNM + - '; ' + - this.appVer + - '; JavascriptSdk; ' + this.apiVersion + '; ' + - this.machineNM; + }); + var strClientId = + this.appNM + + '; ' + + this.appVer + + '; JavascriptSdk; ' + this.apiVersion + '; ' + + this.machineNM; return this.restCall({ url: path, verb: 'get', payload: null, clientId: strClientId }, FetchResult); - } - - /** - * List jurisdictions based on the provided taxTypeId, taxSubTypeId, country, and rateTypeId + } + + /** + * List jurisdictions based on the provided taxTypeId, taxSubTypeId, country, and rateTypeId * Returns a list of all Avalara-supported taxing jurisdictions filtered by taxTypeId, taxSubTypeId, country, and rateTypeId. * * You can optionally pass region as a query parameter to retrieve jurisdictions that are under that region. @@ -5251,9 +5362,9 @@ export default class AvaTaxClient { * 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. - * Swagger Name: AvaTaxClient - * + * 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} taxTypeId The taxtype for which you want to retrieve the jurisdiction information @@ -5263,13 +5374,13 @@ 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, stateFips * @param {number} top If nonzero, return no more than this number of results. Used with `$skip` to provide pagination for large datasets. Unless otherwise specified, the maximum number of records that can be returned from an API call is 1,000 records. * @param {number} skip If nonzero, skip this number of results before returning data. Used with `$top` to provide pagination for large datasets. - * @param {string} orderBy A comma separated list of sort statements in the format `(fieldname) [ASC|DESC]`, for example `id ASC`. - * @return {FetchResult} - */ - - listJurisdictionsByRateTypeTaxTypeMapping({ country, taxTypeId, taxSubTypeId, rateTypeId, region, filter, top, skip, orderBy }: { country: string, taxTypeId: string, taxSubTypeId: string, rateTypeId: number, region?: string, filter?: string, top?: number, skip?: number, orderBy?: string }): Promise> { - var path = this.buildUrl({ - url: `/api/v2/definitions/jurisdictions/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} + */ + + listJurisdictionsByRateTypeTaxTypeMapping({ country, taxTypeId, taxSubTypeId, rateTypeId, region, filter, top, skip, orderBy }: { country: string, taxTypeId: string, taxSubTypeId: string, rateTypeId: number, region?: string, filter?: string, top?: number, skip?: number, orderBy?: string }): Promise> { + var path = this.buildUrl({ + url: `/api/v2/definitions/jurisdictions/countries/${country}/taxtypes/${taxTypeId}/taxsubtypes/${taxSubTypeId}`, parameters: { rateTypeId: rateTypeId, region: region, @@ -5278,91 +5389,91 @@ export default class AvaTaxClient { $skip: skip, $orderBy: orderBy } - }); - var strClientId = - this.appNM + - '; ' + - this.appVer + - '; JavascriptSdk; ' + this.apiVersion + '; ' + - this.machineNM; + }); + var strClientId = + this.appNM + + '; ' + + this.appVer + + '; JavascriptSdk; ' + this.apiVersion + '; ' + + this.machineNM; return this.restCall({ url: path, verb: 'get', payload: null, clientId: strClientId }, FetchResult); - } - - /** - * List jurisdictions hierarchy based on the filter provided + } + + /** + * List jurisdictions hierarchy based on the filter provided * Returns a list of all Avalara-supported taxing jurisdictions hirearchy. * * This API Lists the hierarchical relationship of jurisdictions for US states, identifying the cities and special taxing jurisdictions (STJs) for a given county within a state. * - * The rate, salesRate, and useRate fields are not available on the JurisdictionHirearchyModels returned by this API. - * Swagger Name: AvaTaxClient - * + * The rate, salesRate, and useRate fields are not available on the JurisdictionHirearchyModels 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:* parentId, nexus, rate, salesRate, signatureCode, useRate, isAcm, isSst, createDate, isLocalAdmin, taxAuthorityTypeId * @param {number} top If nonzero, return no more than this number of results. Used with `$skip` to provide pagination for large datasets. Unless otherwise specified, the maximum number of records that can be returned from an API call is 1,000 records. * @param {number} skip If nonzero, skip this number of results before returning data. Used with `$top` to provide pagination for large datasets. - * @param {string} orderBy A comma separated list of sort statements in the format `(fieldname) [ASC|DESC]`, for example `id ASC`. - * @return {FetchResult} - */ - - listJurisdictionsHierarchy({ filter, top, skip, orderBy }: { filter?: string, top?: number, skip?: number, orderBy?: string }): Promise> { - var path = this.buildUrl({ - url: `/api/v2/definitions/jurisdictions/hierarchy`, + * @param {string} orderBy A comma separated list of sort statements in the format `(fieldname) [ASC|DESC]`, for example `id ASC`. + * @return {FetchResult} + */ + + listJurisdictionsHierarchy({ filter, top, skip, orderBy }: { filter?: string, top?: number, skip?: number, orderBy?: string }): Promise> { + var path = this.buildUrl({ + url: `/api/v2/definitions/jurisdictions/hierarchy`, parameters: { $filter: filter, $top: top, $skip: skip, $orderBy: orderBy } - }); - var strClientId = - this.appNM + - '; ' + - this.appVer + - '; JavascriptSdk; ' + this.apiVersion + '; ' + - this.machineNM; + }); + var strClientId = + this.appNM + + '; ' + + this.appVer + + '; JavascriptSdk; ' + this.apiVersion + '; ' + + this.machineNM; return this.restCall({ url: path, verb: 'get', payload: null, clientId: strClientId }, FetchResult); - } - - /** - * List jurisdiction types based on the provided taxTypeId, taxSubTypeId, country, and rateTypeId - * Returns a list of all applicable jurisdiction types based on country, taxTypeId, taxSubTypeId, and rateTypeId - * Swagger Name: AvaTaxClient - * + } + + /** + * List jurisdiction types based on the provided taxTypeId, taxSubTypeId, country, and rateTypeId + * Returns a list of all applicable jurisdiction types based on country, taxTypeId, taxSubTypeId, and rateTypeId + * Swagger Name: AvaTaxClient + * * * @param {string} country The country for which you want to retrieve the jurisdiction information * @param {string} taxTypeId The taxtype for which you want to retrieve the jurisdiction information * @param {string} taxSubTypeId The taxsubtype for which you want to retrieve the jurisdiction information - * @param {string} rateTypeId The ratetype for which you want to retrieve the jurisdiction information - * @return {string[]} - */ - - listJurisdictionTypesByRateTypeTaxTypeMapping({ country, taxTypeId, taxSubTypeId, rateTypeId }: { country: string, taxTypeId: string, taxSubTypeId: string, rateTypeId: string }): Promise> { - var path = this.buildUrl({ - url: `/api/v2/definitions/jurisdictionTypes/countries/${country}/taxtypes/${taxTypeId}/taxsubtypes/${taxSubTypeId}`, + * @param {string} rateTypeId The ratetype for which you want to retrieve the jurisdiction information + * @return {string[]} + */ + + listJurisdictionTypesByRateTypeTaxTypeMapping({ country, taxTypeId, taxSubTypeId, rateTypeId }: { country: string, taxTypeId: string, taxSubTypeId: string, rateTypeId: string }): Promise> { + var path = this.buildUrl({ + url: `/api/v2/definitions/jurisdictionTypes/countries/${country}/taxtypes/${taxTypeId}/taxsubtypes/${taxSubTypeId}`, parameters: { rateTypeId: rateTypeId } - }); - var strClientId = - this.appNM + - '; ' + - this.appVer + - '; JavascriptSdk; ' + this.apiVersion + '; ' + - this.machineNM; + }); + var strClientId = + this.appNM + + '; ' + + this.appVer + + '; JavascriptSdk; ' + this.apiVersion + '; ' + + this.machineNM; return this.restCall({ url: path, verb: 'get', payload: null, clientId: strClientId }, Array); - } - - /** - * Retrieve the list of questions that are required for a tax location + } + + /** + * 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. - * Swagger Name: AvaTaxClient - * + * 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. @@ -5376,13 +5487,13 @@ 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 {number} top If nonzero, return no more than this number of results. Used with `$skip` to provide pagination for large datasets. Unless otherwise specified, the maximum number of records that can be returned from an API call is 1,000 records. * @param {number} skip If nonzero, skip this number of results before returning data. Used with `$top` to provide pagination for large datasets. - * @param {string} orderBy A comma separated list of sort statements in the format `(fieldname) [ASC|DESC]`, for example `id ASC`. - * @return {FetchResult} - */ - - listLocationQuestionsByAddress({ line1, line2, line3, city, region, postalCode, country, latitude, longitude, filter, top, skip, orderBy }: { line1?: string, line2?: string, line3?: string, city?: string, region?: string, postalCode?: string, country?: string, latitude?: number, longitude?: number, filter?: string, top?: number, skip?: number, orderBy?: string }): Promise> { - 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 }: { line1?: string, line2?: string, line3?: string, city?: string, region?: string, postalCode?: string, country?: string, latitude?: number, longitude?: number, filter?: string, top?: number, skip?: number, orderBy?: string }): Promise> { + var path = this.buildUrl({ + url: `/api/v2/definitions/locationquestions`, parameters: { line1: line1, line2: line2, @@ -5398,125 +5509,125 @@ export default class AvaTaxClient { $skip: skip, $orderBy: orderBy } - }); - var strClientId = - this.appNM + - '; ' + - this.appVer + - '; JavascriptSdk; ' + this.apiVersion + '; ' + - this.machineNM; + }); + var strClientId = + this.appNM + + '; ' + + this.appVer + + '; JavascriptSdk; ' + this.apiVersion + '; ' + + this.machineNM; return this.restCall({ url: path, verb: 'get', payload: null, clientId: strClientId }, FetchResult); - } - - /** - * List all forms where logins can be verified automatically + } + + /** + * 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. - * Swagger Name: AvaTaxClient - * + * 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 {number} top If nonzero, return no more than this number of results. Used with `$skip` to provide pagination for large datasets. Unless otherwise specified, the maximum number of records that can be returned from an API call is 1,000 records. * @param {number} skip If nonzero, skip this number of results before returning data. Used with `$top` to provide pagination for large datasets. - * @param {string} orderBy A comma separated list of sort statements in the format `(fieldname) [ASC|DESC]`, for example `id ASC`. - * @return {FetchResult} - */ - - listLoginVerifiers({ filter, top, skip, orderBy }: { filter?: string, top?: number, skip?: number, orderBy?: string }): Promise> { - 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 }: { filter?: string, top?: number, skip?: number, orderBy?: string }): Promise> { + var path = this.buildUrl({ + url: `/api/v2/definitions/filingcalendars/loginverifiers`, parameters: { $filter: filter, $top: top, $skip: skip, $orderBy: orderBy } - }); - var strClientId = - this.appNM + - '; ' + - this.appVer + - '; JavascriptSdk; ' + this.apiVersion + '; ' + - this.machineNM; + }); + var strClientId = + this.appNM + + '; ' + + this.appVer + + '; JavascriptSdk; ' + this.apiVersion + '; ' + + this.machineNM; return this.restCall({ url: path, verb: 'get', payload: null, clientId: strClientId }, FetchResult); - } - - /** - * Retrieve the list of locations for a marketplace. - * Retrieves the list of suggested locations for a marketplace. - * Swagger Name: AvaTaxClient - * + } + + /** + * 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 {number} top If nonzero, return no more than this number of results. Used with `$skip` to provide pagination for large datasets. Unless otherwise specified, the maximum number of records that can be returned from an API call is 1,000 records. * @param {number} skip If nonzero, skip this number of results before returning data. Used with `$top` to provide pagination for large datasets. - * @param {string} orderBy A comma separated list of sort statements in the format `(fieldname) [ASC|DESC]`, for example `id ASC`. - * @return {FetchResult} - */ - - listMarketplaceLocations({ marketplaceId, top, skip, orderBy }: { marketplaceId: string, top?: number, skip?: number, orderBy?: string }): Promise> { - 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 }: { marketplaceId: string, top?: number, skip?: number, orderBy?: string }): Promise> { + var path = this.buildUrl({ + url: `/api/v2/definitions/marketplacelocations`, parameters: { marketplaceId: marketplaceId, $top: top, $skip: skip, $orderBy: orderBy } - }); - var strClientId = - this.appNM + - '; ' + - this.appVer + - '; JavascriptSdk; ' + this.apiVersion + '; ' + - this.machineNM; + }); + var strClientId = + this.appNM + + '; ' + + this.appVer + + '; JavascriptSdk; ' + this.apiVersion + '; ' + + this.machineNM; return this.restCall({ url: path, verb: 'get', payload: null, clientId: strClientId }, FetchResult); - } - - /** - * Retrieve the full list of Avalara-supported nexus for all countries and regions. + } + + /** + * 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. - * Swagger Name: AvaTaxClient - * + * 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 * @param {number} top If nonzero, return no more than this number of results. Used with `$skip` to provide pagination for large datasets. Unless otherwise specified, the maximum number of records that can be returned from an API call is 1,000 records. * @param {number} skip If nonzero, skip this number of results before returning data. Used with `$top` to provide pagination for large datasets. - * @param {string} orderBy A comma separated list of sort statements in the format `(fieldname) [ASC|DESC]`, for example `id ASC`. - * @return {FetchResult} - */ - - listNexus({ filter, top, skip, orderBy }: { filter?: string, top?: number, skip?: number, orderBy?: string }): Promise> { - 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 }: { filter?: string, top?: number, skip?: number, orderBy?: string }): Promise> { + var path = this.buildUrl({ + url: `/api/v2/definitions/nexus`, parameters: { $filter: filter, $top: top, $skip: skip, $orderBy: orderBy } - }); - var strClientId = - this.appNM + - '; ' + - this.appVer + - '; JavascriptSdk; ' + this.apiVersion + '; ' + - this.machineNM; + }); + var strClientId = + this.appNM + + '; ' + + this.appVer + + '; JavascriptSdk; ' + this.apiVersion + '; ' + + this.machineNM; return this.restCall({ url: path, verb: 'get', payload: null, clientId: strClientId }, FetchResult); - } - - /** - * List all nexus that apply to a specific address. + } + + /** + * 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. - * Swagger Name: AvaTaxClient - * + * 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. @@ -5528,13 +5639,13 @@ 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 * @param {number} top If nonzero, return no more than this number of results. Used with `$skip` to provide pagination for large datasets. Unless otherwise specified, the maximum number of records that can be returned from an API call is 1,000 records. * @param {number} skip If nonzero, skip this number of results before returning data. Used with `$top` to provide pagination for large datasets. - * @param {string} orderBy A comma separated list of sort statements in the format `(fieldname) [ASC|DESC]`, for example `id ASC`. - * @return {FetchResult} - */ - - listNexusByAddress({ line1, line2, line3, city, region, postalCode, country, filter, top, skip, orderBy }: { line1?: string, line2?: string, line3?: string, city?: string, region: string, postalCode?: string, country: string, filter?: string, top?: number, skip?: number, orderBy?: string }): Promise> { - 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 }: { line1?: string, line2?: string, line3?: string, city?: string, region: string, postalCode?: string, country: string, filter?: string, top?: number, skip?: number, orderBy?: string }): Promise> { + var path = this.buildUrl({ + url: `/api/v2/definitions/nexus/byaddress`, parameters: { line1: line1, line2: line2, @@ -5548,89 +5659,89 @@ export default class AvaTaxClient { $skip: skip, $orderBy: orderBy } - }); - var strClientId = - this.appNM + - '; ' + - this.appVer + - '; JavascriptSdk; ' + this.apiVersion + '; ' + - this.machineNM; + }); + var strClientId = + this.appNM + + '; ' + + this.appVer + + '; JavascriptSdk; ' + this.apiVersion + '; ' + + this.machineNM; return this.restCall({ url: path, verb: 'get', payload: null, clientId: strClientId }, FetchResult); - } - - /** - * Retrieve the full list of Avalara-supported nexus for a country. + } + + /** + * 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. - * Swagger Name: AvaTaxClient - * + * 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 * @param {number} top If nonzero, return no more than this number of results. Used with `$skip` to provide pagination for large datasets. Unless otherwise specified, the maximum number of records that can be returned from an API call is 1,000 records. * @param {number} skip If nonzero, skip this number of results before returning data. Used with `$top` to provide pagination for large datasets. - * @param {string} orderBy A comma separated list of sort statements in the format `(fieldname) [ASC|DESC]`, for example `id ASC`. - * @return {FetchResult} - */ - - listNexusByCountry({ country, filter, top, skip, orderBy }: { country: string, filter?: string, top?: number, skip?: number, orderBy?: string }): Promise> { - 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 }: { country: string, filter?: string, top?: number, skip?: number, orderBy?: string }): Promise> { + var path = this.buildUrl({ + url: `/api/v2/definitions/nexus/${country}`, parameters: { $filter: filter, $top: top, $skip: skip, $orderBy: orderBy } - }); - var strClientId = - this.appNM + - '; ' + - this.appVer + - '; JavascriptSdk; ' + this.apiVersion + '; ' + - this.machineNM; + }); + var strClientId = + this.appNM + + '; ' + + this.appVer + + '; JavascriptSdk; ' + this.apiVersion + '; ' + + this.machineNM; return this.restCall({ url: path, verb: 'get', payload: null, clientId: strClientId }, FetchResult); - } - - /** - * Retrieve the full list of Avalara-supported nexus for a country and region. + } + + /** + * 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. - * Swagger Name: AvaTaxClient - * + * 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 * @param {number} top If nonzero, return no more than this number of results. Used with `$skip` to provide pagination for large datasets. Unless otherwise specified, the maximum number of records that can be returned from an API call is 1,000 records. * @param {number} skip If nonzero, skip this number of results before returning data. Used with `$top` to provide pagination for large datasets. - * @param {string} orderBy A comma separated list of sort statements in the format `(fieldname) [ASC|DESC]`, for example `id ASC`. - * @return {FetchResult} - */ - - listNexusByCountryAndRegion({ country, region, filter, top, skip, orderBy }: { country: string, region: string, filter?: string, top?: number, skip?: number, orderBy?: string }): Promise> { - 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 }: { country: string, region: string, filter?: string, top?: number, skip?: number, orderBy?: string }): Promise> { + var path = this.buildUrl({ + url: `/api/v2/definitions/nexus/${country}/${region}`, parameters: { $filter: filter, $top: top, $skip: skip, $orderBy: orderBy } - }); - var strClientId = - this.appNM + - '; ' + - this.appVer + - '; JavascriptSdk; ' + this.apiVersion + '; ' + - this.machineNM; + }); + var strClientId = + this.appNM + + '; ' + + this.appVer + + '; JavascriptSdk; ' + this.apiVersion + '; ' + + this.machineNM; return this.restCall({ url: path, verb: 'get', payload: null, clientId: strClientId }, FetchResult); - } - - /** - * List nexus related to a tax form + } + + /** + * 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 @@ -5645,462 +5756,462 @@ export default class AvaTaxClient { * * ### Security Policies * - * * This API requires one of the following user roles: AccountAdmin, AccountUser, BatchServiceAdmin, CompanyAdmin, CompanyUser, Compliance Root User, ComplianceAdmin, ComplianceUser, CSPAdmin, CSPTester, FirmAdmin, FirmUser, SiteAdmin, SSTAdmin, SystemAdmin, TechnicalSupportAdmin, TechnicalSupportUser. - * Swagger Name: AvaTaxClient - * + * * This API requires one of the following user roles: AccountAdmin, AccountUser, BatchServiceAdmin, 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 {Models.NexusByTaxFormModel} - */ - - listNexusByFormCode({ formCode }: { formCode: string }): Promise { - var path = this.buildUrl({ - url: `/api/v2/definitions/nexus/byform/${formCode}`, - parameters: {} - }); - var strClientId = - this.appNM + - '; ' + - this.appVer + - '; JavascriptSdk; ' + this.apiVersion + '; ' + - this.machineNM; + * @param {string} formCode The form code that we are looking up the nexus for + * @return {Models.NexusByTaxFormModel} + */ + + listNexusByFormCode({ formCode }: { formCode: string }): Promise { + var path = this.buildUrl({ + url: `/api/v2/definitions/nexus/byform/${formCode}`, + parameters: {} + }); + var strClientId = + this.appNM + + '; ' + + this.appVer + + '; JavascriptSdk; ' + this.apiVersion + '; ' + + this.machineNM; return this.restCall({ url: path, verb: 'get', payload: null, clientId: strClientId }, Models.NexusByTaxFormModel); - } - - /** - * Retrieve the full list of Avalara-supported nexus for a tax type group. + } + + /** + * 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. - * Swagger Name: AvaTaxClient - * + * 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 * @param {number} top If nonzero, return no more than this number of results. Used with `$skip` to provide pagination for large datasets. Unless otherwise specified, the maximum number of records that can be returned from an API call is 1,000 records. * @param {number} skip If nonzero, skip this number of results before returning data. Used with `$top` to provide pagination for large datasets. - * @param {string} orderBy A comma separated list of sort statements in the format `(fieldname) [ASC|DESC]`, for example `id ASC`. - * @return {FetchResult} - */ - - listNexusByTaxTypeGroup({ taxTypeGroup, filter, top, skip, orderBy }: { taxTypeGroup: string, filter?: string, top?: number, skip?: number, orderBy?: string }): Promise> { - 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 }: { taxTypeGroup: string, filter?: string, top?: number, skip?: number, orderBy?: string }): Promise> { + var path = this.buildUrl({ + url: `/api/v2/definitions/nexus/bytaxtypegroup/${taxTypeGroup}`, parameters: { $filter: filter, $top: top, $skip: skip, $orderBy: orderBy } - }); - var strClientId = - this.appNM + - '; ' + - this.appVer + - '; JavascriptSdk; ' + this.apiVersion + '; ' + - this.machineNM; + }); + var strClientId = + this.appNM + + '; ' + + this.appVer + + '; JavascriptSdk; ' + this.apiVersion + '; ' + + this.machineNM; return this.restCall({ url: path, verb: 'get', payload: null, clientId: strClientId }, FetchResult); - } - - /** - * Retrieve the full list of nexus tax type groups + } + + /** + * 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. - * Swagger Name: AvaTaxClient - * + * 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 {number} top If nonzero, return no more than this number of results. Used with `$skip` to provide pagination for large datasets. Unless otherwise specified, the maximum number of records that can be returned from an API call is 1,000 records. * @param {number} skip If nonzero, skip this number of results before returning data. Used with `$top` to provide pagination for large datasets. - * @param {string} orderBy A comma separated list of sort statements in the format `(fieldname) [ASC|DESC]`, for example `id ASC`. - * @return {FetchResult} - */ - - listNexusTaxTypeGroups({ filter, top, skip, orderBy }: { filter?: string, top?: number, skip?: number, orderBy?: string }): Promise> { - 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 }: { filter?: string, top?: number, skip?: number, orderBy?: string }): Promise> { + var path = this.buildUrl({ + url: `/api/v2/definitions/nexustaxtypegroups`, parameters: { $filter: filter, $top: top, $skip: skip, $orderBy: orderBy } - }); - var strClientId = - this.appNM + - '; ' + - this.appVer + - '; JavascriptSdk; ' + this.apiVersion + '; ' + - this.machineNM; + }); + var strClientId = + this.appNM + + '; ' + + this.appVer + + '; JavascriptSdk; ' + this.apiVersion + '; ' + + this.machineNM; return this.restCall({ url: path, verb: 'get', payload: null, clientId: strClientId }, FetchResult); - } - - /** - * Retrieve the full list of Avalara-supported tax notice customer funding options. + } + + /** + * 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. - * Swagger Name: AvaTaxClient - * + * 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 {number} top If nonzero, return no more than this number of results. Used with `$skip` to provide pagination for large datasets. Unless otherwise specified, the maximum number of records that can be returned from an API call is 1,000 records. * @param {number} skip If nonzero, skip this number of results before returning data. Used with `$top` to provide pagination for large datasets. - * @param {string} orderBy A comma separated list of sort statements in the format `(fieldname) [ASC|DESC]`, for example `id ASC`. - * @return {FetchResult} - */ - - listNoticeCustomerFundingOptions({ filter, top, skip, orderBy }: { filter?: string, top?: number, skip?: number, orderBy?: string }): Promise> { - 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 }: { filter?: string, top?: number, skip?: number, orderBy?: string }): Promise> { + var path = this.buildUrl({ + url: `/api/v2/definitions/noticecustomerfundingoptions`, parameters: { $filter: filter, $top: top, $skip: skip, $orderBy: orderBy } - }); - var strClientId = - this.appNM + - '; ' + - this.appVer + - '; JavascriptSdk; ' + this.apiVersion + '; ' + - this.machineNM; + }); + var strClientId = + this.appNM + + '; ' + + this.appVer + + '; JavascriptSdk; ' + this.apiVersion + '; ' + + this.machineNM; return this.restCall({ url: path, verb: 'get', payload: null, clientId: strClientId }, FetchResult); - } - - /** - * Retrieve the full list of Avalara-supported tax notice customer types. + } + + /** + * 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. - * Swagger Name: AvaTaxClient - * + * 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 {number} top If nonzero, return no more than this number of results. Used with `$skip` to provide pagination for large datasets. Unless otherwise specified, the maximum number of records that can be returned from an API call is 1,000 records. * @param {number} skip If nonzero, skip this number of results before returning data. Used with `$top` to provide pagination for large datasets. - * @param {string} orderBy A comma separated list of sort statements in the format `(fieldname) [ASC|DESC]`, for example `id ASC`. - * @return {FetchResult} - */ - - listNoticeCustomerTypes({ filter, top, skip, orderBy }: { filter?: string, top?: number, skip?: number, orderBy?: string }): Promise> { - 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 }: { filter?: string, top?: number, skip?: number, orderBy?: string }): Promise> { + var path = this.buildUrl({ + url: `/api/v2/definitions/noticecustomertypes`, parameters: { $filter: filter, $top: top, $skip: skip, $orderBy: orderBy } - }); - var strClientId = - this.appNM + - '; ' + - this.appVer + - '; JavascriptSdk; ' + this.apiVersion + '; ' + - this.machineNM; + }); + var strClientId = + this.appNM + + '; ' + + this.appVer + + '; JavascriptSdk; ' + this.apiVersion + '; ' + + this.machineNM; return this.restCall({ url: path, verb: 'get', payload: null, clientId: strClientId }, FetchResult); - } - - /** - * Retrieve the full list of Avalara-supported tax notice filing types. + } + + /** + * 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. - * Swagger Name: AvaTaxClient - * + * 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 {number} top If nonzero, return no more than this number of results. Used with `$skip` to provide pagination for large datasets. Unless otherwise specified, the maximum number of records that can be returned from an API call is 1,000 records. * @param {number} skip If nonzero, skip this number of results before returning data. Used with `$top` to provide pagination for large datasets. - * @param {string} orderBy A comma separated list of sort statements in the format `(fieldname) [ASC|DESC]`, for example `id ASC`. - * @return {FetchResult} - */ - - listNoticeFilingtypes({ filter, top, skip, orderBy }: { filter?: string, top?: number, skip?: number, orderBy?: string }): Promise> { - 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 }: { filter?: string, top?: number, skip?: number, orderBy?: string }): Promise> { + var path = this.buildUrl({ + url: `/api/v2/definitions/noticefilingtypes`, parameters: { $filter: filter, $top: top, $skip: skip, $orderBy: orderBy } - }); - var strClientId = - this.appNM + - '; ' + - this.appVer + - '; JavascriptSdk; ' + this.apiVersion + '; ' + - this.machineNM; + }); + var strClientId = + this.appNM + + '; ' + + this.appVer + + '; JavascriptSdk; ' + this.apiVersion + '; ' + + this.machineNM; return this.restCall({ url: path, verb: 'get', payload: null, clientId: strClientId }, FetchResult); - } - - /** - * Retrieve the full list of Avalara-supported tax notice priorities. + } + + /** + * 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. - * Swagger Name: AvaTaxClient - * + * 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 {number} top If nonzero, return no more than this number of results. Used with `$skip` to provide pagination for large datasets. Unless otherwise specified, the maximum number of records that can be returned from an API call is 1,000 records. * @param {number} skip If nonzero, skip this number of results before returning data. Used with `$top` to provide pagination for large datasets. - * @param {string} orderBy A comma separated list of sort statements in the format `(fieldname) [ASC|DESC]`, for example `id ASC`. - * @return {FetchResult} - */ - - listNoticePriorities({ filter, top, skip, orderBy }: { filter?: string, top?: number, skip?: number, orderBy?: string }): Promise> { - 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 }: { filter?: string, top?: number, skip?: number, orderBy?: string }): Promise> { + var path = this.buildUrl({ + url: `/api/v2/definitions/noticepriorities`, parameters: { $filter: filter, $top: top, $skip: skip, $orderBy: orderBy } - }); - var strClientId = - this.appNM + - '; ' + - this.appVer + - '; JavascriptSdk; ' + this.apiVersion + '; ' + - this.machineNM; + }); + var strClientId = + this.appNM + + '; ' + + this.appVer + + '; JavascriptSdk; ' + this.apiVersion + '; ' + + this.machineNM; return this.restCall({ url: path, verb: 'get', payload: null, clientId: strClientId }, FetchResult); - } - - /** - * Retrieve the full list of Avalara-supported tax notice reasons. + } + + /** + * 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. - * Swagger Name: AvaTaxClient - * + * 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 {number} top If nonzero, return no more than this number of results. Used with `$skip` to provide pagination for large datasets. Unless otherwise specified, the maximum number of records that can be returned from an API call is 1,000 records. * @param {number} skip If nonzero, skip this number of results before returning data. Used with `$top` to provide pagination for large datasets. - * @param {string} orderBy A comma separated list of sort statements in the format `(fieldname) [ASC|DESC]`, for example `id ASC`. - * @return {FetchResult} - */ - - listNoticeReasons({ filter, top, skip, orderBy }: { filter?: string, top?: number, skip?: number, orderBy?: string }): Promise> { - 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 }: { filter?: string, top?: number, skip?: number, orderBy?: string }): Promise> { + var path = this.buildUrl({ + url: `/api/v2/definitions/noticereasons`, parameters: { $filter: filter, $top: top, $skip: skip, $orderBy: orderBy } - }); - var strClientId = - this.appNM + - '; ' + - this.appVer + - '; JavascriptSdk; ' + this.apiVersion + '; ' + - this.machineNM; + }); + var strClientId = + this.appNM + + '; ' + + this.appVer + + '; JavascriptSdk; ' + this.apiVersion + '; ' + + this.machineNM; return this.restCall({ url: path, verb: 'get', payload: null, clientId: strClientId }, FetchResult); - } - - /** - * Retrieve the full list of Avalara-supported tax notice responsibility ids + } + + /** + * 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. - * Swagger Name: AvaTaxClient - * + * 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 {number} top If nonzero, return no more than this number of results. Used with `$skip` to provide pagination for large datasets. Unless otherwise specified, the maximum number of records that can be returned from an API call is 1,000 records. * @param {number} skip If nonzero, skip this number of results before returning data. Used with `$top` to provide pagination for large datasets. - * @param {string} orderBy A comma separated list of sort statements in the format `(fieldname) [ASC|DESC]`, for example `id ASC`. - * @return {FetchResult} - */ - - listNoticeResponsibilities({ filter, top, skip, orderBy }: { filter?: string, top?: number, skip?: number, orderBy?: string }): Promise> { - 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 }: { filter?: string, top?: number, skip?: number, orderBy?: string }): Promise> { + var path = this.buildUrl({ + url: `/api/v2/definitions/noticeresponsibilities`, parameters: { $filter: filter, $top: top, $skip: skip, $orderBy: orderBy } - }); - var strClientId = - this.appNM + - '; ' + - this.appVer + - '; JavascriptSdk; ' + this.apiVersion + '; ' + - this.machineNM; + }); + var strClientId = + this.appNM + + '; ' + + this.appVer + + '; JavascriptSdk; ' + this.apiVersion + '; ' + + this.machineNM; return this.restCall({ url: path, verb: 'get', payload: null, clientId: strClientId }, FetchResult); - } - - /** - * Retrieve the full list of Avalara-supported tax notice root causes + } + + /** + * 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. - * Swagger Name: AvaTaxClient - * + * 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 {number} top If nonzero, return no more than this number of results. Used with `$skip` to provide pagination for large datasets. Unless otherwise specified, the maximum number of records that can be returned from an API call is 1,000 records. * @param {number} skip If nonzero, skip this number of results before returning data. Used with `$top` to provide pagination for large datasets. - * @param {string} orderBy A comma separated list of sort statements in the format `(fieldname) [ASC|DESC]`, for example `id ASC`. - * @return {FetchResult} - */ - - listNoticeRootCauses({ filter, top, skip, orderBy }: { filter?: string, top?: number, skip?: number, orderBy?: string }): Promise> { - 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 }: { filter?: string, top?: number, skip?: number, orderBy?: string }): Promise> { + var path = this.buildUrl({ + url: `/api/v2/definitions/noticerootcauses`, parameters: { $filter: filter, $top: top, $skip: skip, $orderBy: orderBy } - }); - var strClientId = - this.appNM + - '; ' + - this.appVer + - '; JavascriptSdk; ' + this.apiVersion + '; ' + - this.machineNM; + }); + var strClientId = + this.appNM + + '; ' + + this.appVer + + '; JavascriptSdk; ' + this.apiVersion + '; ' + + this.machineNM; return this.restCall({ url: path, verb: 'get', payload: null, clientId: strClientId }, FetchResult); - } - - /** - * Retrieve the full list of Avalara-supported tax notice statuses. + } + + /** + * 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. - * Swagger Name: AvaTaxClient - * + * 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, activeFlag * @param {number} top If nonzero, return no more than this number of results. Used with `$skip` to provide pagination for large datasets. Unless otherwise specified, the maximum number of records that can be returned from an API call is 1,000 records. * @param {number} skip If nonzero, skip this number of results before returning data. Used with `$top` to provide pagination for large datasets. - * @param {string} orderBy A comma separated list of sort statements in the format `(fieldname) [ASC|DESC]`, for example `id ASC`. - * @return {FetchResult} - */ - - listNoticeStatuses({ filter, top, skip, orderBy }: { filter?: string, top?: number, skip?: number, orderBy?: string }): Promise> { - 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 }: { filter?: string, top?: number, skip?: number, orderBy?: string }): Promise> { + var path = this.buildUrl({ + url: `/api/v2/definitions/noticestatuses`, parameters: { $filter: filter, $top: top, $skip: skip, $orderBy: orderBy } - }); - var strClientId = - this.appNM + - '; ' + - this.appVer + - '; JavascriptSdk; ' + this.apiVersion + '; ' + - this.machineNM; + }); + var strClientId = + this.appNM + + '; ' + + this.appVer + + '; JavascriptSdk; ' + this.apiVersion + '; ' + + this.machineNM; return this.restCall({ url: path, verb: 'get', payload: null, clientId: strClientId }, FetchResult); - } - - /** - * Retrieve the full list of Avalara-supported tax notice types. + } + + /** + * 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. - * Swagger Name: AvaTaxClient - * + * 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 {number} top If nonzero, return no more than this number of results. Used with `$skip` to provide pagination for large datasets. Unless otherwise specified, the maximum number of records that can be returned from an API call is 1,000 records. * @param {number} skip If nonzero, skip this number of results before returning data. Used with `$top` to provide pagination for large datasets. - * @param {string} orderBy A comma separated list of sort statements in the format `(fieldname) [ASC|DESC]`, for example `id ASC`. - * @return {FetchResult} - */ - - listNoticeTypes({ filter, top, skip, orderBy }: { filter?: string, top?: number, skip?: number, orderBy?: string }): Promise> { - 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 }: { filter?: string, top?: number, skip?: number, orderBy?: string }): Promise> { + var path = this.buildUrl({ + url: `/api/v2/definitions/noticetypes`, parameters: { $filter: filter, $top: top, $skip: skip, $orderBy: orderBy } - }); - var strClientId = - this.appNM + - '; ' + - this.appVer + - '; JavascriptSdk; ' + this.apiVersion + '; ' + - this.machineNM; + }); + var strClientId = + this.appNM + + '; ' + + this.appVer + + '; JavascriptSdk; ' + this.apiVersion + '; ' + + this.machineNM; return this.restCall({ url: path, verb: 'get', payload: null, clientId: strClientId }, FetchResult); - } - - /** - * Retrieve the full list of Avalara-supported extra parameters for creating transactions. + } + + /** + * 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. - * Swagger Name: AvaTaxClient - * + * 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, attributeSubType, values * @param {number} top If nonzero, return no more than this number of results. Used with `$skip` to provide pagination for large datasets. Unless otherwise specified, the maximum number of records that can be returned from an API call is 1,000 records. * @param {number} skip If nonzero, skip this number of results before returning data. Used with `$top` to provide pagination for large datasets. - * @param {string} orderBy A comma separated list of sort statements in the format `(fieldname) [ASC|DESC]`, for example `id ASC`. - * @return {FetchResult} - */ - - listParameters({ filter, top, skip, orderBy }: { filter?: string, top?: number, skip?: number, orderBy?: string }): Promise> { - 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 }: { filter?: string, top?: number, skip?: number, orderBy?: string }): Promise> { + var path = this.buildUrl({ + url: `/api/v2/definitions/parameters`, parameters: { $filter: filter, $top: top, $skip: skip, $orderBy: orderBy } - }); - var strClientId = - this.appNM + - '; ' + - this.appVer + - '; JavascriptSdk; ' + this.apiVersion + '; ' + - this.machineNM; + }); + var strClientId = + this.appNM + + '; ' + + this.appVer + + '; JavascriptSdk; ' + this.apiVersion + '; ' + + this.machineNM; return this.restCall({ url: path, verb: 'get', payload: null, clientId: strClientId }, FetchResult); - } - - /** - * Retrieve the list of Avalara-supported parameters based on account subscriptions. - * Returns the list of Avalara-supported parameters based on account subscriptions. - * Swagger Name: AvaTaxClient - * + } + + /** + * Retrieve the list of Avalara-supported parameters based on account subscriptions. + * Returns the list of Avalara-supported parameters based on account subscriptions. + * Swagger Name: AvaTaxClient + * * * @param {number} accountId The ID of the account to retrieve the parameters. * @param {string} filter A filter statement to identify specific records to retrieve. For more information on filtering, see [Filtering in REST](http://developer.avalara.com/avatax/filtering-in-rest/).
*Not filterable:* serviceTypes, regularExpression, attributeSubType, values * @param {number} top If nonzero, return no more than this number of results. Used with `$skip` to provide pagination for large datasets. Unless otherwise specified, the maximum number of records that can be returned from an API call is 1,000 records. * @param {number} skip If nonzero, skip this number of results before returning data. Used with `$top` to provide pagination for large datasets. - * @param {string} orderBy A comma separated list of sort statements in the format `(fieldname) [ASC|DESC]`, for example `id ASC`. - * @return {FetchResult} - */ - - listParametersByAccount({ accountId, filter, top, skip, orderBy }: { accountId: number, filter?: string, top?: number, skip?: number, orderBy?: string }): Promise> { - var path = this.buildUrl({ - url: `/api/v2/definitions/accounts/${accountId}/parameters`, + * @param {string} orderBy A comma separated list of sort statements in the format `(fieldname) [ASC|DESC]`, for example `id ASC`. + * @return {FetchResult} + */ + + listParametersByAccount({ accountId, filter, top, skip, orderBy }: { accountId: number, filter?: string, top?: number, skip?: number, orderBy?: string }): Promise> { + var path = this.buildUrl({ + url: `/api/v2/definitions/accounts/${accountId}/parameters`, parameters: { $filter: filter, $top: top, $skip: skip, $orderBy: orderBy } - }); - var strClientId = - this.appNM + - '; ' + - this.appVer + - '; JavascriptSdk; ' + this.apiVersion + '; ' + - this.machineNM; + }); + var strClientId = + this.appNM + + '; ' + + this.appVer + + '; JavascriptSdk; ' + this.apiVersion + '; ' + + this.machineNM; return this.restCall({ url: path, verb: 'get', payload: null, clientId: strClientId }, FetchResult); - } - - /** - * Retrieve the parameters by companyCode and itemCode. + } + + /** + * 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. @@ -6118,118 +6229,118 @@ export default class AvaTaxClient { * * ### Security Policies * - * * This API requires one of the following user roles: AccountAdmin, AccountUser, BatchServiceAdmin, CompanyAdmin, CompanyUser, CSPAdmin, CSPTester, SiteAdmin, SSTAdmin, SystemAdmin, TechnicalSupportAdmin, TechnicalSupportUser. - * Swagger Name: AvaTaxClient - * + * * This API requires one of the following user roles: AccountAdmin, AccountUser, BatchServiceAdmin, CompanyAdmin, CompanyUser, CSPAdmin, CSPTester, SiteAdmin, SSTAdmin, SystemAdmin, TechnicalSupportAdmin, TechnicalSupportUser. + * Swagger Name: AvaTaxClient + * * * @param {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, attributeSubType, values * @param {number} top If nonzero, return no more than this number of results. Used with `$skip` to provide pagination for large datasets. Unless otherwise specified, the maximum number of records that can be returned from an API call is 1,000 records. * @param {number} skip If nonzero, skip this number of results before returning data. Used with `$top` to provide pagination for large datasets. - * @param {string} orderBy A comma separated list of sort statements in the format `(fieldname) [ASC|DESC]`, for example `id ASC`. - * @return {FetchResult} - */ - - listParametersByItem({ companyCode, itemCode, filter, top, skip, orderBy }: { companyCode: string, itemCode: string, filter?: string, top?: number, skip?: number, orderBy?: string }): Promise> { - 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 }: { companyCode: string, itemCode: string, filter?: string, top?: number, skip?: number, orderBy?: string }): Promise> { + var path = this.buildUrl({ + url: `/api/v2/definitions/parameters/byitem/${companyCode}/${itemCode}`, parameters: { $filter: filter, $top: top, $skip: skip, $orderBy: orderBy } - }); - var strClientId = - this.appNM + - '; ' + - this.appVer + - '; JavascriptSdk; ' + this.apiVersion + '; ' + - this.machineNM; + }); + var strClientId = + this.appNM + + '; ' + + this.appVer + + '; JavascriptSdk; ' + this.apiVersion + '; ' + + this.machineNM; return this.restCall({ url: path, verb: 'get', payload: null, clientId: strClientId }, FetchResult); - } - - /** - * Retrieve the full list of Avalara-supported usage of extra parameters for creating transactions. + } + + /** + * 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. - * Swagger Name: AvaTaxClient - * + * 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:* attributeSubType, values, valueDescriptions * @param {number} top If nonzero, return no more than this number of results. Used with `$skip` to provide pagination for large datasets. Unless otherwise specified, the maximum number of records that can be returned from an API call is 1,000 records. * @param {number} skip If nonzero, skip this number of results before returning data. Used with `$top` to provide pagination for large datasets. - * @param {string} orderBy A comma separated list of sort statements in the format `(fieldname) [ASC|DESC]`, for example `id ASC`. - * @return {FetchResult} - */ - - listParametersUsage({ filter, top, skip, orderBy }: { filter?: string, top?: number, skip?: number, orderBy?: string }): Promise> { - 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 }: { filter?: string, top?: number, skip?: number, orderBy?: string }): Promise> { + var path = this.buildUrl({ + url: `/api/v2/definitions/parametersusage`, parameters: { $filter: filter, $top: top, $skip: skip, $orderBy: orderBy } - }); - var strClientId = - this.appNM + - '; ' + - this.appVer + - '; JavascriptSdk; ' + this.apiVersion + '; ' + - this.machineNM; + }); + var strClientId = + this.appNM + + '; ' + + this.appVer + + '; JavascriptSdk; ' + this.apiVersion + '; ' + + this.machineNM; return this.restCall({ url: path, verb: 'get', payload: null, clientId: strClientId }, FetchResult); - } - - /** - * Retrieve the full list of Avalara-supported permissions + } + + /** + * 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. - * Swagger Name: AvaTaxClient - * + * This API is intended to be useful to identify the capabilities of a particular user logon. + * Swagger Name: AvaTaxClient + * * * @param {number} top If nonzero, return no more than this number of results. Used with `$skip` to provide pagination for large datasets. Unless otherwise specified, the maximum number of records that can be returned from an API call is 1,000 records. - * @param {number} skip If nonzero, skip this number of results before returning data. Used with `$top` to provide pagination for large datasets. - * @return {FetchResult} - */ - - listPermissions({ top, skip }: { top?: number, skip?: number }): Promise> { - var path = this.buildUrl({ - url: `/api/v2/definitions/permissions`, + * @param {number} 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 }: { top?: number, skip?: number }): Promise> { + var path = this.buildUrl({ + url: `/api/v2/definitions/permissions`, parameters: { $top: top, $skip: skip } - }); - var strClientId = - this.appNM + - '; ' + - this.appVer + - '; JavascriptSdk; ' + this.apiVersion + '; ' + - this.machineNM; + }); + var strClientId = + this.appNM + + '; ' + + this.appVer + + '; JavascriptSdk; ' + this.apiVersion + '; ' + + this.machineNM; return this.restCall({ url: path, verb: 'get', payload: null, clientId: strClientId }, FetchResult); - } - - /** - * Retrieve the full list of Avalara-supported postal codes. - * Retrieves the list of Avalara-supported postal codes. - * Swagger Name: AvaTaxClient - * + } + + /** + * 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 {number} top If nonzero, return no more than this number of results. Used with `$skip` to provide pagination for large datasets. Unless otherwise specified, the maximum number of records that can be returned from an API call is 1,000 records. * @param {number} skip If nonzero, skip this number of results before returning data. Used with `$top` to provide pagination for large datasets. * @param {string} orderBy A comma separated list of sort statements in the format `(fieldname) [ASC|DESC]`, for example `id ASC`. - * @param {boolean} includeExpiredPostalCodes If set to true, returns expired postal codes. Defaults to false - * @return {FetchResult} - */ - - listPostalCodes({ filter, top, skip, orderBy, includeExpiredPostalCodes }: { filter?: string, top?: number, skip?: number, orderBy?: string, includeExpiredPostalCodes?: boolean }): Promise> { - var path = this.buildUrl({ - url: `/api/v2/definitions/postalcodes`, + * @param {boolean} includeExpiredPostalCodes If set to true, returns expired postal codes. Defaults to false + * @return {FetchResult} + */ + + listPostalCodes({ filter, top, skip, orderBy, includeExpiredPostalCodes }: { filter?: string, top?: number, skip?: number, orderBy?: string, includeExpiredPostalCodes?: boolean }): Promise> { + var path = this.buildUrl({ + url: `/api/v2/definitions/postalcodes`, parameters: { $filter: filter, $top: top, @@ -6237,18 +6348,18 @@ export default class AvaTaxClient { $orderBy: orderBy, includeExpiredPostalCodes: includeExpiredPostalCodes } - }); - var strClientId = - this.appNM + - '; ' + - this.appVer + - '; JavascriptSdk; ' + this.apiVersion + '; ' + - this.machineNM; + }); + var strClientId = + this.appNM + + '; ' + + this.appVer + + '; JavascriptSdk; ' + this.apiVersion + '; ' + + this.machineNM; return this.restCall({ url: path, verb: 'get', payload: null, clientId: strClientId }, FetchResult); - } - - /** - * List all customs duty programs recognized by AvaTax + } + + /** + * 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. @@ -6257,56 +6368,56 @@ 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. - * Swagger Name: AvaTaxClient - * + * 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 {number} top If nonzero, return no more than this number of results. Used with `$skip` to provide pagination for large datasets. Unless otherwise specified, the maximum number of records that can be returned from an API call is 1,000 records. * @param {number} skip If nonzero, skip this number of results before returning data. Used with `$top` to provide pagination for large datasets. - * @param {string} orderBy A comma separated list of sort statements in the format `(fieldname) [ASC|DESC]`, for example `id ASC`. - * @return {FetchResult} - */ - - listPreferredPrograms({ filter, top, skip, orderBy }: { filter?: string, top?: number, skip?: number, orderBy?: string }): Promise> { - 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 }: { filter?: string, top?: number, skip?: number, orderBy?: string }): Promise> { + var path = this.buildUrl({ + url: `/api/v2/definitions/preferredprograms`, parameters: { $filter: filter, $top: top, $skip: skip, $orderBy: orderBy } - }); - var strClientId = - this.appNM + - '; ' + - this.appVer + - '; JavascriptSdk; ' + this.apiVersion + '; ' + - this.machineNM; + }); + var strClientId = + this.appNM + + '; ' + + this.appVer + + '; JavascriptSdk; ' + this.apiVersion + '; ' + + this.machineNM; return this.restCall({ url: path, verb: 'get', payload: null, clientId: strClientId }, FetchResult); - } - - /** - * List all available product classification systems. + } + + /** + * 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. - * Swagger Name: AvaTaxClient - * + * 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 {number} top If nonzero, return no more than this number of results. Used with `$skip` to provide pagination for large datasets. Unless otherwise specified, the maximum number of records that can be returned from an API call is 1,000 records. * @param {number} skip If nonzero, skip this number of results before returning data. Used with `$top` to provide pagination for large datasets. * @param {string} orderBy A comma separated list of sort statements in the format `(fieldname) [ASC|DESC]`, for example `id ASC`. - * @param {string} countryCode If not null, return all records with this code. - * @return {FetchResult} - */ - - listProductClassificationSystems({ filter, top, skip, orderBy, countryCode }: { filter?: string, top?: number, skip?: number, orderBy?: string, countryCode?: string }): Promise> { - 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 }: { filter?: string, top?: number, skip?: number, orderBy?: string, countryCode?: string }): Promise> { + var path = this.buildUrl({ + url: `/api/v2/definitions/productclassificationsystems`, parameters: { $filter: filter, $top: top, @@ -6314,18 +6425,18 @@ export default class AvaTaxClient { $orderBy: orderBy, $countryCode: countryCode } - }); - var strClientId = - this.appNM + - '; ' + - this.appVer + - '; JavascriptSdk; ' + this.apiVersion + '; ' + - this.machineNM; + }); + var strClientId = + this.appNM + + '; ' + + this.appVer + + '; JavascriptSdk; ' + this.apiVersion + '; ' + + this.machineNM; return this.restCall({ url: path, verb: 'get', payload: null, clientId: strClientId }, FetchResult); - } - - /** - * List all product classification systems available to a company based on its nexus. + } + + /** + * 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. @@ -6337,22 +6448,22 @@ 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' - * Swagger Name: AvaTaxClient - * + * * 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 {number} top If nonzero, return no more than this number of results. Used with `$skip` to provide pagination for large datasets. Unless otherwise specified, the maximum number of records that can be returned from an API call is 1,000 records. * @param {number} skip If nonzero, skip this number of results before returning data. Used with `$top` to provide pagination for large datasets. * @param {string} orderBy A comma separated list of sort statements in the format `(fieldname) [ASC|DESC]`, for example `id ASC`. - * @param {string} countryCode If not null, return all records with this code. - * @return {FetchResult} - */ - - listProductClassificationSystemsByCompany({ companyCode, filter, top, skip, orderBy, countryCode }: { companyCode: string, filter?: string, top?: number, skip?: number, orderBy?: string, countryCode?: string }): Promise> { - 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 }: { companyCode: string, filter?: string, top?: number, skip?: number, orderBy?: string, countryCode?: string }): Promise> { + var path = this.buildUrl({ + url: `/api/v2/definitions/productclassificationsystems/bycompany/${companyCode}`, parameters: { $filter: filter, $top: top, @@ -6360,56 +6471,56 @@ export default class AvaTaxClient { $orderBy: orderBy, $countryCode: countryCode } - }); - var strClientId = - this.appNM + - '; ' + - this.appVer + - '; JavascriptSdk; ' + this.apiVersion + '; ' + - this.machineNM; + }); + var strClientId = + this.appNM + + '; ' + + this.appVer + + '; JavascriptSdk; ' + this.apiVersion + '; ' + + this.machineNM; return this.restCall({ url: path, verb: 'get', payload: null, clientId: strClientId }, FetchResult); - } - - /** - * Retrieve the full list of rate types for each country + } + + /** + * 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. - * Swagger Name: AvaTaxClient - * + * 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/).
*Not filterable:* country * @param {number} top If nonzero, return no more than this number of results. Used with `$skip` to provide pagination for large datasets. Unless otherwise specified, the maximum number of records that can be returned from an API call is 1,000 records. * @param {number} skip If nonzero, skip this number of results before returning data. Used with `$top` to provide pagination for large datasets. - * @param {string} orderBy A comma separated list of sort statements in the format `(fieldname) [ASC|DESC]`, for example `id ASC`. - * @return {FetchResult} - */ - - listRateTypesByCountry({ country, filter, top, skip, orderBy }: { country: string, filter?: string, top?: number, skip?: number, orderBy?: string }): Promise> { - 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 }: { country: string, filter?: string, top?: number, skip?: number, orderBy?: string }): Promise> { + var path = this.buildUrl({ + url: `/api/v2/definitions/countries/${country}/ratetypes`, parameters: { $filter: filter, $top: top, $skip: skip, $orderBy: orderBy } - }); - var strClientId = - this.appNM + - '; ' + - this.appVer + - '; JavascriptSdk; ' + this.apiVersion + '; ' + - this.machineNM; + }); + var strClientId = + this.appNM + + '; ' + + this.appVer + + '; JavascriptSdk; ' + this.apiVersion + '; ' + + this.machineNM; return this.restCall({ url: path, verb: 'get', payload: null, clientId: strClientId }, FetchResult); - } - - /** - * Retrieve the list of rate types by country, TaxType and by TaxSubType + } + + /** + * 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. - * Swagger Name: AvaTaxClient - * + * 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 @@ -6417,105 +6528,105 @@ 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 {number} top If nonzero, return no more than this number of results. Used with `$skip` to provide pagination for large datasets. Unless otherwise specified, the maximum number of records that can be returned from an API call is 1,000 records. * @param {number} skip If nonzero, skip this number of results before returning data. Used with `$top` to provide pagination for large datasets. - * @param {string} orderBy A comma separated list of sort statements in the format `(fieldname) [ASC|DESC]`, for example `id ASC`. - * @return {FetchResult} - */ - - listRateTypesByCountryTaxTypeTaxSubType({ country, taxTypeId, taxSubTypeId, filter, top, skip, orderBy }: { country: string, taxTypeId: string, taxSubTypeId: string, filter?: string, top?: number, skip?: number, orderBy?: string }): Promise> { - 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 }: { country: string, taxTypeId: string, taxSubTypeId: string, filter?: string, top?: number, skip?: number, orderBy?: string }): Promise> { + var path = this.buildUrl({ + url: `/api/v2/definitions/countries/${country}/taxtypes/${taxTypeId}/taxsubtypes/${taxSubTypeId}/ratetypes`, parameters: { $filter: filter, $top: top, $skip: skip, $orderBy: orderBy } - }); - var strClientId = - this.appNM + - '; ' + - this.appVer + - '; JavascriptSdk; ' + this.apiVersion + '; ' + - this.machineNM; + }); + var strClientId = + this.appNM + + '; ' + + this.appVer + + '; JavascriptSdk; ' + this.apiVersion + '; ' + + this.machineNM; return this.restCall({ url: path, verb: 'get', payload: null, clientId: strClientId }, FetchResult); - } - - /** - * List all ISO 3166 regions + } + + /** + * 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. - * Swagger Name: AvaTaxClient - * + * 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 {number} top If nonzero, return no more than this number of results. Used with `$skip` to provide pagination for large datasets. Unless otherwise specified, the maximum number of records that can be returned from an API call is 1,000 records. * @param {number} skip If nonzero, skip this number of results before returning data. Used with `$top` to provide pagination for large datasets. - * @param {string} orderBy A comma separated list of sort statements in the format `(fieldname) [ASC|DESC]`, for example `id ASC`. - * @return {FetchResult} - */ - - listRegions({ filter, top, skip, orderBy }: { filter?: string, top?: number, skip?: number, orderBy?: string }): Promise> { - 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 }: { filter?: string, top?: number, skip?: number, orderBy?: string }): Promise> { + var path = this.buildUrl({ + url: `/api/v2/definitions/regions`, parameters: { $filter: filter, $top: top, $skip: skip, $orderBy: orderBy } - }); - var strClientId = - this.appNM + - '; ' + - this.appVer + - '; JavascriptSdk; ' + this.apiVersion + '; ' + - this.machineNM; + }); + var strClientId = + this.appNM + + '; ' + + this.appVer + + '; JavascriptSdk; ' + this.apiVersion + '; ' + + this.machineNM; return this.restCall({ url: path, verb: 'get', payload: null, clientId: strClientId }, FetchResult); - } - - /** - * List all ISO 3166 regions for a country + } + + /** + * 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. - * Swagger Name: AvaTaxClient - * + * 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 {number} top If nonzero, return no more than this number of results. Used with `$skip` to provide pagination for large datasets. Unless otherwise specified, the maximum number of records that can be returned from an API call is 1,000 records. * @param {number} skip If nonzero, skip this number of results before returning data. Used with `$top` to provide pagination for large datasets. - * @param {string} orderBy A comma separated list of sort statements in the format `(fieldname) [ASC|DESC]`, for example `id ASC`. - * @return {FetchResult} - */ - - listRegionsByCountry({ country, filter, top, skip, orderBy }: { country: string, filter?: string, top?: number, skip?: number, orderBy?: string }): Promise> { - 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 }: { country: string, filter?: string, top?: number, skip?: number, orderBy?: string }): Promise> { + var path = this.buildUrl({ + url: `/api/v2/definitions/countries/${country}/regions`, parameters: { $filter: filter, $top: top, $skip: skip, $orderBy: orderBy } - }); - var strClientId = - this.appNM + - '; ' + - this.appVer + - '; JavascriptSdk; ' + this.apiVersion + '; ' + - this.machineNM; + }); + var strClientId = + this.appNM + + '; ' + + this.appVer + + '; JavascriptSdk; ' + this.apiVersion + '; ' + + this.machineNM; return this.restCall({ url: path, verb: 'get', payload: null, clientId: strClientId }, FetchResult); - } - - /** - * Retrieve the list of applicable regions by country tax type, tax sub type, and rate type for a given JurisdictionTypeId + } + + /** + * Retrieve the list of applicable regions by country tax type, tax sub type, and rate type for a given JurisdictionTypeId * 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 used as a way to provide a dropdown box in your website to allow customers to select a region - * within the country for shipping addresses. - * Swagger Name: AvaTaxClient - * + * within the country for shipping addresses. + * Swagger Name: AvaTaxClient + * * * @param {number} companyId The ID of the company for which you want to retrieve the applicable regions * @param {string} country The country for which you want to retrieve the regions @@ -6525,266 +6636,266 @@ export default class AvaTaxClient { * @param {string} jurisdictionTypeId The JurisdictionTypeId for which you want to retrieve the regions. This is a three-character string. Accepted values are ```CNT``` (country), ```STA``` (state), ```CTY``` (county), ```CIT``` (city), or ```STJ``` (special jurisdiction). * @param {number} top If nonzero, return no more than this number of results. Used with `$skip` to provide pagination for large datasets. Unless otherwise specified, the maximum number of records that can be returned from an API call is 1,000 records. * @param {number} skip If nonzero, skip this number of results before returning data. Used with `$top` to provide pagination for large datasets. - * @param {string} orderBy A comma separated list of sort statements in the format `(fieldname) [ASC|DESC]`, for example `id ASC`. - * @return {FetchResult} - */ - - listRegionsByCountryAndTaxTypeAndTaxSubTypeAndRateType({ companyId, country, taxTypeId, taxSubTypeId, rateTypeId, jurisdictionTypeId, top, skip, orderBy }: { companyId: number, country: string, taxTypeId: string, taxSubTypeId: string, rateTypeId: number, jurisdictionTypeId: string, top?: number, skip?: number, orderBy?: string }): Promise> { - var path = this.buildUrl({ - url: `/api/v2/definitions/companies/${companyId}/countries/${country}/regions/taxtypes/${taxTypeId}/taxsubtypes/${taxSubTypeId}/rateTypeId/${rateTypeId}/jurisdictionTypeId/${jurisdictionTypeId}`, + * @param {string} orderBy A comma separated list of sort statements in the format `(fieldname) [ASC|DESC]`, for example `id ASC`. + * @return {FetchResult} + */ + + listRegionsByCountryAndTaxTypeAndTaxSubTypeAndRateType({ companyId, country, taxTypeId, taxSubTypeId, rateTypeId, jurisdictionTypeId, top, skip, orderBy }: { companyId: number, country: string, taxTypeId: string, taxSubTypeId: string, rateTypeId: number, jurisdictionTypeId: string, top?: number, skip?: number, orderBy?: string }): Promise> { + var path = this.buildUrl({ + url: `/api/v2/definitions/companies/${companyId}/countries/${country}/regions/taxtypes/${taxTypeId}/taxsubtypes/${taxSubTypeId}/rateTypeId/${rateTypeId}/jurisdictionTypeId/${jurisdictionTypeId}`, parameters: { $top: top, $skip: skip, $orderBy: orderBy } - }); - var strClientId = - this.appNM + - '; ' + - this.appVer + - '; JavascriptSdk; ' + this.apiVersion + '; ' + - this.machineNM; + }); + var strClientId = + this.appNM + + '; ' + + this.appVer + + '; JavascriptSdk; ' + this.apiVersion + '; ' + + this.machineNM; return this.restCall({ url: path, verb: 'get', payload: null, clientId: strClientId }, FetchResult); - } - - /** - * Retrieve the full list of Avalara-supported usage of parameters used for returns. + } + + /** + * 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. - * Swagger Name: AvaTaxClient - * + * 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:* attributeSubType, values * @param {number} top If nonzero, return no more than this number of results. Used with `$skip` to provide pagination for large datasets. Unless otherwise specified, the maximum number of records that can be returned from an API call is 1,000 records. * @param {number} skip If nonzero, skip this number of results before returning data. Used with `$top` to provide pagination for large datasets. - * @param {string} orderBy A comma separated list of sort statements in the format `(fieldname) [ASC|DESC]`, for example `id ASC`. - * @return {FetchResult} - */ - - listReturnsParametersUsage({ filter, top, skip, orderBy }: { filter?: string, top?: number, skip?: number, orderBy?: string }): Promise> { - 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 }: { filter?: string, top?: number, skip?: number, orderBy?: string }): Promise> { + var path = this.buildUrl({ + url: `/api/v2/definitions/returns/parametersusage`, parameters: { $filter: filter, $top: top, $skip: skip, $orderBy: orderBy } - }); - var strClientId = - this.appNM + - '; ' + - this.appVer + - '; JavascriptSdk; ' + this.apiVersion + '; ' + - this.machineNM; + }); + var strClientId = + this.appNM + + '; ' + + this.appVer + + '; JavascriptSdk; ' + this.apiVersion + '; ' + + this.machineNM; return this.restCall({ url: path, verb: 'get', payload: null, clientId: strClientId }, FetchResult); - } - - /** - * Retrieve the full list of Avalara-supported permissions + } + + /** + * 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. - * Swagger Name: AvaTaxClient - * + * 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 {number} top If nonzero, return no more than this number of results. Used with `$skip` to provide pagination for large datasets. Unless otherwise specified, the maximum number of records that can be returned from an API call is 1,000 records. * @param {number} skip If nonzero, skip this number of results before returning data. Used with `$top` to provide pagination for large datasets. - * @param {string} orderBy A comma separated list of sort statements in the format `(fieldname) [ASC|DESC]`, for example `id ASC`. - * @return {FetchResult} - */ - - listSecurityRoles({ filter, top, skip, orderBy }: { filter?: string, top?: number, skip?: number, orderBy?: string }): Promise> { - 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 }: { filter?: string, top?: number, skip?: number, orderBy?: string }): Promise> { + var path = this.buildUrl({ + url: `/api/v2/definitions/securityroles`, parameters: { $filter: filter, $top: top, $skip: skip, $orderBy: orderBy } - }); - var strClientId = - this.appNM + - '; ' + - this.appVer + - '; JavascriptSdk; ' + this.apiVersion + '; ' + - this.machineNM; + }); + var strClientId = + this.appNM + + '; ' + + this.appVer + + '; JavascriptSdk; ' + this.apiVersion + '; ' + + this.machineNM; return this.restCall({ url: path, verb: 'get', payload: null, clientId: strClientId }, FetchResult); - } - - /** - * Retrieve the full list of Avalara-supported subscription types + } + + /** + * 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. - * Swagger Name: AvaTaxClient - * + * 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/).
*Not filterable:* taxTypeGroupIdSK * @param {number} top If nonzero, return no more than this number of results. Used with `$skip` to provide pagination for large datasets. Unless otherwise specified, the maximum number of records that can be returned from an API call is 1,000 records. * @param {number} skip If nonzero, skip this number of results before returning data. Used with `$top` to provide pagination for large datasets. - * @param {string} orderBy A comma separated list of sort statements in the format `(fieldname) [ASC|DESC]`, for example `id ASC`. - * @return {FetchResult} - */ - - listSubscriptionTypes({ filter, top, skip, orderBy }: { filter?: string, top?: number, skip?: number, orderBy?: string }): Promise> { - 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 }: { filter?: string, top?: number, skip?: number, orderBy?: string }): Promise> { + var path = this.buildUrl({ + url: `/api/v2/definitions/subscriptiontypes`, parameters: { $filter: filter, $top: top, $skip: skip, $orderBy: orderBy } - }); - var strClientId = - this.appNM + - '; ' + - this.appVer + - '; JavascriptSdk; ' + this.apiVersion + '; ' + - this.machineNM; + }); + var strClientId = + this.appNM + + '; ' + + this.appVer + + '; JavascriptSdk; ' + this.apiVersion + '; ' + + this.machineNM; return this.restCall({ url: path, verb: 'get', payload: null, clientId: strClientId }, FetchResult); - } - - /** - * Retrieve the list all tags supported by avalara - * Retrieves the list of suggested locations for a marketplace. - * Swagger Name: AvaTaxClient - * + } + + /** + * 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 {number} top If nonzero, return no more than this number of results. Used with `$skip` to provide pagination for large datasets. Unless otherwise specified, the maximum number of records that can be returned from an API call is 1,000 records. * @param {number} skip If nonzero, skip this number of results before returning data. Used with `$top` to provide pagination for large datasets. - * @param {string} orderBy A comma separated list of sort statements in the format `(fieldname) [ASC|DESC]`, for example `id ASC`. - * @return {FetchResult} - */ - - listTags({ filter, top, skip, orderBy }: { filter?: string, top?: number, skip?: number, orderBy?: string }): Promise> { - 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 }: { filter?: string, top?: number, skip?: number, orderBy?: string }): Promise> { + var path = this.buildUrl({ + url: `/api/v2/definitions/tags`, parameters: { $filter: filter, $top: top, $skip: skip, $orderBy: orderBy } - }); - var strClientId = - this.appNM + - '; ' + - this.appVer + - '; JavascriptSdk; ' + this.apiVersion + '; ' + - this.machineNM; + }); + var strClientId = + this.appNM + + '; ' + + this.appVer + + '; JavascriptSdk; ' + this.apiVersion + '; ' + + this.machineNM; return this.restCall({ url: path, verb: 'get', payload: null, clientId: strClientId }, FetchResult); - } - - /** - * Retrieve the full list of Avalara-supported tax authorities. + } + + /** + * 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. - * Swagger Name: AvaTaxClient - * + * 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 {number} top If nonzero, return no more than this number of results. Used with `$skip` to provide pagination for large datasets. Unless otherwise specified, the maximum number of records that can be returned from an API call is 1,000 records. * @param {number} skip If nonzero, skip this number of results before returning data. Used with `$top` to provide pagination for large datasets. - * @param {string} orderBy A comma separated list of sort statements in the format `(fieldname) [ASC|DESC]`, for example `id ASC`. - * @return {FetchResult} - */ - - listTaxAuthorities({ filter, top, skip, orderBy }: { filter?: string, top?: number, skip?: number, orderBy?: string }): Promise> { - 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 }: { filter?: string, top?: number, skip?: number, orderBy?: string }): Promise> { + var path = this.buildUrl({ + url: `/api/v2/definitions/taxauthorities`, parameters: { $filter: filter, $top: top, $skip: skip, $orderBy: orderBy } - }); - var strClientId = - this.appNM + - '; ' + - this.appVer + - '; JavascriptSdk; ' + this.apiVersion + '; ' + - this.machineNM; + }); + var strClientId = + this.appNM + + '; ' + + this.appVer + + '; JavascriptSdk; ' + this.apiVersion + '; ' + + this.machineNM; return this.restCall({ url: path, verb: 'get', payload: null, clientId: strClientId }, FetchResult); - } - - /** - * Retrieve the full list of Avalara-supported forms for each tax authority. + } + + /** + * 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. - * Swagger Name: AvaTaxClient - * + * 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 {number} top If nonzero, return no more than this number of results. Used with `$skip` to provide pagination for large datasets. Unless otherwise specified, the maximum number of records that can be returned from an API call is 1,000 records. * @param {number} skip If nonzero, skip this number of results before returning data. Used with `$top` to provide pagination for large datasets. - * @param {string} orderBy A comma separated list of sort statements in the format `(fieldname) [ASC|DESC]`, for example `id ASC`. - * @return {FetchResult} - */ - - listTaxAuthorityForms({ filter, top, skip, orderBy }: { filter?: string, top?: number, skip?: number, orderBy?: string }): Promise> { - 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 }: { filter?: string, top?: number, skip?: number, orderBy?: string }): Promise> { + var path = this.buildUrl({ + url: `/api/v2/definitions/taxauthorityforms`, parameters: { $filter: filter, $top: top, $skip: skip, $orderBy: orderBy } - }); - var strClientId = - this.appNM + - '; ' + - this.appVer + - '; JavascriptSdk; ' + this.apiVersion + '; ' + - this.machineNM; + }); + var strClientId = + this.appNM + + '; ' + + this.appVer + + '; JavascriptSdk; ' + this.apiVersion + '; ' + + this.machineNM; return this.restCall({ url: path, verb: 'get', payload: null, clientId: strClientId }, FetchResult); - } - - /** - * Retrieve the full list of Avalara-supported tax authority types. + } + + /** + * 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. - * Swagger Name: AvaTaxClient - * + * 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 {number} top If nonzero, return no more than this number of results. Used with `$skip` to provide pagination for large datasets. Unless otherwise specified, the maximum number of records that can be returned from an API call is 1,000 records. * @param {number} skip If nonzero, skip this number of results before returning data. Used with `$top` to provide pagination for large datasets. - * @param {string} orderBy A comma separated list of sort statements in the format `(fieldname) [ASC|DESC]`, for example `id ASC`. - * @return {FetchResult} - */ - - listTaxAuthorityTypes({ filter, top, skip, orderBy }: { filter?: string, top?: number, skip?: number, orderBy?: string }): Promise> { - 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 }: { filter?: string, top?: number, skip?: number, orderBy?: string }): Promise> { + var path = this.buildUrl({ + url: `/api/v2/definitions/taxauthoritytypes`, parameters: { $filter: filter, $top: top, $skip: skip, $orderBy: orderBy } - }); - var strClientId = - this.appNM + - '; ' + - this.appVer + - '; JavascriptSdk; ' + this.apiVersion + '; ' + - this.machineNM; + }); + var strClientId = + this.appNM + + '; ' + + this.appVer + + '; JavascriptSdk; ' + this.apiVersion + '; ' + + this.machineNM; return this.restCall({ url: path, verb: 'get', payload: null, clientId: strClientId }, FetchResult); - } - - /** - * Retrieve the full list of Avalara-supported tax codes. + } + + /** + * 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. @@ -6793,138 +6904,138 @@ export default class AvaTaxClient { * * ### Security Policies * - * * This API requires one of the following user roles: AccountAdmin, AccountUser, BatchServiceAdmin, CompanyAdmin, CompanyUser, CSPAdmin, CSPTester, ECMAccountUser, ECMCompanyUser, SiteAdmin, SSTAdmin, SystemAdmin, TechnicalSupportAdmin, TechnicalSupportUser. - * Swagger Name: AvaTaxClient - * + * * This API requires one of the following user roles: AccountAdmin, AccountUser, BatchServiceAdmin, CompanyAdmin, CompanyUser, CSPAdmin, CSPTester, ECMAccountUser, ECMCompanyUser, 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 {number} top If nonzero, return no more than this number of results. Used with `$skip` to provide pagination for large datasets. Unless otherwise specified, the maximum number of records that can be returned from an API call is 1,000 records. * @param {number} skip If nonzero, skip this number of results before returning data. Used with `$top` to provide pagination for large datasets. - * @param {string} orderBy A comma separated list of sort statements in the format `(fieldname) [ASC|DESC]`, for example `id ASC`. - * @return {FetchResult} - */ - - listTaxCodes({ filter, top, skip, orderBy }: { filter?: string, top?: number, skip?: number, orderBy?: string }): Promise> { - 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 }: { filter?: string, top?: number, skip?: number, orderBy?: string }): Promise> { + var path = this.buildUrl({ + url: `/api/v2/definitions/taxcodes`, parameters: { $filter: filter, $top: top, $skip: skip, $orderBy: orderBy } - }); - var strClientId = - this.appNM + - '; ' + - this.appVer + - '; JavascriptSdk; ' + this.apiVersion + '; ' + - this.machineNM; + }); + var strClientId = + this.appNM + + '; ' + + this.appVer + + '; JavascriptSdk; ' + this.apiVersion + '; ' + + this.machineNM; return this.restCall({ url: path, verb: 'get', payload: null, clientId: strClientId }, FetchResult); - } - - /** - * Retrieve the full list of Avalara-supported tax code types. + } + + /** + * 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. - * Swagger Name: AvaTaxClient - * + * This API is intended to be useful for broadly searching for tax codes by tax code type. + * Swagger Name: AvaTaxClient + * * * @param {number} top If nonzero, return no more than this number of results. Used with `$skip` to provide pagination for large datasets. Unless otherwise specified, the maximum number of records that can be returned from an API call is 1,000 records. - * @param {number} skip If nonzero, skip this number of results before returning data. Used with `$top` to provide pagination for large datasets. - * @return {Models.TaxCodeTypesModel} - */ - - listTaxCodeTypes({ top, skip }: { top?: number, skip?: number }): Promise { - var path = this.buildUrl({ - url: `/api/v2/definitions/taxcodetypes`, + * @param {number} skip If nonzero, skip this number of results before returning data. Used with `$top` to provide pagination for large datasets. + * @return {Models.TaxCodeTypesModel} + */ + + listTaxCodeTypes({ top, skip }: { top?: number, skip?: number }): Promise { + var path = this.buildUrl({ + url: `/api/v2/definitions/taxcodetypes`, parameters: { $top: top, $skip: skip } - }); - var strClientId = - this.appNM + - '; ' + - this.appVer + - '; JavascriptSdk; ' + this.apiVersion + '; ' + - this.machineNM; + }); + var strClientId = + this.appNM + + '; ' + + this.appVer + + '; JavascriptSdk; ' + this.apiVersion + '; ' + + this.machineNM; return this.restCall({ url: path, verb: 'get', payload: null, clientId: strClientId }, Models.TaxCodeTypesModel); - } - - /** - * Retrieve the full list of the Tax Forms available + } + + /** + * 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 - * Swagger Name: AvaTaxClient - * + * 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 {number} top If nonzero, return no more than this number of results. Used with `$skip` to provide pagination for large datasets. Unless otherwise specified, the maximum number of records that can be returned from an API call is 1,000 records. * @param {number} skip If nonzero, skip this number of results before returning data. Used with `$top` to provide pagination for large datasets. - * @param {string} orderBy A comma separated list of sort statements in the format `(fieldname) [ASC|DESC]`, for example `id ASC`. - * @return {FetchResult} - */ - - listTaxForms({ filter, top, skip, orderBy }: { filter?: string, top?: number, skip?: number, orderBy?: string }): Promise> { - 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 }: { filter?: string, top?: number, skip?: number, orderBy?: string }): Promise> { + var path = this.buildUrl({ + url: `/api/v2/definitions/taxforms`, parameters: { $filter: filter, $top: top, $skip: skip, $orderBy: orderBy } - }); - var strClientId = - this.appNM + - '; ' + - this.appVer + - '; JavascriptSdk; ' + this.apiVersion + '; ' + - this.machineNM; + }); + var strClientId = + this.appNM + + '; ' + + this.appVer + + '; JavascriptSdk; ' + this.apiVersion + '; ' + + this.machineNM; return this.restCall({ url: path, verb: 'get', payload: null, clientId: strClientId }, FetchResult); - } - - /** - * Retrieve the full list of tax sub types + } + + /** + * 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. - * Swagger Name: AvaTaxClient - * + * 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 {number} top If nonzero, return no more than this number of results. Used with `$skip` to provide pagination for large datasets. Unless otherwise specified, the maximum number of records that can be returned from an API call is 1,000 records. * @param {number} skip If nonzero, skip this number of results before returning data. Used with `$top` to provide pagination for large datasets. - * @param {string} orderBy A comma separated list of sort statements in the format `(fieldname) [ASC|DESC]`, for example `id ASC`. - * @return {FetchResult} - */ - - listTaxSubTypes({ filter, top, skip, orderBy }: { filter?: string, top?: number, skip?: number, orderBy?: string }): Promise> { - 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 }: { filter?: string, top?: number, skip?: number, orderBy?: string }): Promise> { + var path = this.buildUrl({ + url: `/api/v2/definitions/taxsubtypes`, parameters: { $filter: filter, $top: top, $skip: skip, $orderBy: orderBy } - }); - var strClientId = - this.appNM + - '; ' + - this.appVer + - '; JavascriptSdk; ' + this.apiVersion + '; ' + - this.machineNM; + }); + var strClientId = + this.appNM + + '; ' + + this.appVer + + '; JavascriptSdk; ' + this.apiVersion + '; ' + + this.machineNM; return this.restCall({ url: path, verb: 'get', payload: null, clientId: strClientId }, FetchResult); - } - - /** - * Retrieve the full list of tax sub types by Country and TaxType + } + + /** + * 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. - * Swagger Name: AvaTaxClient - * + * 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 @@ -6932,13 +7043,13 @@ 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 {number} top If nonzero, return no more than this number of results. Used with `$skip` to provide pagination for large datasets. Unless otherwise specified, the maximum number of records that can be returned from an API call is 1,000 records. * @param {number} skip If nonzero, skip this number of results before returning data. Used with `$top` to provide pagination for large datasets. - * @param {string} orderBy A comma separated list of sort statements in the format `(fieldname) [ASC|DESC]`, for example `id ASC`. - * @return {FetchResult} - */ - - listTaxSubTypesByCountryAndTaxType({ country, taxTypeId, companyId, filter, top, skip, orderBy }: { country: string, taxTypeId: string, companyId: number, filter?: string, top?: number, skip?: number, orderBy?: string }): Promise> { - 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, companyId, filter, top, skip, orderBy }: { country: string, taxTypeId: string, companyId: number, filter?: string, top?: number, skip?: number, orderBy?: string }): Promise> { + var path = this.buildUrl({ + url: `/api/v2/definitions/taxsubtypes/countries/${country}/taxtypes/${taxTypeId}`, parameters: { companyId: companyId, $filter: filter, @@ -6946,122 +7057,122 @@ export default class AvaTaxClient { $skip: skip, $orderBy: orderBy } - }); - var strClientId = - this.appNM + - '; ' + - this.appVer + - '; JavascriptSdk; ' + this.apiVersion + '; ' + - this.machineNM; + }); + var strClientId = + this.appNM + + '; ' + + this.appVer + + '; JavascriptSdk; ' + this.apiVersion + '; ' + + this.machineNM; return this.restCall({ url: path, verb: 'get', payload: null, clientId: strClientId }, FetchResult); - } - - /** - * Retrieve the full list of tax sub types by jurisdiction code and region + } + + /** + * 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. - * Swagger Name: AvaTaxClient - * + * 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 {number} top If nonzero, return no more than this number of results. Used with `$skip` to provide pagination for large datasets. Unless otherwise specified, the maximum number of records that can be returned from an API call is 1,000 records. * @param {number} skip If nonzero, skip this number of results before returning data. Used with `$top` to provide pagination for large datasets. - * @param {string} orderBy A comma separated list of sort statements in the format `(fieldname) [ASC|DESC]`, for example `id ASC`. - * @return {FetchResult} - */ - - listTaxSubTypesByJurisdictionAndRegion({ jurisdictionCode, region, filter, top, skip, orderBy }: { jurisdictionCode: string, region: string, filter?: string, top?: number, skip?: number, orderBy?: string }): Promise> { - 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 }: { jurisdictionCode: string, region: string, filter?: string, top?: number, skip?: number, orderBy?: string }): Promise> { + var path = this.buildUrl({ + url: `/api/v2/definitions/taxsubtypes/${jurisdictionCode}/${region}`, parameters: { $filter: filter, $top: top, $skip: skip, $orderBy: orderBy } - }); - var strClientId = - this.appNM + - '; ' + - this.appVer + - '; JavascriptSdk; ' + this.apiVersion + '; ' + - this.machineNM; + }); + var strClientId = + this.appNM + + '; ' + + this.appVer + + '; JavascriptSdk; ' + this.apiVersion + '; ' + + this.machineNM; return this.restCall({ url: path, verb: 'get', payload: null, clientId: strClientId }, FetchResult); - } - - /** - * Retrieve the full list of tax type groups + } + + /** + * 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. - * Swagger Name: AvaTaxClient - * + * 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 {number} top If nonzero, return no more than this number of results. Used with `$skip` to provide pagination for large datasets. Unless otherwise specified, the maximum number of records that can be returned from an API call is 1,000 records. * @param {number} skip If nonzero, skip this number of results before returning data. Used with `$top` to provide pagination for large datasets. - * @param {string} orderBy A comma separated list of sort statements in the format `(fieldname) [ASC|DESC]`, for example `id ASC`. - * @return {FetchResult} - */ - - listTaxTypeGroups({ filter, top, skip, orderBy }: { filter?: string, top?: number, skip?: number, orderBy?: string }): Promise> { - 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 }: { filter?: string, top?: number, skip?: number, orderBy?: string }): Promise> { + var path = this.buildUrl({ + url: `/api/v2/definitions/taxtypegroups`, parameters: { $filter: filter, $top: top, $skip: skip, $orderBy: orderBy } - }); - var strClientId = - this.appNM + - '; ' + - this.appVer + - '; JavascriptSdk; ' + this.apiVersion + '; ' + - this.machineNM; + }); + var strClientId = + this.appNM + + '; ' + + this.appVer + + '; JavascriptSdk; ' + this.apiVersion + '; ' + + this.machineNM; return this.restCall({ url: path, verb: 'get', payload: null, clientId: strClientId }, FetchResult); - } - - /** - * Retrieve the list of applicable TaxTypes - * Retrieves the list of applicable TaxTypes based on Nexus of the company. - * Swagger Name: AvaTaxClient - * + } + + /** + * 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 {number} companyId Your companyId to retrieve the applicable taxtypes * @param {number} top If nonzero, return no more than this number of results. Used with `$skip` to provide pagination for large datasets. Unless otherwise specified, the maximum number of records that can be returned from an API call is 1,000 records. * @param {number} skip If nonzero, skip this number of results before returning data. Used with `$top` to provide pagination for large datasets. - * @param {string} orderBy A comma separated list of sort statements in the format `(fieldname) [ASC|DESC]`, for example `id ASC`. - * @return {FetchResult} - */ - - listTaxTypesByNexusAndCountry({ country, companyId, top, skip, orderBy }: { country: string, companyId: number, top?: number, skip?: number, orderBy?: string }): Promise> { - 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 }: { country: string, companyId: number, top?: number, skip?: number, orderBy?: string }): Promise> { + var path = this.buildUrl({ + url: `/api/v2/definitions/taxtypes/countries/${country}`, parameters: { companyId: companyId, $top: top, $skip: skip, $orderBy: orderBy } - }); - var strClientId = - this.appNM + - '; ' + - this.appVer + - '; JavascriptSdk; ' + this.apiVersion + '; ' + - this.machineNM; + }); + var strClientId = + this.appNM + + '; ' + + this.appVer + + '; JavascriptSdk; ' + this.apiVersion + '; ' + + this.machineNM; return this.restCall({ url: path, verb: 'get', payload: null, clientId: strClientId }, FetchResult); - } - - /** - * Retrieve the list of applicable UnitOfBasis - * Retrieves the list of applicable UnitOfBasis - * Swagger Name: AvaTaxClient - * + } + + /** + * 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 @@ -7069,65 +7180,65 @@ export default class AvaTaxClient { * @param {string} rateTypeId The ratetype for which you want to retrieve the unitofbasis information * @param {number} top If nonzero, return no more than this number of results. Used with `$skip` to provide pagination for large datasets. Unless otherwise specified, the maximum number of records that can be returned from an API call is 1,000 records. * @param {number} skip If nonzero, skip this number of results before returning data. Used with `$top` to provide pagination for large datasets. - * @param {string} orderBy A comma separated list of sort statements in the format `(fieldname) [ASC|DESC]`, for example `id ASC`. - * @return {FetchResult} - */ - - listUnitOfBasisByCountryAndTaxTypeAndTaxSubTypeAndRateType({ country, taxTypeId, taxSubTypeId, rateTypeId, top, skip, orderBy }: { country: string, taxTypeId: string, taxSubTypeId: string, rateTypeId: string, top?: number, skip?: number, orderBy?: string }): Promise> { - 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 }: { country: string, taxTypeId: string, taxSubTypeId: string, rateTypeId: string, top?: number, skip?: number, orderBy?: string }): Promise> { + var path = this.buildUrl({ + url: `/api/v2/definitions/unitofbasis/countries/${country}/taxtypes/${taxTypeId}/taxsubtypes/${taxSubTypeId}`, parameters: { rateTypeId: rateTypeId, $top: top, $skip: skip, $orderBy: orderBy } - }); - var strClientId = - this.appNM + - '; ' + - this.appVer + - '; JavascriptSdk; ' + this.apiVersion + '; ' + - this.machineNM; + }); + var strClientId = + this.appNM + + '; ' + + this.appVer + + '; JavascriptSdk; ' + this.apiVersion + '; ' + + this.machineNM; return this.restCall({ url: path, verb: 'get', payload: null, clientId: strClientId }, FetchResult); - } - - /** - * List all defined units of measurement + } + + /** + * 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. - * Swagger Name: AvaTaxClient - * + * 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 {number} top If nonzero, return no more than this number of results. Used with `$skip` to provide pagination for large datasets. Unless otherwise specified, the maximum number of records that can be returned from an API call is 1,000 records. * @param {number} skip If nonzero, skip this number of results before returning data. Used with `$top` to provide pagination for large datasets. - * @param {string} orderBy A comma separated list of sort statements in the format `(fieldname) [ASC|DESC]`, for example `id ASC`. - * @return {FetchResult} - */ - - listUnitOfMeasurement({ filter, top, skip, orderBy }: { filter?: string, top?: number, skip?: number, orderBy?: string }): Promise> { - 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 }: { filter?: string, top?: number, skip?: number, orderBy?: string }): Promise> { + var path = this.buildUrl({ + url: `/api/v2/definitions/unitofmeasurements`, parameters: { $filter: filter, $top: top, $skip: skip, $orderBy: orderBy } - }); - var strClientId = - this.appNM + - '; ' + - this.appVer + - '; JavascriptSdk; ' + this.apiVersion + '; ' + - this.machineNM; + }); + var strClientId = + this.appNM + + '; ' + + this.appVer + + '; JavascriptSdk; ' + this.apiVersion + '; ' + + this.machineNM; return this.restCall({ url: path, verb: 'get', payload: null, clientId: strClientId }, FetchResult); - } - - /** - * Create one or more DistanceThreshold objects + } + + /** + * 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 @@ -7136,31 +7247,31 @@ export default class AvaTaxClient { * * ### Security Policies * - * * This API requires one of the following user roles: AccountAdmin, BatchServiceAdmin, CompanyAdmin, CSPAdmin, CSPTester, SiteAdmin, SSTAdmin, SystemAdmin, TechnicalSupportAdmin. - * Swagger Name: AvaTaxClient - * + * * This API requires one of the following user roles: AccountAdmin, BatchServiceAdmin, CompanyAdmin, CSPAdmin, CSPTester, SiteAdmin, SSTAdmin, SystemAdmin, TechnicalSupportAdmin. + * Swagger Name: AvaTaxClient + * * * @param {number} companyId The unique ID number of the company that owns this DistanceThreshold - * @param {Models.CompanyDistanceThresholdModel[]} model The DistanceThreshold object or objects you wish to create. - * @return {Models.CompanyDistanceThresholdModel[]} - */ - - createDistanceThreshold({ companyId, model }: { companyId: number, model: Models.CompanyDistanceThresholdModel[] }): Promise> { - var path = this.buildUrl({ - url: `/api/v2/companies/${companyId}/distancethresholds`, - parameters: {} - }); - var strClientId = - this.appNM + - '; ' + - this.appVer + - '; JavascriptSdk; ' + this.apiVersion + '; ' + - this.machineNM; + * @param {Models.CompanyDistanceThresholdModel[]} model The DistanceThreshold object or objects you wish to create. + * @return {Models.CompanyDistanceThresholdModel[]} + */ + + createDistanceThreshold({ companyId, model }: { companyId: number, model: Models.CompanyDistanceThresholdModel[] }): Promise> { + var path = this.buildUrl({ + url: `/api/v2/companies/${companyId}/distancethresholds`, + parameters: {} + }); + var strClientId = + this.appNM + + '; ' + + this.appVer + + '; JavascriptSdk; ' + this.apiVersion + '; ' + + this.machineNM; return this.restCall({ url: path, verb: 'post', payload: model, clientId: strClientId }, Array); - } - - /** - * Delete a single DistanceThreshold object + } + + /** + * 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 @@ -7169,31 +7280,31 @@ export default class AvaTaxClient { * * ### Security Policies * - * * This API requires one of the following user roles: AccountAdmin, BatchServiceAdmin, CompanyAdmin, CSPAdmin, CSPTester, SiteAdmin, SSTAdmin, SystemAdmin, TechnicalSupportAdmin. - * Swagger Name: AvaTaxClient - * + * * This API requires one of the following user roles: AccountAdmin, BatchServiceAdmin, CompanyAdmin, CSPAdmin, CSPTester, SiteAdmin, SSTAdmin, SystemAdmin, TechnicalSupportAdmin. + * Swagger Name: AvaTaxClient + * * * @param {number} companyId The unique ID number of the company that owns this DistanceThreshold - * @param {number} id The unique ID number of the DistanceThreshold object you wish to delete. - * @return {Models.ErrorDetail[]} - */ - - deleteDistanceThreshold({ companyId, id }: { companyId: number, id: number }): Promise> { - var path = this.buildUrl({ - url: `/api/v2/companies/${companyId}/distancethresholds/${id}`, - parameters: {} - }); - var strClientId = - this.appNM + - '; ' + - this.appVer + - '; JavascriptSdk; ' + this.apiVersion + '; ' + - this.machineNM; + * @param {number} id The unique ID number of the DistanceThreshold object you wish to delete. + * @return {Models.ErrorDetail[]} + */ + + deleteDistanceThreshold({ companyId, id }: { companyId: number, id: number }): Promise> { + var path = this.buildUrl({ + url: `/api/v2/companies/${companyId}/distancethresholds/${id}`, + parameters: {} + }); + var strClientId = + this.appNM + + '; ' + + this.appVer + + '; JavascriptSdk; ' + this.apiVersion + '; ' + + this.machineNM; return this.restCall({ url: path, verb: 'delete', payload: null, clientId: strClientId }, Array); - } - - /** - * Retrieve a single DistanceThreshold + } + + /** + * Retrieve a single DistanceThreshold * Retrieves a single DistanceThreshold object defined by this URL. * * A company-distance-threshold model indicates the distance between a company @@ -7202,31 +7313,31 @@ export default class AvaTaxClient { * * ### Security Policies * - * * This API requires one of the following user roles: AccountAdmin, AccountUser, BatchServiceAdmin, CompanyAdmin, CompanyUser, CSPAdmin, CSPTester, SiteAdmin, SSTAdmin, SystemAdmin, TechnicalSupportAdmin, TechnicalSupportUser, TreasuryAdmin, TreasuryUser. - * Swagger Name: AvaTaxClient - * + * * This API requires one of the following user roles: AccountAdmin, AccountUser, BatchServiceAdmin, CompanyAdmin, CompanyUser, CSPAdmin, CSPTester, SiteAdmin, SSTAdmin, SystemAdmin, TechnicalSupportAdmin, TechnicalSupportUser, TreasuryAdmin, TreasuryUser. + * Swagger Name: AvaTaxClient + * * * @param {number} companyId The ID of the company that owns this DistanceThreshold object - * @param {number} id The unique ID number referring to this DistanceThreshold object - * @return {Models.CompanyDistanceThresholdModel} - */ - - getDistanceThreshold({ companyId, id }: { companyId: number, id: number }): Promise { - var path = this.buildUrl({ - url: `/api/v2/companies/${companyId}/distancethresholds/${id}`, - parameters: {} - }); - var strClientId = - this.appNM + - '; ' + - this.appVer + - '; JavascriptSdk; ' + this.apiVersion + '; ' + - this.machineNM; + * @param {number} id The unique ID number referring to this DistanceThreshold object + * @return {Models.CompanyDistanceThresholdModel} + */ + + getDistanceThreshold({ companyId, id }: { companyId: number, id: number }): Promise { + var path = this.buildUrl({ + url: `/api/v2/companies/${companyId}/distancethresholds/${id}`, + parameters: {} + }); + var strClientId = + this.appNM + + '; ' + + this.appVer + + '; JavascriptSdk; ' + this.apiVersion + '; ' + + this.machineNM; return this.restCall({ url: path, verb: 'get', payload: null, clientId: strClientId }, Models.CompanyDistanceThresholdModel); - } - - /** - * Retrieve all DistanceThresholds for this company. + } + + /** + * 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 @@ -7235,22 +7346,22 @@ export default class AvaTaxClient { * * ### Security Policies * - * * This API requires one of the following user roles: AccountAdmin, AccountUser, BatchServiceAdmin, CompanyAdmin, CompanyUser, CSPAdmin, CSPTester, SiteAdmin, SSTAdmin, SystemAdmin, TechnicalSupportAdmin, TechnicalSupportUser, TreasuryAdmin, TreasuryUser. - * Swagger Name: AvaTaxClient - * + * * This API requires one of the following user roles: AccountAdmin, AccountUser, BatchServiceAdmin, CompanyAdmin, CompanyUser, CSPAdmin, CSPTester, SiteAdmin, SSTAdmin, SystemAdmin, TechnicalSupportAdmin, TechnicalSupportUser, TreasuryAdmin, TreasuryUser. + * Swagger Name: AvaTaxClient + * * * @param {number} 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 {number} top If nonzero, return no more than this number of results. Used with `$skip` to provide pagination for large datasets. Unless otherwise specified, the maximum number of records that can be returned from an API call is 1,000 records. * @param {number} skip If nonzero, skip this number of results before returning data. Used with `$top` to provide pagination for large datasets. - * @param {string} orderBy A comma separated list of sort statements in the format `(fieldname) [ASC|DESC]`, for example `id ASC`. - * @return {FetchResult} - */ - - listDistanceThresholds({ companyId, filter, include, top, skip, orderBy }: { companyId: number, filter?: string, include?: string, top?: number, skip?: number, orderBy?: string }): Promise> { - var path = this.buildUrl({ - url: `/api/v2/companies/${companyId}/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 }: { companyId: number, filter?: string, include?: string, top?: number, skip?: number, orderBy?: string }): Promise> { + var path = this.buildUrl({ + url: `/api/v2/companies/${companyId}/distancethresholds`, parameters: { $filter: filter, $include: include, @@ -7258,18 +7369,18 @@ export default class AvaTaxClient { $skip: skip, $orderBy: orderBy } - }); - var strClientId = - this.appNM + - '; ' + - this.appVer + - '; JavascriptSdk; ' + this.apiVersion + '; ' + - this.machineNM; + }); + var strClientId = + this.appNM + + '; ' + + this.appVer + + '; JavascriptSdk; ' + this.apiVersion + '; ' + + this.machineNM; return this.restCall({ url: path, verb: 'get', payload: null, clientId: strClientId }, FetchResult); - } - - /** - * Retrieve all DistanceThreshold objects + } + + /** + * Retrieve all DistanceThreshold objects * Lists all DistanceThreshold objects that belong to this account. * * A company-distance-threshold model indicates the distance between a company @@ -7281,21 +7392,21 @@ export default class AvaTaxClient { * * ### Security Policies * - * * This API requires one of the following user roles: AccountAdmin, AccountUser, BatchServiceAdmin, CompanyAdmin, CompanyUser, CSPAdmin, CSPTester, SiteAdmin, SSTAdmin, SystemAdmin, TechnicalSupportAdmin, TechnicalSupportUser, TreasuryAdmin, TreasuryUser. - * Swagger Name: AvaTaxClient - * + * * This API requires one of the following user roles: AccountAdmin, AccountUser, BatchServiceAdmin, 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 {number} top If nonzero, return no more than this number of results. Used with `$skip` to provide pagination for large datasets. Unless otherwise specified, the maximum number of records that can be returned from an API call is 1,000 records. * @param {number} skip If nonzero, skip this number of results before returning data. Used with `$top` to provide pagination for large datasets. - * @param {string} orderBy A comma separated list of sort statements in the format `(fieldname) [ASC|DESC]`, for example `id ASC`. - * @return {FetchResult} - */ - - queryDistanceThresholds({ filter, include, top, skip, orderBy }: { filter?: string, include?: string, top?: number, skip?: number, orderBy?: string }): Promise> { - 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 }: { filter?: string, include?: string, top?: number, skip?: number, orderBy?: string }): Promise> { + var path = this.buildUrl({ + url: `/api/v2/distancethresholds`, parameters: { $filter: filter, $include: include, @@ -7303,18 +7414,18 @@ export default class AvaTaxClient { $skip: skip, $orderBy: orderBy } - }); - var strClientId = - this.appNM + - '; ' + - this.appVer + - '; JavascriptSdk; ' + this.apiVersion + '; ' + - this.machineNM; + }); + var strClientId = + this.appNM + + '; ' + + this.appVer + + '; JavascriptSdk; ' + this.apiVersion + '; ' + + this.machineNM; return this.restCall({ url: path, verb: 'get', payload: null, clientId: strClientId }, FetchResult); - } - - /** - * Update a DistanceThreshold object + } + + /** + * 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 @@ -7326,196 +7437,306 @@ export default class AvaTaxClient { * * ### Security Policies * - * * This API requires one of the following user roles: AccountAdmin, BatchServiceAdmin, CompanyAdmin, CSPAdmin, CSPTester, SiteAdmin, SSTAdmin, SystemAdmin, TechnicalSupportAdmin. - * Swagger Name: AvaTaxClient - * + * * This API requires one of the following user roles: AccountAdmin, BatchServiceAdmin, CompanyAdmin, CSPAdmin, CSPTester, SiteAdmin, SSTAdmin, SystemAdmin, TechnicalSupportAdmin. + * Swagger Name: AvaTaxClient + * * * @param {number} companyId The unique ID number of the company that owns this DistanceThreshold object. * @param {number} id The unique ID number of the DistanceThreshold object to replace. - * @param {Models.CompanyDistanceThresholdModel} model The new DistanceThreshold object to store. - * @return {Models.CompanyDistanceThresholdModel} - */ - - updateDistanceThreshold({ companyId, id, model }: { companyId: number, id: number, model: Models.CompanyDistanceThresholdModel }): Promise { - var path = this.buildUrl({ - url: `/api/v2/companies/${companyId}/distancethresholds/${id}`, - parameters: {} - }); - var strClientId = - this.appNM + - '; ' + - this.appVer + - '; JavascriptSdk; ' + this.apiVersion + '; ' + - this.machineNM; + * @param {Models.CompanyDistanceThresholdModel} model The new DistanceThreshold object to store. + * @return {Models.CompanyDistanceThresholdModel} + */ + + updateDistanceThreshold({ companyId, id, model }: { companyId: number, id: number, model: Models.CompanyDistanceThresholdModel }): Promise { + var path = this.buildUrl({ + url: `/api/v2/companies/${companyId}/distancethresholds/${id}`, + parameters: {} + }); + var strClientId = + this.appNM + + '; ' + + this.appVer + + '; JavascriptSdk; ' + this.apiVersion + '; ' + + this.machineNM; return this.restCall({ url: path, verb: 'put', payload: model, clientId: strClientId }, Models.CompanyDistanceThresholdModel); - } - - /** - * Create Domain control verification - * - * Swagger Name: AvaTaxClient - * - * - * @param {Models.DomainNameViewModel} model - * @return {Models.DcvCreationResponse} - */ - - createDcv({ model }: { model?: Models.DomainNameViewModel }): Promise { - var path = this.buildUrl({ - url: `/api/v2/domain-control-verifications`, - parameters: {} - }); - var strClientId = - this.appNM + - '; ' + - this.appVer + - '; JavascriptSdk; ' + this.apiVersion + '; ' + - this.machineNM; + } + + /** + * Create Domain control verification + * + * Swagger Name: AvaTaxClient + * + * + * @param {Models.DomainNameViewModel} model + * @return {Models.DcvCreationResponse} + */ + + createDcv({ model }: { model?: Models.DomainNameViewModel }): Promise { + var path = this.buildUrl({ + url: `/api/v2/domain-control-verifications`, + parameters: {} + }); + var strClientId = + this.appNM + + '; ' + + this.appVer + + '; JavascriptSdk; ' + this.apiVersion + '; ' + + this.machineNM; return this.restCall({ url: path, verb: 'post', payload: model, clientId: strClientId }, Models.DcvCreationResponse); - } - - /** - * Get domain control verifications by logged in user/domain name. - * - * 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, Context, Token, Status, EmailId, CreatedOn, CreatedBy, UpdatedOn, UpdatedBy - * @return {Models.DcvViewModel[]} - */ - - filterDcv({ filter }: { filter?: string }): Promise> { - var path = this.buildUrl({ - url: `/api/v2/domain-control-verifications`, + } + + /** + * Get domain control verifications by logged in user/domain name. + * + * 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, Context, Token, Status, EmailId, CreatedOn, CreatedBy, UpdatedOn, UpdatedBy + * @return {Models.DcvViewModel[]} + */ + + filterDcv({ filter }: { filter?: string }): Promise> { + var path = this.buildUrl({ + url: `/api/v2/domain-control-verifications`, parameters: { $filter: filter } - }); - var strClientId = - this.appNM + - '; ' + - this.appVer + - '; JavascriptSdk; ' + this.apiVersion + '; ' + - this.machineNM; + }); + var strClientId = + this.appNM + + '; ' + + this.appVer + + '; JavascriptSdk; ' + this.apiVersion + '; ' + + this.machineNM; return this.restCall({ url: path, verb: 'get', payload: null, clientId: strClientId }, Array); - } - - /** - * Get domain control verification by domainControlVerificationId - * - * Swagger Name: AvaTaxClient - * - * - * @param {string} domainControlVerificationId - * @return {Models.DcvViewModel} - */ - - getDcvById({ domainControlVerificationId }: { domainControlVerificationId: string }): Promise { - var path = this.buildUrl({ - url: `/api/v2/domain-control-verifications/${domainControlVerificationId}`, - parameters: {} - }); - var strClientId = - this.appNM + - '; ' + - this.appVer + - '; JavascriptSdk; ' + this.apiVersion + '; ' + - this.machineNM; + } + + /** + * Get domain control verification by domainControlVerificationId + * + * Swagger Name: AvaTaxClient + * + * + * @param {string} domainControlVerificationId + * @return {Models.DcvViewModel} + */ + + getDcvById({ domainControlVerificationId }: { domainControlVerificationId: string }): Promise { + var path = this.buildUrl({ + url: `/api/v2/domain-control-verifications/${domainControlVerificationId}`, + parameters: {} + }); + var strClientId = + this.appNM + + '; ' + + this.appVer + + '; JavascriptSdk; ' + this.apiVersion + '; ' + + this.machineNM; return this.restCall({ url: path, verb: 'get', payload: null, clientId: strClientId }, Models.DcvViewModel); - } - - /** - * Create a new eCommerce token. + } + + /** + * Delete AFC event notifications. + * ### Security Policies + * + * * This API depends on the following active services:*Required* (all): ECMPremiumComms, ECMProComms. + * Swagger Name: AvaTaxClient + * + * + * @param {boolean} isDlq Specify `true` to delete event notifications from the dead letter queue; otherwise, specify `false`. + * @param {Models.EventDeleteMessageModel} model Details of the event you want to delete. + * @return {FetchResult} + */ + + deleteAfcEventNotifications({ isDlq, model }: { isDlq?: boolean, model: Models.EventDeleteMessageModel }): Promise> { + var path = this.buildUrl({ + url: `/api/v2/event-notifications/afc`, + parameters: { + isDlq: isDlq + } + }); + var strClientId = + this.appNM + + '; ' + + this.appVer + + '; JavascriptSdk; ' + this.apiVersion + '; ' + + this.machineNM; + return this.restCall({ url: path, verb: 'delete', payload: model, clientId: strClientId }, FetchResult); + } + + /** + * Delete company event notifications + * ### Security Policies + * + * * This API depends on the following active services:*Required* (all): ECMPro, ECMPremium. + * Swagger Name: AvaTaxClient + * + * + * @param {number} companyId The unique ID number of the company that recorded these event notifications. + * @param {Models.EventDeleteMessageModel} model Details of the event you want to delete. + * @return {FetchResult} + */ + + deleteEventNotifications({ companyId, model }: { companyId: number, model: Models.EventDeleteMessageModel }): Promise> { + var path = this.buildUrl({ + url: `/api/v2/event-notifications/companies/${companyId}`, + parameters: {} + }); + var strClientId = + this.appNM + + '; ' + + this.appVer + + '; JavascriptSdk; ' + this.apiVersion + '; ' + + this.machineNM; + return this.restCall({ url: path, verb: 'delete', payload: model, clientId: strClientId }, FetchResult); + } + + /** + * Retrieve company event notifications. + * ### Security Policies + * + * * This API depends on the following active services:*Required* (all): ECMPro, ECMPremium. + * Swagger Name: AvaTaxClient + * + * + * @param {number} companyId The unique ID number of the company that recorded these event notifications. + * @return {FetchResult} + */ + + getEventNotifications({ companyId }: { companyId: number }): Promise> { + var path = this.buildUrl({ + url: `/api/v2/event-notifications/companies/${companyId}`, + parameters: {} + }); + var strClientId = + this.appNM + + '; ' + + this.appVer + + '; JavascriptSdk; ' + this.apiVersion + '; ' + + this.machineNM; + return this.restCall({ url: path, verb: 'get', payload: null, clientId: strClientId }, FetchResult); + } + + /** + * Retrieve AFC event notifications + * ### Security Policies + * + * * This API depends on the following active services:*Required* (all): ECMPremiumComms, ECMProComms. + * Swagger Name: AvaTaxClient + * + * + * @param {boolean} isDlq Specify `true` to retrieve event notifications from the dead letter queue; otherwise, specify `false`. + * @return {FetchResult} + */ + + listAfcEventNotifications({ isDlq }: { isDlq?: boolean }): Promise> { + var path = this.buildUrl({ + url: `/api/v2/event-notifications/afc`, + parameters: { + isDlq: isDlq + } + }); + var strClientId = + this.appNM + + '; ' + + this.appVer + + '; JavascriptSdk; ' + this.apiVersion + '; ' + + this.machineNM; + return this.restCall({ url: path, verb: 'get', payload: null, clientId: strClientId }, FetchResult); + } + + /** + * 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, BatchServiceAdmin, CompanyAdmin, CompanyUser, Compliance Root User, ComplianceAdmin, ComplianceUser, CSPAdmin, CSPTester, ECMAccountUser, ECMCompanyUser, FirmAdmin, FirmUser, ProStoresOperator, Registrar, SiteAdmin, SSTAdmin, SystemAdmin, TechnicalSupportAdmin, TechnicalSupportUser, TreasuryAdmin, TreasuryUser. - * Swagger Name: AvaTaxClient - * + * * This API requires one of the following user roles: AccountAdmin, AccountOperator, AccountUser, BatchServiceAdmin, CompanyAdmin, CompanyUser, Compliance Root User, ComplianceAdmin, ComplianceUser, CSPAdmin, CSPTester, ECMAccountUser, ECMCompanyUser, FirmAdmin, FirmUser, ProStoresOperator, Registrar, SiteAdmin, SSTAdmin, SystemAdmin, TechnicalSupportAdmin, TechnicalSupportUser, TreasuryAdmin, TreasuryUser. + * Swagger Name: AvaTaxClient + * * * @param {number} companyId The company ID that will be issued this certificate. - * @param {Models.CreateECommerceTokenInputModel} model - * @return {Models.ECommerceTokenOutputModel} - */ - - createECommerceToken({ companyId, model }: { companyId: number, model: Models.CreateECommerceTokenInputModel }): Promise { - var path = this.buildUrl({ - url: `/api/v2/companies/${companyId}/ecommercetokens`, - parameters: {} - }); - var strClientId = - this.appNM + - '; ' + - this.appVer + - '; JavascriptSdk; ' + this.apiVersion + '; ' + - this.machineNM; + * @param {Models.CreateECommerceTokenInputModel} model + * @return {Models.ECommerceTokenOutputModel} + */ + + createECommerceToken({ companyId, model }: { companyId: number, model: Models.CreateECommerceTokenInputModel }): Promise { + var path = this.buildUrl({ + url: `/api/v2/companies/${companyId}/ecommercetokens`, + parameters: {} + }); + var strClientId = + this.appNM + + '; ' + + this.appVer + + '; JavascriptSdk; ' + this.apiVersion + '; ' + + this.machineNM; return this.restCall({ url: path, verb: 'post', payload: model, clientId: strClientId }, Models.ECommerceTokenOutputModel); - } - - /** - * Refresh an eCommerce token. + } + + /** + * 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, BatchServiceAdmin, CompanyAdmin, CompanyUser, Compliance Root User, ComplianceAdmin, ComplianceUser, CSPAdmin, CSPTester, ECMAccountUser, ECMCompanyUser, FirmAdmin, FirmUser, ProStoresOperator, Registrar, SiteAdmin, SSTAdmin, SystemAdmin, TechnicalSupportAdmin, TechnicalSupportUser, TreasuryAdmin, TreasuryUser. - * Swagger Name: AvaTaxClient - * + * * This API requires one of the following user roles: AccountAdmin, AccountOperator, AccountUser, BatchServiceAdmin, CompanyAdmin, CompanyUser, Compliance Root User, ComplianceAdmin, ComplianceUser, CSPAdmin, CSPTester, ECMAccountUser, ECMCompanyUser, FirmAdmin, FirmUser, ProStoresOperator, Registrar, SiteAdmin, SSTAdmin, SystemAdmin, TechnicalSupportAdmin, TechnicalSupportUser, TreasuryAdmin, TreasuryUser. + * Swagger Name: AvaTaxClient + * * * @param {number} companyId The company ID that the refreshed certificate belongs to. - * @param {Models.RefreshECommerceTokenInputModel} model - * @return {FetchResult} - */ - - refreshECommerceToken({ companyId, model }: { companyId: number, model: Models.RefreshECommerceTokenInputModel }): Promise> { - var path = this.buildUrl({ - url: `/api/v2/companies/${companyId}/ecommercetokens`, - parameters: {} - }); - var strClientId = - this.appNM + - '; ' + - this.appVer + - '; JavascriptSdk; ' + this.apiVersion + '; ' + - this.machineNM; + * @param {Models.RefreshECommerceTokenInputModel} model + * @return {FetchResult} + */ + + refreshECommerceToken({ companyId, model }: { companyId: number, model: Models.RefreshECommerceTokenInputModel }): Promise> { + var path = this.buildUrl({ + url: `/api/v2/companies/${companyId}/ecommercetokens`, + parameters: {} + }); + var strClientId = + this.appNM + + '; ' + + this.appVer + + '; JavascriptSdk; ' + this.apiVersion + '; ' + + this.machineNM; return this.restCall({ url: path, verb: 'put', payload: model, clientId: strClientId }, FetchResult); - } - - /** - * Approves linkage to a firm for a client account + } + + /** + * 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, BatchServiceAdmin, FirmAdmin, Registrar, SiteAdmin, SSTAdmin, SystemAdmin, TechnicalSupportAdmin. - * Swagger Name: AvaTaxClient - * + * * This API requires one of the following user roles: AccountAdmin, BatchServiceAdmin, FirmAdmin, Registrar, SiteAdmin, SSTAdmin, SystemAdmin, TechnicalSupportAdmin. + * Swagger Name: AvaTaxClient + * * - * @param {number} id - * @return {Models.FirmClientLinkageOutputModel} - */ - - approveFirmClientLinkage({ id }: { id: number }): Promise { - var path = this.buildUrl({ - url: `/api/v2/firmclientlinkages/${id}/approve`, - parameters: {} - }); - var strClientId = - this.appNM + - '; ' + - this.appVer + - '; JavascriptSdk; ' + this.apiVersion + '; ' + - this.machineNM; + * @param {number} id + * @return {Models.FirmClientLinkageOutputModel} + */ + + approveFirmClientLinkage({ id }: { id: number }): Promise { + var path = this.buildUrl({ + url: `/api/v2/firmclientlinkages/${id}/approve`, + parameters: {} + }); + var strClientId = + this.appNM + + '; ' + + this.appVer + + '; JavascriptSdk; ' + this.apiVersion + '; ' + + this.machineNM; return this.restCall({ url: path, verb: 'post', payload: null, clientId: strClientId }, Models.FirmClientLinkageOutputModel); - } - - /** - * Request a new FirmClient account and create an approved linkage to it + } + + /** + * 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. @@ -7529,228 +7750,228 @@ export default class AvaTaxClient { * * ### Security Policies * - * * This API requires one of the following user roles: FirmAdmin, Registrar, SiteAdmin, SystemAdmin. - * Swagger Name: AvaTaxClient - * + * * This API requires one of the following user roles: FirmAdmin, Registrar, SiteAdmin, SystemAdmin. + * Swagger Name: AvaTaxClient + * * - * @param {Models.NewFirmClientAccountRequestModel} model Information about the account you wish to create. - * @return {Models.FirmClientLinkageOutputModel} - */ - - createAndLinkNewFirmClientAccount({ model }: { model: Models.NewFirmClientAccountRequestModel }): Promise { - var path = this.buildUrl({ - url: `/api/v2/firmclientlinkages/createandlinkclient`, + * @param {Models.NewFirmClientAccountRequestModel} model Information about the account you wish to create. + * @return {Models.FirmClientLinkageOutputModel} + */ + + createAndLinkNewFirmClientAccount({ model }: { model: Models.NewFirmClientAccountRequestModel }): Promise { + var path = this.buildUrl({ + url: `/api/v2/firmclientlinkages/createandlinkclient`, parameters: {} - }); - var strClientId = - this.appNM + - '; ' + - this.appVer + - '; JavascriptSdk; ' + this.apiVersion + '; ' + - this.machineNM; + }); + var strClientId = + this.appNM + + '; ' + + this.appVer + + '; JavascriptSdk; ' + this.apiVersion + '; ' + + this.machineNM; return this.restCall({ url: path, verb: 'post', payload: model, clientId: strClientId }, Models.FirmClientLinkageOutputModel); - } - - /** - * Links a firm account with the client account + } + + /** + * 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: BatchServiceAdmin, FirmAdmin, Registrar, SiteAdmin, SSTAdmin, SystemAdmin, TechnicalSupportAdmin. - * Swagger Name: AvaTaxClient - * - * - * @param {Models.FirmClientLinkageInputModel} model FirmClientLinkageInputModel - * @return {Models.FirmClientLinkageOutputModel} - */ - - createFirmClientLinkage({ model }: { model: Models.FirmClientLinkageInputModel }): Promise { - var path = this.buildUrl({ - url: `/api/v2/firmclientlinkages`, - parameters: {} - }); - var strClientId = - this.appNM + - '; ' + - this.appVer + - '; JavascriptSdk; ' + this.apiVersion + '; ' + - this.machineNM; + * * This API requires one of the following user roles: BatchServiceAdmin, FirmAdmin, Registrar, SiteAdmin, SSTAdmin, SystemAdmin, TechnicalSupportAdmin. + * Swagger Name: AvaTaxClient + * + * + * @param {Models.FirmClientLinkageInputModel} model FirmClientLinkageInputModel + * @return {Models.FirmClientLinkageOutputModel} + */ + + createFirmClientLinkage({ model }: { model: Models.FirmClientLinkageInputModel }): Promise { + var path = this.buildUrl({ + url: `/api/v2/firmclientlinkages`, + parameters: {} + }); + var strClientId = + this.appNM + + '; ' + + this.appVer + + '; JavascriptSdk; ' + this.apiVersion + '; ' + + this.machineNM; return this.restCall({ url: path, verb: 'post', payload: model, clientId: strClientId }, Models.FirmClientLinkageOutputModel); - } - - /** - * Delete a linkage + } + + /** + * 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: BatchServiceAdmin, FirmAdmin, Registrar, SiteAdmin, SSTAdmin, SystemAdmin, TechnicalSupportAdmin. - * Swagger Name: AvaTaxClient - * + * * This API requires one of the following user roles: BatchServiceAdmin, FirmAdmin, Registrar, SiteAdmin, SSTAdmin, SystemAdmin, TechnicalSupportAdmin. + * Swagger Name: AvaTaxClient + * * - * @param {number} id - * @return {Models.ErrorDetail[]} - */ - - deleteFirmClientLinkage({ id }: { id: number }): Promise> { - var path = this.buildUrl({ - url: `/api/v2/firmclientlinkages/${id}`, - parameters: {} - }); - var strClientId = - this.appNM + - '; ' + - this.appVer + - '; JavascriptSdk; ' + this.apiVersion + '; ' + - this.machineNM; + * @param {number} id + * @return {Models.ErrorDetail[]} + */ + + deleteFirmClientLinkage({ id }: { id: number }): Promise> { + var path = this.buildUrl({ + url: `/api/v2/firmclientlinkages/${id}`, + parameters: {} + }); + var strClientId = + this.appNM + + '; ' + + this.appVer + + '; JavascriptSdk; ' + this.apiVersion + '; ' + + this.machineNM; return this.restCall({ url: path, verb: 'delete', payload: null, clientId: strClientId }, Array); - } - - /** - * Get linkage between a firm and client by id + } + + /** + * 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, BatchServiceAdmin, CompanyAdmin, CompanyUser, Compliance Root User, ComplianceAdmin, ComplianceUser, CSPAdmin, CSPTester, ECMAccountUser, ECMCompanyUser, FirmAdmin, FirmUser, Registrar, SiteAdmin, SSTAdmin, SystemAdmin, TechnicalSupportAdmin, TechnicalSupportUser, TreasuryAdmin, TreasuryUser. - * Swagger Name: AvaTaxClient - * + * * This API requires one of the following user roles: AccountAdmin, AccountUser, BatchServiceAdmin, CompanyAdmin, CompanyUser, Compliance Root User, ComplianceAdmin, ComplianceUser, CSPAdmin, CSPTester, ECMAccountUser, ECMCompanyUser, FirmAdmin, FirmUser, Registrar, SiteAdmin, SSTAdmin, SystemAdmin, TechnicalSupportAdmin, TechnicalSupportUser, TreasuryAdmin, TreasuryUser. + * Swagger Name: AvaTaxClient + * * - * @param {number} id - * @return {Models.FirmClientLinkageOutputModel} - */ - - getFirmClientLinkage({ id }: { id: number }): Promise { - var path = this.buildUrl({ - url: `/api/v2/firmclientlinkages/${id}`, - parameters: {} - }); - var strClientId = - this.appNM + - '; ' + - this.appVer + - '; JavascriptSdk; ' + this.apiVersion + '; ' + - this.machineNM; + * @param {number} id + * @return {Models.FirmClientLinkageOutputModel} + */ + + getFirmClientLinkage({ id }: { id: number }): Promise { + var path = this.buildUrl({ + url: `/api/v2/firmclientlinkages/${id}`, + parameters: {} + }); + var strClientId = + this.appNM + + '; ' + + this.appVer + + '; JavascriptSdk; ' + this.apiVersion + '; ' + + this.machineNM; return this.restCall({ url: path, verb: 'get', payload: null, clientId: strClientId }, Models.FirmClientLinkageOutputModel); - } - - /** - * List client linkages for a firm or client + } + + /** + * 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, BatchServiceAdmin, CompanyAdmin, CompanyUser, Compliance Root User, ComplianceAdmin, ComplianceUser, CSPAdmin, CSPTester, ECMAccountUser, ECMCompanyUser, FirmAdmin, FirmUser, Registrar, SiteAdmin, SSTAdmin, SystemAdmin, TechnicalSupportAdmin, TechnicalSupportUser, TreasuryAdmin, TreasuryUser. - * Swagger Name: AvaTaxClient - * + * * This API requires one of the following user roles: AccountAdmin, AccountUser, BatchServiceAdmin, CompanyAdmin, CompanyUser, Compliance Root User, ComplianceAdmin, ComplianceUser, CSPAdmin, CSPTester, ECMAccountUser, ECMCompanyUser, 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 }: { filter?: string }): Promise> { - 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 }: { filter?: string }): Promise> { + var path = this.buildUrl({ + url: `/api/v2/firmclientlinkages`, parameters: { $filter: filter } - }); - var strClientId = - this.appNM + - '; ' + - this.appVer + - '; JavascriptSdk; ' + this.apiVersion + '; ' + - this.machineNM; + }); + var strClientId = + this.appNM + + '; ' + + this.appVer + + '; JavascriptSdk; ' + this.apiVersion + '; ' + + this.machineNM; return this.restCall({ url: path, verb: 'get', payload: null, clientId: strClientId }, FetchResult); - } - - /** - * Rejects linkage to a firm for a client account + } + + /** + * 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, BatchServiceAdmin, FirmAdmin, Registrar, SiteAdmin, SSTAdmin, SystemAdmin, TechnicalSupportAdmin. - * Swagger Name: AvaTaxClient - * + * * This API requires one of the following user roles: AccountAdmin, BatchServiceAdmin, FirmAdmin, Registrar, SiteAdmin, SSTAdmin, SystemAdmin, TechnicalSupportAdmin. + * Swagger Name: AvaTaxClient + * * - * @param {number} id - * @return {Models.FirmClientLinkageOutputModel} - */ - - rejectFirmClientLinkage({ id }: { id: number }): Promise { - var path = this.buildUrl({ - url: `/api/v2/firmclientlinkages/${id}/reject`, - parameters: {} - }); - var strClientId = - this.appNM + - '; ' + - this.appVer + - '; JavascriptSdk; ' + this.apiVersion + '; ' + - this.machineNM; + * @param {number} id + * @return {Models.FirmClientLinkageOutputModel} + */ + + rejectFirmClientLinkage({ id }: { id: number }): Promise { + var path = this.buildUrl({ + url: `/api/v2/firmclientlinkages/${id}/reject`, + parameters: {} + }); + var strClientId = + this.appNM + + '; ' + + this.appVer + + '; JavascriptSdk; ' + this.apiVersion + '; ' + + this.machineNM; return this.restCall({ url: path, verb: 'post', payload: null, clientId: strClientId }, Models.FirmClientLinkageOutputModel); - } - - /** - * Reset linkage status between a client and firm back to requested + } + + /** + * 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: BatchServiceAdmin, FirmAdmin, Registrar, SiteAdmin, SSTAdmin, SystemAdmin, TechnicalSupportAdmin. - * Swagger Name: AvaTaxClient - * + * * This API requires one of the following user roles: BatchServiceAdmin, FirmAdmin, Registrar, SiteAdmin, SSTAdmin, SystemAdmin, TechnicalSupportAdmin. + * Swagger Name: AvaTaxClient + * * - * @param {number} id - * @return {Models.FirmClientLinkageOutputModel} - */ - - resetFirmClientLinkage({ id }: { id: number }): Promise { - var path = this.buildUrl({ - url: `/api/v2/firmclientlinkages/${id}/reset`, - parameters: {} - }); - var strClientId = - this.appNM + - '; ' + - this.appVer + - '; JavascriptSdk; ' + this.apiVersion + '; ' + - this.machineNM; + * @param {number} id + * @return {Models.FirmClientLinkageOutputModel} + */ + + resetFirmClientLinkage({ id }: { id: number }): Promise { + var path = this.buildUrl({ + url: `/api/v2/firmclientlinkages/${id}/reset`, + parameters: {} + }); + var strClientId = + this.appNM + + '; ' + + this.appVer + + '; JavascriptSdk; ' + this.apiVersion + '; ' + + this.machineNM; return this.restCall({ url: path, verb: 'post', payload: null, clientId: strClientId }, Models.FirmClientLinkageOutputModel); - } - - /** - * Revokes previously approved linkage to a firm for a client account + } + + /** + * 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, BatchServiceAdmin, FirmAdmin, Registrar, SiteAdmin, SSTAdmin, SystemAdmin, TechnicalSupportAdmin. - * Swagger Name: AvaTaxClient - * + * * This API requires one of the following user roles: AccountAdmin, BatchServiceAdmin, FirmAdmin, Registrar, SiteAdmin, SSTAdmin, SystemAdmin, TechnicalSupportAdmin. + * Swagger Name: AvaTaxClient + * * - * @param {number} id - * @return {Models.FirmClientLinkageOutputModel} - */ - - revokeFirmClientLinkage({ id }: { id: number }): Promise { - var path = this.buildUrl({ - url: `/api/v2/firmclientlinkages/${id}/revoke`, - parameters: {} - }); - var strClientId = - this.appNM + - '; ' + - this.appVer + - '; JavascriptSdk; ' + this.apiVersion + '; ' + - this.machineNM; + * @param {number} id + * @return {Models.FirmClientLinkageOutputModel} + */ + + revokeFirmClientLinkage({ id }: { id: number }): Promise { + var path = this.buildUrl({ + url: `/api/v2/firmclientlinkages/${id}/revoke`, + parameters: {} + }); + var strClientId = + this.appNM + + '; ' + + this.appVer + + '; JavascriptSdk; ' + this.apiVersion + '; ' + + this.machineNM; return this.restCall({ url: path, verb: 'post', payload: null, clientId: strClientId }, Models.FirmClientLinkageOutputModel); - } - - /** - * Request the javascript for a funding setup widget + } + + /** + * 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 @@ -7767,35 +7988,35 @@ export default class AvaTaxClient { * ### Security Policies * * * This API requires one of the following user roles: AccountAdmin, AccountOperator, AccountUser, BatchServiceAdmin, CompanyAdmin, CompanyUser, Compliance Root User, ComplianceAdmin, ComplianceUser, CSPAdmin, CSPTester, ECMAccountUser, ECMCompanyUser, 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. - * Swagger Name: AvaTaxClient - * + * * 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 {number} id The unique ID number of this funding request * @param {Enums.POABusinessUnit} businessUnit The company's business unit (See POABusinessUnit::* for a list of allowable values) - * @param {Enums.POASubscriptionType} subscriptionType The company's subscription type (See POASubscriptionType::* for a list of allowable values) - * @return {Models.FundingStatusModel} - */ - - activateFundingRequest({ id, businessUnit, subscriptionType }: { id: number, businessUnit?: Enums.POABusinessUnit, subscriptionType?: Enums.POASubscriptionType }): Promise { - var path = this.buildUrl({ - url: `/api/v2/fundingrequests/${id}/widget`, + * @param {Enums.POASubscriptionType} subscriptionType The company's subscription type (See POASubscriptionType::* for a list of allowable values) + * @return {Models.FundingStatusModel} + */ + + activateFundingRequest({ id, businessUnit, subscriptionType }: { id: number, businessUnit?: Enums.POABusinessUnit, subscriptionType?: Enums.POASubscriptionType }): Promise { + var path = this.buildUrl({ + url: `/api/v2/fundingrequests/${id}/widget`, parameters: { businessUnit: businessUnit, subscriptionType: subscriptionType } - }); - var strClientId = - this.appNM + - '; ' + - this.appVer + - '; JavascriptSdk; ' + this.apiVersion + '; ' + - this.machineNM; + }); + var strClientId = + this.appNM + + '; ' + + this.appVer + + '; JavascriptSdk; ' + this.apiVersion + '; ' + + this.machineNM; return this.restCall({ url: path, verb: 'get', payload: null, clientId: strClientId }, Models.FundingStatusModel); - } - - /** - * Retrieve status about a funding setup request + } + + /** + * 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 @@ -7810,153 +8031,153 @@ export default class AvaTaxClient { * ### Security Policies * * * This API requires one of the following user roles: AccountAdmin, BatchServiceAdmin, 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. - * Swagger Name: AvaTaxClient - * + * * 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 {number} id The unique ID number of this funding request * @param {Enums.POABusinessUnit} businessUnit The company's business unit (See POABusinessUnit::* for a list of allowable values) - * @param {Enums.POASubscriptionType} subscriptionType The company's subscription type (See POASubscriptionType::* for a list of allowable values) - * @return {Models.FundingStatusModel} - */ - - fundingRequestStatus({ id, businessUnit, subscriptionType }: { id: number, businessUnit?: Enums.POABusinessUnit, subscriptionType?: Enums.POASubscriptionType }): Promise { - var path = this.buildUrl({ - url: `/api/v2/fundingrequests/${id}`, + * @param {Enums.POASubscriptionType} subscriptionType The company's subscription type (See POASubscriptionType::* for a list of allowable values) + * @return {Models.FundingStatusModel} + */ + + fundingRequestStatus({ id, businessUnit, subscriptionType }: { id: number, businessUnit?: Enums.POABusinessUnit, subscriptionType?: Enums.POASubscriptionType }): Promise { + var path = this.buildUrl({ + url: `/api/v2/fundingrequests/${id}`, parameters: { businessUnit: businessUnit, subscriptionType: subscriptionType } - }); - var strClientId = - this.appNM + - '; ' + - this.appVer + - '; JavascriptSdk; ' + this.apiVersion + '; ' + - this.machineNM; + }); + var strClientId = + this.appNM + + '; ' + + this.appVer + + '; JavascriptSdk; ' + this.apiVersion + '; ' + + this.machineNM; return this.restCall({ url: path, verb: 'get', payload: null, clientId: strClientId }, Models.FundingStatusModel); - } - - /** - * Bulk upload GL accounts - * Allows a bulk upload of GL accounts for the specified company. Use the companyid path parameter to identify the company for which the GL accounts should be uploaded. - * Swagger Name: AvaTaxClient - * + } + + /** + * Bulk upload GL accounts + * Allows a bulk upload of GL accounts for the specified company. Use the companyid path parameter to identify the company for which the GL accounts should be uploaded. + * Swagger Name: AvaTaxClient + * * * @param {number} companyid The ID of the company that owns this GL account object - * @param {Models.GLAccountBulkUploadInputModel} model The GL account bulk upload model. - * @return {Models.GLAccountBulkUploadOutputModel} - */ - - bulkUploadGLAccounts({ companyid, model }: { companyid: number, model?: Models.GLAccountBulkUploadInputModel }): Promise { - var path = this.buildUrl({ - url: `/api/v2/companies/${companyid}/glaccounts/$upload`, - parameters: {} - }); - var strClientId = - this.appNM + - '; ' + - this.appVer + - '; JavascriptSdk; ' + this.apiVersion + '; ' + - this.machineNM; + * @param {Models.GLAccountBulkUploadInputModel} model The GL account bulk upload model. + * @return {Models.GLAccountBulkUploadOutputModel} + */ + + bulkUploadGLAccounts({ companyid, model }: { companyid: number, model?: Models.GLAccountBulkUploadInputModel }): Promise { + var path = this.buildUrl({ + url: `/api/v2/companies/${companyid}/glaccounts/$upload`, + parameters: {} + }); + var strClientId = + this.appNM + + '; ' + + this.appVer + + '; JavascriptSdk; ' + this.apiVersion + '; ' + + this.machineNM; return this.restCall({ url: path, verb: 'post', payload: model, clientId: strClientId }, Models.GLAccountBulkUploadOutputModel); - } - - /** - * Create a new GL account + } + + /** + * Create a new GL account * Creates one or more new GL account objects attached to this company. * - * A GL account is a general ledger account that can be passed to transactions at the line level to apply the multiple rules of the transactions, including exemptions, allocations, etc. to a specific general ledger. - * Swagger Name: AvaTaxClient - * + * A GL account is a general ledger account that can be passed to transactions at the line level to apply the multiple rules of the transactions, including exemptions, allocations, etc. to a specific general ledger. + * Swagger Name: AvaTaxClient + * * * @param {number} companyid The ID of the company that owns this GL Account object - * @param {Models.GLAccountRequestModel} model The GL Account you want to create - * @return {Models.GLAccountSuccessResponseModel} - */ - - createGLAccount({ companyid, model }: { companyid: number, model?: Models.GLAccountRequestModel }): Promise { - var path = this.buildUrl({ - url: `/api/v2/companies/${companyid}/glaccounts`, - parameters: {} - }); - var strClientId = - this.appNM + - '; ' + - this.appVer + - '; JavascriptSdk; ' + this.apiVersion + '; ' + - this.machineNM; + * @param {Models.GLAccountRequestModel} model The GL Account you want to create + * @return {Models.GLAccountSuccessResponseModel} + */ + + createGLAccount({ companyid, model }: { companyid: number, model?: Models.GLAccountRequestModel }): Promise { + var path = this.buildUrl({ + url: `/api/v2/companies/${companyid}/glaccounts`, + parameters: {} + }); + var strClientId = + this.appNM + + '; ' + + this.appVer + + '; JavascriptSdk; ' + this.apiVersion + '; ' + + this.machineNM; return this.restCall({ url: path, verb: 'post', payload: model, clientId: strClientId }, Models.GLAccountSuccessResponseModel); - } - - /** - * Delete the GL account associated with the given company ID and GL account ID - * Deletes the GL account associated with the specified `glaccountid` and `companyid` - * Swagger Name: AvaTaxClient - * + } + + /** + * Delete the GL account associated with the given company ID and GL account ID + * Deletes the GL account associated with the specified `glaccountid` and `companyid` + * Swagger Name: AvaTaxClient + * * * @param {number} companyid The ID of the company that owns this GL account object - * @param {number} glaccountid The primary key of this GL account - * @return {Models.TaxProfileErrorResponseModel} - */ - - deleteGLAccount({ companyid, glaccountid }: { companyid: number, glaccountid: number }): Promise { - var path = this.buildUrl({ - url: `/api/v2/companies/${companyid}/glaccounts/${glaccountid}`, - parameters: {} - }); - var strClientId = - this.appNM + - '; ' + - this.appVer + - '; JavascriptSdk; ' + this.apiVersion + '; ' + - this.machineNM; + * @param {number} glaccountid The primary key of this GL account + * @return {Models.TaxProfileErrorResponseModel} + */ + + deleteGLAccount({ companyid, glaccountid }: { companyid: number, glaccountid: number }): Promise { + var path = this.buildUrl({ + url: `/api/v2/companies/${companyid}/glaccounts/${glaccountid}`, + parameters: {} + }); + var strClientId = + this.appNM + + '; ' + + this.appVer + + '; JavascriptSdk; ' + this.apiVersion + '; ' + + this.machineNM; return this.restCall({ url: path, verb: 'delete', payload: null, clientId: strClientId }, Models.TaxProfileErrorResponseModel); - } - - /** - * Retrieve a single GL account - * Retrieve details of a single GL account identified by its `glaccountid` and `companyid` - * Swagger Name: AvaTaxClient - * + } + + /** + * Retrieve a single GL account + * Retrieve details of a single GL account identified by its `glaccountid` and `companyid` + * Swagger Name: AvaTaxClient + * * * @param {number} companyid The ID of the company that owns this GL account object - * @param {number} glaccountid The primary key of this GL account - * @return {Models.GLAccountSuccessResponseModel} - */ - - getGLAccountById({ companyid, glaccountid }: { companyid: number, glaccountid: number }): Promise { - var path = this.buildUrl({ - url: `/api/v2/companies/${companyid}/glaccounts/${glaccountid}`, - parameters: {} - }); - var strClientId = - this.appNM + - '; ' + - this.appVer + - '; JavascriptSdk; ' + this.apiVersion + '; ' + - this.machineNM; + * @param {number} glaccountid The primary key of this GL account + * @return {Models.GLAccountSuccessResponseModel} + */ + + getGLAccountById({ companyid, glaccountid }: { companyid: number, glaccountid: number }): Promise { + var path = this.buildUrl({ + url: `/api/v2/companies/${companyid}/glaccounts/${glaccountid}`, + parameters: {} + }); + var strClientId = + this.appNM + + '; ' + + this.appVer + + '; JavascriptSdk; ' + this.apiVersion + '; ' + + this.machineNM; return this.restCall({ url: path, verb: 'get', payload: null, clientId: strClientId }, Models.GLAccountSuccessResponseModel); - } - - /** - * Retrieve GL accounts for this company - * Retrieves a list of GL accounts attached to this company. You can apply filters to retrieve specific records. - * Swagger Name: AvaTaxClient - * + } + + /** + * Retrieve GL accounts for this company + * Retrieves a list of GL accounts attached to this company. You can apply filters to retrieve specific records. + * Swagger Name: AvaTaxClient + * * * @param {number} companyid The ID of the company that owns these GL accounts * @param {string} filter A filter statement to identify specific records to retrieve. For more information on filtering, see [Filtering in REST](http://developer.avalara.com/avatax/filtering-in-rest/).
*Not filterable:* companyId, meta, defaultItem * @param {string} include A comma separated list of objects to fetch underneath this company. Any object with a URL path underneath this company can be fetched by specifying its name. * @param {number} top If nonzero, return no more than this number of results. Used with `$skip` to provide pagination for large datasets. Unless otherwise specified, the maximum number of records that can be returned from an API call is 1,000 records. * @param {number} skip If nonzero, skip this number of results before returning data. Used with `$top` to provide pagination for large datasets. - * @param {string} orderBy A comma separated list of sort statements in the format `(fieldname) [ASC|DESC]`, for example `id ASC`. - * @return {FetchResult} - */ - - listGLAccountsByCompany({ companyid, filter, include, top, skip, orderBy }: { companyid: number, filter?: string, include?: string, top?: number, skip?: number, orderBy?: string }): Promise> { - var path = this.buildUrl({ - url: `/api/v2/companies/${companyid}/glaccounts`, + * @param {string} orderBy A comma separated list of sort statements in the format `(fieldname) [ASC|DESC]`, for example `id ASC`. + * @return {FetchResult} + */ + + listGLAccountsByCompany({ companyid, filter, include, top, skip, orderBy }: { companyid: number, filter?: string, include?: string, top?: number, skip?: number, orderBy?: string }): Promise> { + var path = this.buildUrl({ + url: `/api/v2/companies/${companyid}/glaccounts`, parameters: { $filter: filter, $include: include, @@ -7964,44 +8185,44 @@ export default class AvaTaxClient { $skip: skip, $orderBy: orderBy } - }); - var strClientId = - this.appNM + - '; ' + - this.appVer + - '; JavascriptSdk; ' + this.apiVersion + '; ' + - this.machineNM; + }); + var strClientId = + this.appNM + + '; ' + + this.appVer + + '; JavascriptSdk; ' + this.apiVersion + '; ' + + this.machineNM; return this.restCall({ url: path, verb: 'get', payload: null, clientId: strClientId }, FetchResult); - } - - /** - * Update a single GL account - * Updates a single GL account owned by the company. Use the glaccountid path parameter to identify the GL account to update. - * Swagger Name: AvaTaxClient - * + } + + /** + * Update a single GL account + * Updates a single GL account owned by the company. Use the glaccountid path parameter to identify the GL account to update. + * Swagger Name: AvaTaxClient + * * * @param {number} companyid The ID of the company that owns this GL Account object * @param {number} glaccountid The primary key of this GL Account - * @param {Models.GLAccountRequestModel} model The GL account object you want to update - * @return {Models.GLAccountSuccessResponseModel} - */ - - updateGLAccount({ companyid, glaccountid, model }: { companyid: number, glaccountid: number, model?: Models.GLAccountRequestModel }): Promise { - var path = this.buildUrl({ - url: `/api/v2/companies/${companyid}/glaccounts/${glaccountid}`, - parameters: {} - }); - var strClientId = - this.appNM + - '; ' + - this.appVer + - '; JavascriptSdk; ' + this.apiVersion + '; ' + - this.machineNM; + * @param {Models.GLAccountRequestModel} model The GL account object you want to update + * @return {Models.GLAccountSuccessResponseModel} + */ + + updateGLAccount({ companyid, glaccountid, model }: { companyid: number, glaccountid: number, model?: Models.GLAccountRequestModel }): Promise { + var path = this.buildUrl({ + url: `/api/v2/companies/${companyid}/glaccounts/${glaccountid}`, + parameters: {} + }); + var strClientId = + this.appNM + + '; ' + + this.appVer + + '; JavascriptSdk; ' + this.apiVersion + '; ' + + this.machineNM; return this.restCall({ url: path, verb: 'put', payload: model, clientId: strClientId }, Models.GLAccountSuccessResponseModel); - } - - /** - * Delete all classifications for an item + } + + /** + * Delete all 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. @@ -8010,31 +8231,31 @@ export default class AvaTaxClient { * * ### Security Policies * - * * This API requires one of the following user roles: AccountAdmin, BatchServiceAdmin, CompanyAdmin, CSPTester, SSTAdmin, TechnicalSupportAdmin. - * Swagger Name: AvaTaxClient - * + * * This API requires one of the following user roles: AccountAdmin, BatchServiceAdmin, CompanyAdmin, CSPTester, SSTAdmin, TechnicalSupportAdmin. + * Swagger Name: AvaTaxClient + * * * @param {number} companyId The ID of the company that owns this item. - * @param {number} itemId The ID of the item you wish to delete the classifications. - * @return {Models.AssociatedObjectDeletedErrorDetailsModel[]} - */ - - batchDeleteItemClassifications({ companyId, itemId }: { companyId: number, itemId: number }): Promise> { - var path = this.buildUrl({ - url: `/api/v2/companies/${companyId}/items/${itemId}/classifications`, - parameters: {} - }); - var strClientId = - this.appNM + - '; ' + - this.appVer + - '; JavascriptSdk; ' + this.apiVersion + '; ' + - this.machineNM; + * @param {number} itemId The ID of the item you wish to delete the classifications. + * @return {Models.AssociatedObjectDeletedErrorDetailsModel[]} + */ + + batchDeleteItemClassifications({ companyId, itemId }: { companyId: number, itemId: number }): Promise> { + var path = this.buildUrl({ + url: `/api/v2/companies/${companyId}/items/${itemId}/classifications`, + parameters: {} + }); + var strClientId = + this.appNM + + '; ' + + this.appVer + + '; JavascriptSdk; ' + this.apiVersion + '; ' + + this.machineNM; return this.restCall({ url: path, verb: 'delete', payload: null, clientId: strClientId }, Array); - } - - /** - * Delete all parameters for an item + } + + /** + * 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". @@ -8045,31 +8266,31 @@ export default class AvaTaxClient { * * ### Security Policies * - * * This API requires one of the following user roles: AccountAdmin, BatchServiceAdmin, CompanyAdmin, CSPTester, SSTAdmin, TechnicalSupportAdmin. - * Swagger Name: AvaTaxClient - * + * * This API requires one of the following user roles: AccountAdmin, BatchServiceAdmin, CompanyAdmin, CSPTester, SSTAdmin, TechnicalSupportAdmin. + * Swagger Name: AvaTaxClient + * * * @param {number} companyId The ID of the company that owns this item. - * @param {number} itemId The ID of the item you wish to delete the parameters. - * @return {Models.AssociatedObjectDeletedErrorDetailsModel[]} - */ - - batchDeleteItemParameters({ companyId, itemId }: { companyId: number, itemId: number }): Promise> { - var path = this.buildUrl({ - url: `/api/v2/companies/${companyId}/items/${itemId}/parameters`, - parameters: {} - }); - var strClientId = - this.appNM + - '; ' + - this.appVer + - '; JavascriptSdk; ' + this.apiVersion + '; ' + - this.machineNM; + * @param {number} itemId The ID of the item you wish to delete the parameters. + * @return {Models.AssociatedObjectDeletedErrorDetailsModel[]} + */ + + batchDeleteItemParameters({ companyId, itemId }: { companyId: number, itemId: number }): Promise> { + var path = this.buildUrl({ + url: `/api/v2/companies/${companyId}/items/${itemId}/parameters`, + parameters: {} + }); + var strClientId = + this.appNM + + '; ' + + this.appVer + + '; JavascriptSdk; ' + this.apiVersion + '; ' + + this.machineNM; return this.restCall({ url: path, verb: 'delete', payload: null, clientId: strClientId }, Array); - } - - /** - * Bulk upload items from a product catalog + } + + /** + * 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 @@ -8082,31 +8303,31 @@ export default class AvaTaxClient { * * ### Security Policies * - * * This API requires one of the following user roles: AccountAdmin, BatchServiceAdmin, CompanyAdmin, CSPTester, SSTAdmin, TechnicalSupportAdmin. - * Swagger Name: AvaTaxClient - * + * * This API requires one of the following user roles: AccountAdmin, BatchServiceAdmin, CompanyAdmin, CSPTester, SSTAdmin, TechnicalSupportAdmin. + * Swagger Name: AvaTaxClient + * * * @param {number} companyId The ID of the company that owns this items. - * @param {Models.ItemBulkUploadInputModel} model The items you wish to upload. - * @return {Models.ItemBulkUploadOutputModel} - */ - - bulkUploadItems({ companyId, model }: { companyId: number, model: Models.ItemBulkUploadInputModel }): Promise { - var path = this.buildUrl({ - url: `/api/v2/companies/${companyId}/items/upload`, - parameters: {} - }); - var strClientId = - this.appNM + - '; ' + - this.appVer + - '; JavascriptSdk; ' + this.apiVersion + '; ' + - this.machineNM; + * @param {Models.ItemBulkUploadInputModel} model The items you wish to upload. + * @return {Models.ItemBulkUploadOutputModel} + */ + + bulkUploadItems({ companyId, model }: { companyId: number, model: Models.ItemBulkUploadInputModel }): Promise { + var path = this.buildUrl({ + url: `/api/v2/companies/${companyId}/items/upload`, + parameters: {} + }); + var strClientId = + this.appNM + + '; ' + + this.appVer + + '; JavascriptSdk; ' + this.apiVersion + '; ' + + this.machineNM; return this.restCall({ url: path, verb: 'post', payload: model, clientId: strClientId }, Models.ItemBulkUploadOutputModel); - } - - /** - * Add classifications to an item. + } + + /** + * 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. @@ -8117,32 +8338,32 @@ export default class AvaTaxClient { * * ### Security Policies * - * * This API requires one of the following user roles: AccountAdmin, BatchServiceAdmin, CompanyAdmin, CSPTester, SSTAdmin, TechnicalSupportAdmin. - * Swagger Name: AvaTaxClient - * + * * This API requires one of the following user roles: AccountAdmin, BatchServiceAdmin, CompanyAdmin, CSPTester, SSTAdmin, TechnicalSupportAdmin. + * Swagger Name: AvaTaxClient + * * * @param {number} companyId The company id. * @param {number} itemId The item id. - * @param {Models.ItemClassificationInputModel[]} model The item classifications you wish to create. - * @return {Models.ItemClassificationOutputModel[]} - */ - - createItemClassifications({ companyId, itemId, model }: { companyId: number, itemId: number, model: Models.ItemClassificationInputModel[] }): Promise> { - var path = this.buildUrl({ - url: `/api/v2/companies/${companyId}/items/${itemId}/classifications`, - parameters: {} - }); - var strClientId = - this.appNM + - '; ' + - this.appVer + - '; JavascriptSdk; ' + this.apiVersion + '; ' + - this.machineNM; + * @param {Models.ItemClassificationInputModel[]} model The item classifications you wish to create. + * @return {Models.ItemClassificationOutputModel[]} + */ + + createItemClassifications({ companyId, itemId, model }: { companyId: number, itemId: number, model: Models.ItemClassificationInputModel[] }): Promise> { + var path = this.buildUrl({ + url: `/api/v2/companies/${companyId}/items/${itemId}/classifications`, + parameters: {} + }); + var strClientId = + this.appNM + + '; ' + + this.appVer + + '; JavascriptSdk; ' + this.apiVersion + '; ' + + this.machineNM; return this.restCall({ url: path, verb: 'post', payload: model, clientId: strClientId }, Array); - } - - /** - * Add parameters to an item. + } + + /** + * 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". @@ -8157,32 +8378,32 @@ export default class AvaTaxClient { * * ### Security Policies * - * * This API requires one of the following user roles: AccountAdmin, BatchServiceAdmin, CompanyAdmin, CSPTester, SSTAdmin, TechnicalSupportAdmin. - * Swagger Name: AvaTaxClient - * + * * This API requires one of the following user roles: AccountAdmin, BatchServiceAdmin, CompanyAdmin, CSPTester, SSTAdmin, TechnicalSupportAdmin. + * Swagger Name: AvaTaxClient + * * * @param {number} companyId The ID of the company that owns this item parameter. * @param {number} itemId The item id. - * @param {Models.ItemParameterModel[]} model The item parameters you wish to create. - * @return {Models.ItemParameterModel[]} - */ - - createItemParameters({ companyId, itemId, model }: { companyId: number, itemId: number, model: Models.ItemParameterModel[] }): Promise> { - var path = this.buildUrl({ - url: `/api/v2/companies/${companyId}/items/${itemId}/parameters`, - parameters: {} - }); - var strClientId = - this.appNM + - '; ' + - this.appVer + - '; JavascriptSdk; ' + this.apiVersion + '; ' + - this.machineNM; + * @param {Models.ItemParameterModel[]} model The item parameters you wish to create. + * @return {Models.ItemParameterModel[]} + */ + + createItemParameters({ companyId, itemId, model }: { companyId: number, itemId: number, model: Models.ItemParameterModel[] }): Promise> { + var path = this.buildUrl({ + url: `/api/v2/companies/${companyId}/items/${itemId}/parameters`, + parameters: {} + }); + var strClientId = + this.appNM + + '; ' + + this.appVer + + '; JavascriptSdk; ' + this.apiVersion + '; ' + + this.machineNM; return this.restCall({ url: path, verb: 'post', payload: model, clientId: strClientId }, Array); - } - - /** - * Create a new item + } + + /** + * 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 @@ -8195,66 +8416,66 @@ export default class AvaTaxClient { * * ### Security Policies * - * * This API requires one of the following user roles: AccountAdmin, BatchServiceAdmin, CompanyAdmin, CSPTester, SSTAdmin, TechnicalSupportAdmin. - * Swagger Name: AvaTaxClient - * + * * This API requires one of the following user roles: AccountAdmin, BatchServiceAdmin, CompanyAdmin, CSPTester, SSTAdmin, TechnicalSupportAdmin. + * Swagger Name: AvaTaxClient + * * * @param {number} companyId The ID of the company that owns this item. * @param {boolean} processRecommendationsSynchronously If true then Indix api will be called synchronously to get tax code recommendations. - * @param {Models.ItemModel[]} model The item you wish to create. - * @return {Models.ItemModel[]} - */ - - createItems({ companyId, processRecommendationsSynchronously, model }: { companyId: number, processRecommendationsSynchronously?: boolean, model: Models.ItemModel[] }): Promise> { - var path = this.buildUrl({ - url: `/api/v2/companies/${companyId}/items`, + * @param {Models.ItemModel[]} model The item you wish to create. + * @return {Models.ItemModel[]} + */ + + createItems({ companyId, processRecommendationsSynchronously, model }: { companyId: number, processRecommendationsSynchronously?: boolean, model: Models.ItemModel[] }): Promise> { + var path = this.buildUrl({ + url: `/api/v2/companies/${companyId}/items`, parameters: { processRecommendationsSynchronously: processRecommendationsSynchronously } - }); - var strClientId = - this.appNM + - '; ' + - this.appVer + - '; JavascriptSdk; ' + this.apiVersion + '; ' + - this.machineNM; + }); + var strClientId = + this.appNM + + '; ' + + this.appVer + + '; JavascriptSdk; ' + this.apiVersion + '; ' + + this.machineNM; return this.restCall({ url: path, verb: 'post', payload: model, clientId: strClientId }, Array); - } - - /** - * Create tags for a item + } + + /** + * 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, BatchServiceAdmin, CompanyAdmin, CSPTester, SSTAdmin, TechnicalSupportAdmin. - * Swagger Name: AvaTaxClient - * + * * This API requires one of the following user roles: AccountAdmin, BatchServiceAdmin, CompanyAdmin, CSPTester, SSTAdmin, TechnicalSupportAdmin. + * Swagger Name: AvaTaxClient + * * * @param {number} companyId The ID of the company that defined these items * @param {number} itemId The ID of the item as defined by the company that owns this tag. - * @param {Models.ItemTagDetailInputModel[]} model Tags you wish to associate with the Item - * @return {Models.ItemTagDetailOutputModel[]} - */ - - createItemTags({ companyId, itemId, model }: { companyId: number, itemId: number, model: Models.ItemTagDetailInputModel[] }): Promise> { - var path = this.buildUrl({ - url: `/api/v2/companies/${companyId}/items/${itemId}/tags`, - parameters: {} - }); - var strClientId = - this.appNM + - '; ' + - this.appVer + - '; JavascriptSdk; ' + this.apiVersion + '; ' + - this.machineNM; + * @param {Models.ItemTagDetailInputModel[]} model Tags you wish to associate with the Item + * @return {Models.ItemTagDetailOutputModel[]} + */ + + createItemTags({ companyId, itemId, model }: { companyId: number, itemId: number, model: Models.ItemTagDetailInputModel[] }): Promise> { + var path = this.buildUrl({ + url: `/api/v2/companies/${companyId}/items/${itemId}/tags`, + parameters: {} + }); + var strClientId = + this.appNM + + '; ' + + this.appVer + + '; JavascriptSdk; ' + this.apiVersion + '; ' + + this.machineNM; return this.restCall({ url: path, verb: 'post', payload: model, clientId: strClientId }, Array); - } - - /** - * Create a new tax code classification request + } + + /** + * Create a new tax code classification request * Creates a new tax code classification request. * * Avalara AvaTax system tax codes represent various goods and services classified by industry or consumer categories and @@ -8263,31 +8484,31 @@ export default class AvaTaxClient { * * ### Security Policies * - * * This API requires one of the following user roles: AccountAdmin, BatchServiceAdmin, CompanyAdmin, CSPTester, SSTAdmin, TechnicalSupportAdmin. - * Swagger Name: AvaTaxClient - * + * * This API requires one of the following user roles: AccountAdmin, BatchServiceAdmin, CompanyAdmin, CSPTester, SSTAdmin, TechnicalSupportAdmin. + * Swagger Name: AvaTaxClient + * * * @param {number} companyId The ID of the company that creates this request. - * @param {Models.ItemTaxCodeClassificationRequestInputModel} model The request you wish to create. - * @return {Models.ItemTaxCodeClassificationRequestOutputModel} - */ - - createTaxCodeClassificationRequest({ companyId, model }: { companyId: number, model?: Models.ItemTaxCodeClassificationRequestInputModel }): Promise { - var path = this.buildUrl({ - url: `/api/v2/companies/${companyId}/classificationrequests/taxcode`, - parameters: {} - }); - var strClientId = - this.appNM + - '; ' + - this.appVer + - '; JavascriptSdk; ' + this.apiVersion + '; ' + - this.machineNM; + * @param {Models.ItemTaxCodeClassificationRequestInputModel} model The request you wish to create. + * @return {Models.ItemTaxCodeClassificationRequestOutputModel} + */ + + createTaxCodeClassificationRequest({ companyId, model }: { companyId: number, model?: Models.ItemTaxCodeClassificationRequestInputModel }): Promise { + var path = this.buildUrl({ + url: `/api/v2/companies/${companyId}/classificationrequests/taxcode`, + parameters: {} + }); + var strClientId = + this.appNM + + '; ' + + this.appVer + + '; JavascriptSdk; ' + this.apiVersion + '; ' + + this.machineNM; return this.restCall({ url: path, verb: 'post', payload: model, clientId: strClientId }, Models.ItemTaxCodeClassificationRequestOutputModel); - } - - /** - * Delete a single item + } + + /** + * 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. @@ -8306,31 +8527,31 @@ export default class AvaTaxClient { * * ### Security Policies * - * * This API requires one of the following user roles: AccountAdmin, BatchServiceAdmin, CompanyAdmin, CSPTester, SSTAdmin, TechnicalSupportAdmin. - * Swagger Name: AvaTaxClient - * + * * This API requires one of the following user roles: AccountAdmin, BatchServiceAdmin, CompanyAdmin, CSPTester, SSTAdmin, TechnicalSupportAdmin. + * Swagger Name: AvaTaxClient + * * * @param {number} companyId The ID of the company that owns this item. - * @param {string} itemCode The code of the item you want to delete. - * @return {Models.ObjectDeletedErrorModel[]} - */ - - deleteCatalogueItem({ companyId, itemCode }: { companyId: number, itemCode: string }): Promise> { - var path = this.buildUrl({ - url: `/api/v2/companies/${companyId}/itemcatalogue/${itemCode}`, - parameters: {} - }); - var strClientId = - this.appNM + - '; ' + - this.appVer + - '; JavascriptSdk; ' + this.apiVersion + '; ' + - this.machineNM; + * @param {string} itemCode The code of the item you want to delete. + * @return {Models.ObjectDeletedErrorModel[]} + */ + + deleteCatalogueItem({ companyId, itemCode }: { companyId: number, itemCode: string }): Promise> { + var path = this.buildUrl({ + url: `/api/v2/companies/${companyId}/itemcatalogue/${itemCode}`, + parameters: {} + }); + var strClientId = + this.appNM + + '; ' + + this.appVer + + '; JavascriptSdk; ' + this.apiVersion + '; ' + + this.machineNM; return this.restCall({ url: path, verb: 'delete', payload: null, clientId: strClientId }, Array); - } - - /** - * Delete a single item + } + + /** + * 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 @@ -8343,31 +8564,31 @@ export default class AvaTaxClient { * * ### Security Policies * - * * This API requires one of the following user roles: AccountAdmin, BatchServiceAdmin, CompanyAdmin, CSPTester, SSTAdmin, TechnicalSupportAdmin. - * Swagger Name: AvaTaxClient - * + * * This API requires one of the following user roles: AccountAdmin, BatchServiceAdmin, CompanyAdmin, CSPTester, SSTAdmin, TechnicalSupportAdmin. + * Swagger Name: AvaTaxClient + * * * @param {number} companyId The ID of the company that owns this item. - * @param {number} id The ID of the item you wish to delete. - * @return {Models.ObjectDeletedErrorModel[]} - */ - - deleteItem({ companyId, id }: { companyId: number, id: number }): Promise> { - var path = this.buildUrl({ - url: `/api/v2/companies/${companyId}/items/${id}`, - parameters: {} - }); - var strClientId = - this.appNM + - '; ' + - this.appVer + - '; JavascriptSdk; ' + this.apiVersion + '; ' + - this.machineNM; + * @param {number} id The ID of the item you wish to delete. + * @return {Models.ObjectDeletedErrorModel[]} + */ + + deleteItem({ companyId, id }: { companyId: number, id: number }): Promise> { + var path = this.buildUrl({ + url: `/api/v2/companies/${companyId}/items/${id}`, + parameters: {} + }); + var strClientId = + this.appNM + + '; ' + + this.appVer + + '; JavascriptSdk; ' + this.apiVersion + '; ' + + this.machineNM; return this.restCall({ url: path, verb: 'delete', payload: null, clientId: strClientId }, Array); - } - - /** - * Delete a single item classification. + } + + /** + * 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. @@ -8376,32 +8597,32 @@ export default class AvaTaxClient { * * ### Security Policies * - * * This API requires one of the following user roles: AccountAdmin, BatchServiceAdmin, CompanyAdmin, CSPTester, SSTAdmin, TechnicalSupportAdmin. - * Swagger Name: AvaTaxClient - * + * * This API requires one of the following user roles: AccountAdmin, BatchServiceAdmin, CompanyAdmin, CSPTester, SSTAdmin, TechnicalSupportAdmin. + * Swagger Name: AvaTaxClient + * * * @param {number} companyId The company id. * @param {number} itemId The item id. - * @param {number} id The item classification id. - * @return {Models.ObjectDeletedErrorModel[]} - */ - - deleteItemClassification({ companyId, itemId, id }: { companyId: number, itemId: number, id: number }): Promise> { - var path = this.buildUrl({ - url: `/api/v2/companies/${companyId}/items/${itemId}/classifications/${id}`, - parameters: {} - }); - var strClientId = - this.appNM + - '; ' + - this.appVer + - '; JavascriptSdk; ' + this.apiVersion + '; ' + - this.machineNM; + * @param {number} id The item classification id. + * @return {Models.ObjectDeletedErrorModel[]} + */ + + deleteItemClassification({ companyId, itemId, id }: { companyId: number, itemId: number, id: number }): Promise> { + var path = this.buildUrl({ + url: `/api/v2/companies/${companyId}/items/${itemId}/classifications/${id}`, + parameters: {} + }); + var strClientId = + this.appNM + + '; ' + + this.appVer + + '; JavascriptSdk; ' + this.apiVersion + '; ' + + this.machineNM; return this.restCall({ url: path, verb: 'delete', payload: null, clientId: strClientId }, Array); - } - - /** - * Delete a single item parameter + } + + /** + * 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". @@ -8412,95 +8633,95 @@ export default class AvaTaxClient { * * ### Security Policies * - * * This API requires one of the following user roles: AccountAdmin, BatchServiceAdmin, CompanyAdmin, CSPTester, SSTAdmin, TechnicalSupportAdmin. - * Swagger Name: AvaTaxClient - * + * * This API requires one of the following user roles: AccountAdmin, BatchServiceAdmin, CompanyAdmin, CSPTester, SSTAdmin, TechnicalSupportAdmin. + * Swagger Name: AvaTaxClient + * * * @param {number} companyId The company id * @param {number} itemId The item id - * @param {number} id The parameter id - * @return {Models.ObjectDeletedErrorModel[]} - */ - - deleteItemParameter({ companyId, itemId, id }: { companyId: number, itemId: number, id: number }): Promise> { - var path = this.buildUrl({ - url: `/api/v2/companies/${companyId}/items/${itemId}/parameters/${id}`, - parameters: {} - }); - var strClientId = - this.appNM + - '; ' + - this.appVer + - '; JavascriptSdk; ' + this.apiVersion + '; ' + - this.machineNM; + * @param {number} id The parameter id + * @return {Models.ObjectDeletedErrorModel[]} + */ + + deleteItemParameter({ companyId, itemId, id }: { companyId: number, itemId: number, id: number }): Promise> { + var path = this.buildUrl({ + url: `/api/v2/companies/${companyId}/items/${itemId}/parameters/${id}`, + parameters: {} + }); + var strClientId = + this.appNM + + '; ' + + this.appVer + + '; JavascriptSdk; ' + this.apiVersion + '; ' + + this.machineNM; return this.restCall({ url: path, verb: 'delete', payload: null, clientId: strClientId }, Array); - } - - /** - * Delete item tag by id + } + + /** + * 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, BatchServiceAdmin, CompanyAdmin, CSPTester, SSTAdmin, TechnicalSupportAdmin. - * Swagger Name: AvaTaxClient - * + * * This API requires one of the following user roles: AccountAdmin, BatchServiceAdmin, CompanyAdmin, CSPTester, SSTAdmin, TechnicalSupportAdmin. + * Swagger Name: AvaTaxClient + * * * @param {number} companyId The ID of the company that defined these items * @param {number} itemId The ID of the item as defined by the company that owns this tag. - * @param {number} itemTagDetailId The ID of the item tag detail you wish to delete. - * @return {Models.ObjectDeletedErrorModel[]} - */ - - deleteItemTag({ companyId, itemId, itemTagDetailId }: { companyId: number, itemId: number, itemTagDetailId: number }): Promise> { - var path = this.buildUrl({ - url: `/api/v2/companies/${companyId}/items/${itemId}/tags/${itemTagDetailId}`, - parameters: {} - }); - var strClientId = - this.appNM + - '; ' + - this.appVer + - '; JavascriptSdk; ' + this.apiVersion + '; ' + - this.machineNM; + * @param {number} itemTagDetailId The ID of the item tag detail you wish to delete. + * @return {Models.ObjectDeletedErrorModel[]} + */ + + deleteItemTag({ companyId, itemId, itemTagDetailId }: { companyId: number, itemId: number, itemTagDetailId: number }): Promise> { + var path = this.buildUrl({ + url: `/api/v2/companies/${companyId}/items/${itemId}/tags/${itemTagDetailId}`, + parameters: {} + }); + var strClientId = + this.appNM + + '; ' + + this.appVer + + '; JavascriptSdk; ' + this.apiVersion + '; ' + + this.machineNM; return this.restCall({ url: path, verb: 'delete', payload: null, clientId: strClientId }, Array); - } - - /** - * Delete all item tags + } + + /** + * 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, BatchServiceAdmin, CompanyAdmin, CSPTester, SSTAdmin, TechnicalSupportAdmin. - * Swagger Name: AvaTaxClient - * + * * This API requires one of the following user roles: AccountAdmin, BatchServiceAdmin, CompanyAdmin, CSPTester, SSTAdmin, TechnicalSupportAdmin. + * Swagger Name: AvaTaxClient + * * * @param {number} companyId The ID of the company that defined these items. - * @param {number} itemId The ID of the item as defined by the company that owns this tag. - * @return {Models.AssociatedObjectDeletedErrorDetailsModel[]} - */ - - deleteItemTags({ companyId, itemId }: { companyId: number, itemId: number }): Promise> { - var path = this.buildUrl({ - url: `/api/v2/companies/${companyId}/items/${itemId}/tags`, - parameters: {} - }); - var strClientId = - this.appNM + - '; ' + - this.appVer + - '; JavascriptSdk; ' + this.apiVersion + '; ' + - this.machineNM; + * @param {number} itemId The ID of the item as defined by the company that owns this tag. + * @return {Models.AssociatedObjectDeletedErrorDetailsModel[]} + */ + + deleteItemTags({ companyId, itemId }: { companyId: number, itemId: number }): Promise> { + var path = this.buildUrl({ + url: `/api/v2/companies/${companyId}/items/${itemId}/tags`, + parameters: {} + }); + var strClientId = + this.appNM + + '; ' + + this.appVer + + '; JavascriptSdk; ' + this.apiVersion + '; ' + + this.machineNM; return this.restCall({ url: path, verb: 'delete', payload: null, clientId: strClientId }, Array); - } - - /** - * Retrieve a single item + } + + /** + * 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 @@ -8511,34 +8732,34 @@ export default class AvaTaxClient { * * ### Security Policies * - * * This API requires one of the following user roles: AccountAdmin, AccountUser, BatchServiceAdmin, CompanyAdmin, CompanyUser, CSPAdmin, CSPTester, SiteAdmin, SSTAdmin, SystemAdmin, TechnicalSupportAdmin, TechnicalSupportUser. - * Swagger Name: AvaTaxClient - * + * * This API requires one of the following user roles: AccountAdmin, AccountUser, BatchServiceAdmin, CompanyAdmin, CompanyUser, CSPAdmin, CSPTester, SiteAdmin, SSTAdmin, SystemAdmin, TechnicalSupportAdmin, TechnicalSupportUser. + * Swagger Name: AvaTaxClient + * * * @param {number} companyId The ID of the company that owns this item object * @param {number} id The primary key of this item - * @param {string} include A comma separated list of additional data to retrieve. - * @return {Models.ItemModel} - */ - - getItem({ companyId, id, include }: { companyId: number, id: number, include?: string }): Promise { - var path = this.buildUrl({ - url: `/api/v2/companies/${companyId}/items/${id}`, + * @param {string} include A comma separated list of additional data to retrieve. + * @return {Models.ItemModel} + */ + + getItem({ companyId, id, include }: { companyId: number, id: number, include?: string }): Promise { + var path = this.buildUrl({ + url: `/api/v2/companies/${companyId}/items/${id}`, parameters: { $include: include } - }); - var strClientId = - this.appNM + - '; ' + - this.appVer + - '; JavascriptSdk; ' + this.apiVersion + '; ' + - this.machineNM; + }); + var strClientId = + this.appNM + + '; ' + + this.appVer + + '; JavascriptSdk; ' + this.apiVersion + '; ' + + this.machineNM; return this.restCall({ url: path, verb: 'get', payload: null, clientId: strClientId }, Models.ItemModel); - } - - /** - * Retrieve a single item classification. + } + + /** + * 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. @@ -8547,32 +8768,32 @@ export default class AvaTaxClient { * * ### Security Policies * - * * This API requires one of the following user roles: AccountAdmin, AccountUser, BatchServiceAdmin, CompanyAdmin, CompanyUser, CSPAdmin, CSPTester, SiteAdmin, SSTAdmin, SystemAdmin, TechnicalSupportAdmin, TechnicalSupportUser. - * Swagger Name: AvaTaxClient - * + * * This API requires one of the following user roles: AccountAdmin, AccountUser, BatchServiceAdmin, CompanyAdmin, CompanyUser, CSPAdmin, CSPTester, SiteAdmin, SSTAdmin, SystemAdmin, TechnicalSupportAdmin, TechnicalSupportUser. + * Swagger Name: AvaTaxClient + * * * @param {number} companyId The company id. * @param {number} itemId The item id. - * @param {number} id The item classification id. - * @return {Models.ItemClassificationOutputModel} - */ - - getItemClassification({ companyId, itemId, id }: { companyId: number, itemId: number, id: number }): Promise { - var path = this.buildUrl({ - url: `/api/v2/companies/${companyId}/items/${itemId}/classifications/${id}`, - parameters: {} - }); - var strClientId = - this.appNM + - '; ' + - this.appVer + - '; JavascriptSdk; ' + this.apiVersion + '; ' + - this.machineNM; + * @param {number} id The item classification id. + * @return {Models.ItemClassificationOutputModel} + */ + + getItemClassification({ companyId, itemId, id }: { companyId: number, itemId: number, id: number }): Promise { + var path = this.buildUrl({ + url: `/api/v2/companies/${companyId}/items/${itemId}/classifications/${id}`, + parameters: {} + }); + var strClientId = + this.appNM + + '; ' + + this.appVer + + '; JavascriptSdk; ' + this.apiVersion + '; ' + + this.machineNM; return this.restCall({ url: path, verb: 'get', payload: null, clientId: strClientId }, Models.ItemClassificationOutputModel); - } - - /** - * Retrieve a single item parameter + } + + /** + * 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". @@ -8583,99 +8804,99 @@ export default class AvaTaxClient { * * ### Security Policies * - * * This API requires one of the following user roles: AccountAdmin, AccountUser, BatchServiceAdmin, CompanyAdmin, CompanyUser, CSPAdmin, CSPTester, SiteAdmin, SSTAdmin, SystemAdmin, TechnicalSupportAdmin, TechnicalSupportUser. - * Swagger Name: AvaTaxClient - * + * * This API requires one of the following user roles: AccountAdmin, AccountUser, BatchServiceAdmin, CompanyAdmin, CompanyUser, CSPAdmin, CSPTester, SiteAdmin, SSTAdmin, SystemAdmin, TechnicalSupportAdmin, TechnicalSupportUser. + * Swagger Name: AvaTaxClient + * * * @param {number} companyId The company id * @param {number} itemId The item id - * @param {number} id The parameter id - * @return {Models.ItemParameterModel} - */ - - getItemParameter({ companyId, itemId, id }: { companyId: number, itemId: number, id: number }): Promise { - var path = this.buildUrl({ - url: `/api/v2/companies/${companyId}/items/${itemId}/parameters/${id}`, - parameters: {} - }); - var strClientId = - this.appNM + - '; ' + - this.appVer + - '; JavascriptSdk; ' + this.apiVersion + '; ' + - this.machineNM; + * @param {number} id The parameter id + * @return {Models.ItemParameterModel} + */ + + getItemParameter({ companyId, itemId, id }: { companyId: number, itemId: number, id: number }): Promise { + var path = this.buildUrl({ + url: `/api/v2/companies/${companyId}/items/${itemId}/parameters/${id}`, + parameters: {} + }); + var strClientId = + this.appNM + + '; ' + + this.appVer + + '; JavascriptSdk; ' + this.apiVersion + '; ' + + this.machineNM; return this.restCall({ url: path, verb: 'get', payload: null, clientId: strClientId }, Models.ItemParameterModel); - } - - /** - * Retrieve tags for an item + } + + /** + * 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, BatchServiceAdmin, CompanyAdmin, CompanyUser, CSPAdmin, CSPTester, SiteAdmin, SSTAdmin, SystemAdmin, TechnicalSupportAdmin, TechnicalSupportUser. - * Swagger Name: AvaTaxClient - * + * * This API requires one of the following user roles: AccountAdmin, AccountUser, BatchServiceAdmin, CompanyAdmin, CompanyUser, CSPAdmin, CSPTester, SiteAdmin, SSTAdmin, SystemAdmin, TechnicalSupportAdmin, TechnicalSupportUser. + * Swagger Name: AvaTaxClient + * * * @param {number} companyId The ID of the company that defined these items * @param {number} 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 {number} top If nonzero, return no more than this number of results. Used with `$skip` to provide pagination for large datasets. Unless otherwise specified, the maximum number of records that can be returned from an API call is 1,000 records. - * @param {number} skip If nonzero, skip this number of results before returning data. Used with `$top` to provide pagination for large datasets. - * @return {FetchResult} - */ - - getItemTags({ companyId, itemId, filter, top, skip }: { companyId: number, itemId: number, filter?: string, top?: number, skip?: number }): Promise> { - var path = this.buildUrl({ - url: `/api/v2/companies/${companyId}/items/${itemId}/tags`, + * @param {number} 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 }: { companyId: number, itemId: number, filter?: string, top?: number, skip?: number }): Promise> { + var path = this.buildUrl({ + url: `/api/v2/companies/${companyId}/items/${itemId}/tags`, parameters: { $filter: filter, $top: top, $skip: skip } - }); - var strClientId = - this.appNM + - '; ' + - this.appVer + - '; JavascriptSdk; ' + this.apiVersion + '; ' + - this.machineNM; + }); + var strClientId = + this.appNM + + '; ' + + this.appVer + + '; JavascriptSdk; ' + this.apiVersion + '; ' + + this.machineNM; return this.restCall({ url: path, verb: 'get', payload: null, clientId: strClientId }, FetchResult); - } - - /** - * Get Item TaxCode Recommendations + } + + /** + * Get Item TaxCode Recommendations * Provides at least three tax-code recommendations for the given company ID and item ID * * ### Security Policies * - * * This API requires one of the following user roles: AccountAdmin, AccountUser, BatchServiceAdmin, CompanyAdmin, CompanyUser, CSPAdmin, CSPTester, SiteAdmin, SSTAdmin, SystemAdmin, TechnicalSupportAdmin, TechnicalSupportUser. - * Swagger Name: AvaTaxClient - * + * * This API requires one of the following user roles: AccountAdmin, AccountUser, BatchServiceAdmin, CompanyAdmin, CompanyUser, CSPAdmin, CSPTester, SiteAdmin, SSTAdmin, SystemAdmin, TechnicalSupportAdmin, TechnicalSupportUser. + * Swagger Name: AvaTaxClient + * * * @param {number} companyId - * @param {number} itemId - * @return {Models.TaxCodeRecommendationOutputModel[]} - */ - - getItemTaxCodeRecommendations({ companyId, itemId }: { companyId: number, itemId: number }): Promise> { - var path = this.buildUrl({ - url: `/api/v2/companies/${companyId}/items/${itemId}/taxcoderecommendations`, - parameters: {} - }); - var strClientId = - this.appNM + - '; ' + - this.appVer + - '; JavascriptSdk; ' + this.apiVersion + '; ' + - this.machineNM; + * @param {number} itemId + * @return {Models.TaxCodeRecommendationOutputModel[]} + */ + + getItemTaxCodeRecommendations({ companyId, itemId }: { companyId: number, itemId: number }): Promise> { + var path = this.buildUrl({ + url: `/api/v2/companies/${companyId}/items/${itemId}/taxcoderecommendations`, + parameters: {} + }); + var strClientId = + this.appNM + + '; ' + + this.appVer + + '; JavascriptSdk; ' + this.apiVersion + '; ' + + this.machineNM; return this.restCall({ url: path, verb: 'get', payload: null, clientId: strClientId }, Array); - } - - /** - * Retrieve premium classification for a company's item based on its ItemCode and SystemCode. + } + + /** + * Retrieve premium classification for a company's item based on its ItemCode and SystemCode. * Retrieves the premium classification for an ItemCode and SystemCode. * * NOTE: If your item code contains any of these characters /, +, ?,",' ,% or #, please use the following encoding before making a request: @@ -8689,32 +8910,32 @@ export default class AvaTaxClient { * * ### Security Policies * - * * This API requires one of the following user roles: AccountAdmin, AccountUser, BatchServiceAdmin, CompanyAdmin, CompanyUser, CSPAdmin, CSPTester, SiteAdmin, SSTAdmin, SystemAdmin, TechnicalSupportAdmin, TechnicalSupportUser. - * Swagger Name: AvaTaxClient - * + * * This API requires one of the following user roles: AccountAdmin, AccountUser, BatchServiceAdmin, CompanyAdmin, CompanyUser, CSPAdmin, CSPTester, SiteAdmin, SSTAdmin, SystemAdmin, TechnicalSupportAdmin, TechnicalSupportUser. + * Swagger Name: AvaTaxClient + * * * @param {number} companyId The ID of the company that owns this item object * @param {string} itemCode The ItemCode of the item for which you want to retrieve premium classification - * @param {string} systemCode The SystemCode for which you want to retrieve premium classification - * @return {Models.ItemPremiumClassificationOutputModel} - */ - - getPremiumClassification({ companyId, itemCode, systemCode }: { companyId: number, itemCode: string, systemCode: string }): Promise { - var path = this.buildUrl({ - url: `/api/v2/companies/${companyId}/items/${itemCode}/premiumClassification/${systemCode}`, - parameters: {} - }); - var strClientId = - this.appNM + - '; ' + - this.appVer + - '; JavascriptSdk; ' + this.apiVersion + '; ' + - this.machineNM; + * @param {string} systemCode The SystemCode for which you want to retrieve premium classification + * @return {Models.ItemPremiumClassificationOutputModel} + */ + + getPremiumClassification({ companyId, itemCode, systemCode }: { companyId: number, itemCode: string, systemCode: string }): Promise { + var path = this.buildUrl({ + url: `/api/v2/companies/${companyId}/items/${itemCode}/premiumClassification/${systemCode}`, + parameters: {} + }); + var strClientId = + this.appNM + + '; ' + + this.appVer + + '; JavascriptSdk; ' + this.apiVersion + '; ' + + this.machineNM; return this.restCall({ url: path, verb: 'get', payload: null, clientId: strClientId }, Models.ItemPremiumClassificationOutputModel); - } - - /** - * Retrieve Restrictions for Item by CountryOfImport + } + + /** + * Retrieve Restrictions for Item by CountryOfImport * Retrieve Restrictions for Item by CountryOfImport. This API will only return import restriction for the countryOfImport. * * NOTE: If your item code contains any of these characters /, +, ? or a space, please use the following encoding before making a request: @@ -8728,39 +8949,39 @@ export default class AvaTaxClient { * * ### Security Policies * - * * This API requires one of the following user roles: AccountAdmin, AccountUser, BatchServiceAdmin, CompanyAdmin, CompanyUser, CSPAdmin, CSPTester, SiteAdmin, SSTAdmin, SystemAdmin, TechnicalSupportAdmin, TechnicalSupportUser. - * Swagger Name: AvaTaxClient - * + * * This API requires one of the following user roles: AccountAdmin, AccountUser, BatchServiceAdmin, CompanyAdmin, CompanyUser, CSPAdmin, CSPTester, SiteAdmin, SSTAdmin, SystemAdmin, TechnicalSupportAdmin, TechnicalSupportUser. + * Swagger Name: AvaTaxClient + * * * @param {number} companyId The ID of the company that owns this item object * @param {string} itemCode ItemCode for the item * @param {string} countryOfImport Country for which you want the restrictions for the Item. * @param {number} top If nonzero, return no more than this number of results. Used with `$skip` to provide pagination for large datasets. Unless otherwise specified, the maximum number of records that can be returned from an API call is 1,000 records. * @param {number} skip If nonzero, skip this number of results before returning data. Used with `$top` to provide pagination for large datasets. - * @param {string} orderBy A comma separated list of sort statements in the format `(fieldname) [ASC|DESC]`, for example `id ASC`. - * @return {FetchResult} - */ - - listImportRestrictions({ companyId, itemCode, countryOfImport, top, skip, orderBy }: { companyId: number, itemCode: string, countryOfImport: string, top?: number, skip?: number, orderBy?: string }): Promise> { - var path = this.buildUrl({ - url: `/api/v2/companies/${companyId}/items/${itemCode}/restrictions/import/${countryOfImport}`, + * @param {string} orderBy A comma separated list of sort statements in the format `(fieldname) [ASC|DESC]`, for example `id ASC`. + * @return {FetchResult} + */ + + listImportRestrictions({ companyId, itemCode, countryOfImport, top, skip, orderBy }: { companyId: number, itemCode: string, countryOfImport: string, top?: number, skip?: number, orderBy?: string }): Promise> { + var path = this.buildUrl({ + url: `/api/v2/companies/${companyId}/items/${itemCode}/restrictions/import/${countryOfImport}`, parameters: { $top: top, $skip: skip, $orderBy: orderBy } - }); - var strClientId = - this.appNM + - '; ' + - this.appVer + - '; JavascriptSdk; ' + this.apiVersion + '; ' + - this.machineNM; + }); + var strClientId = + this.appNM + + '; ' + + this.appVer + + '; JavascriptSdk; ' + this.apiVersion + '; ' + + this.machineNM; return this.restCall({ url: path, verb: 'get', payload: null, clientId: strClientId }, FetchResult); - } - - /** - * Retrieve classifications for an item. + } + + /** + * 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. @@ -8772,40 +8993,40 @@ export default class AvaTaxClient { * * ### Security Policies * - * * This API requires one of the following user roles: AccountAdmin, AccountUser, BatchServiceAdmin, CompanyAdmin, CompanyUser, CSPAdmin, CSPTester, SiteAdmin, SSTAdmin, SystemAdmin, TechnicalSupportAdmin, TechnicalSupportUser. - * Swagger Name: AvaTaxClient - * + * * This API requires one of the following user roles: AccountAdmin, AccountUser, BatchServiceAdmin, CompanyAdmin, CompanyUser, CSPAdmin, CSPTester, SiteAdmin, SSTAdmin, SystemAdmin, TechnicalSupportAdmin, TechnicalSupportUser. + * Swagger Name: AvaTaxClient + * * * @param {number} companyId The company id. * @param {number} itemId The item id. * @param {string} filter A filter statement to identify specific records to retrieve. For more information on filtering, see [Filtering in REST](http://developer.avalara.com/avatax/filtering-in-rest/).
*Not filterable:* productCode, systemCode, IsPremium * @param {number} top If nonzero, return no more than this number of results. Used with `$skip` to provide pagination for large datasets. Unless otherwise specified, the maximum number of records that can be returned from an API call is 1,000 records. * @param {number} skip If nonzero, skip this number of results before returning data. Used with `$top` to provide pagination for large datasets. - * @param {string} orderBy A comma separated list of sort statements in the format `(fieldname) [ASC|DESC]`, for example `id ASC`. - * @return {FetchResult} - */ - - listItemClassifications({ companyId, itemId, filter, top, skip, orderBy }: { companyId: number, itemId: number, filter?: string, top?: number, skip?: number, orderBy?: string }): Promise> { - 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 }: { companyId: number, itemId: number, filter?: string, top?: number, skip?: number, orderBy?: string }): Promise> { + var path = this.buildUrl({ + url: `/api/v2/companies/${companyId}/items/${itemId}/classifications`, parameters: { $filter: filter, $top: top, $skip: skip, $orderBy: orderBy } - }); - var strClientId = - this.appNM + - '; ' + - this.appVer + - '; JavascriptSdk; ' + this.apiVersion + '; ' + - this.machineNM; + }); + var strClientId = + this.appNM + + '; ' + + this.appVer + + '; JavascriptSdk; ' + this.apiVersion + '; ' + + this.machineNM; return this.restCall({ url: path, verb: 'get', payload: null, clientId: strClientId }, FetchResult); - } - - /** - * Retrieve parameters for an item + } + + /** + * 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". @@ -8819,40 +9040,40 @@ export default class AvaTaxClient { * * ### Security Policies * - * * This API requires one of the following user roles: AccountAdmin, AccountUser, BatchServiceAdmin, CompanyAdmin, CompanyUser, CSPAdmin, CSPTester, SiteAdmin, SSTAdmin, SystemAdmin, TechnicalSupportAdmin, TechnicalSupportUser. - * Swagger Name: AvaTaxClient - * + * * This API requires one of the following user roles: AccountAdmin, AccountUser, BatchServiceAdmin, CompanyAdmin, CompanyUser, CSPAdmin, CSPTester, SiteAdmin, SSTAdmin, SystemAdmin, TechnicalSupportAdmin, TechnicalSupportUser. + * Swagger Name: AvaTaxClient + * * * @param {number} companyId The company id * @param {number} itemId The item id * @param {string} filter A filter statement to identify specific records to retrieve. For more information on filtering, see [Filtering in REST](http://developer.avalara.com/avatax/filtering-in-rest/).
*Not filterable:* name, unit, isNeededForCalculation, isNeededForReturns, isNeededForClassification * @param {number} top If nonzero, return no more than this number of results. Used with `$skip` to provide pagination for large datasets. Unless otherwise specified, the maximum number of records that can be returned from an API call is 1,000 records. * @param {number} skip If nonzero, skip this number of results before returning data. Used with `$top` to provide pagination for large datasets. - * @param {string} orderBy A comma separated list of sort statements in the format `(fieldname) [ASC|DESC]`, for example `id ASC`. - * @return {FetchResult} - */ - - listItemParameters({ companyId, itemId, filter, top, skip, orderBy }: { companyId: number, itemId: number, filter?: string, top?: number, skip?: number, orderBy?: string }): Promise> { - 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 }: { companyId: number, itemId: number, filter?: string, top?: number, skip?: number, orderBy?: string }): Promise> { + var path = this.buildUrl({ + url: `/api/v2/companies/${companyId}/items/${itemId}/parameters`, parameters: { $filter: filter, $top: top, $skip: skip, $orderBy: orderBy } - }); - var strClientId = - this.appNM + - '; ' + - this.appVer + - '; JavascriptSdk; ' + this.apiVersion + '; ' + - this.machineNM; + }); + var strClientId = + this.appNM + + '; ' + + this.appVer + + '; JavascriptSdk; ' + this.apiVersion + '; ' + + this.machineNM; return this.restCall({ url: path, verb: 'get', payload: null, clientId: strClientId }, FetchResult); - } - - /** - * Retrieve items for this company + } + + /** + * 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 @@ -8881,9 +9102,9 @@ export default class AvaTaxClient { * * ### Security Policies * - * * This API requires one of the following user roles: AccountAdmin, AccountUser, BatchServiceAdmin, CompanyAdmin, CompanyUser, CSPAdmin, CSPTester, SiteAdmin, SSTAdmin, SystemAdmin, TechnicalSupportAdmin, TechnicalSupportUser. - * Swagger Name: AvaTaxClient - * + * * This API requires one of the following user roles: AccountAdmin, AccountUser, BatchServiceAdmin, CompanyAdmin, CompanyUser, CSPAdmin, CSPTester, SiteAdmin, SSTAdmin, SystemAdmin, TechnicalSupportAdmin, TechnicalSupportUser. + * Swagger Name: AvaTaxClient + * * * @param {number} companyId The ID of the company that defined these items * @param {string} filter A filter statement to identify specific records to retrieve. For more information on filtering, see [Filtering in REST](http://developer.avalara.com/avatax/filtering-in-rest/).
*Not filterable:* taxCode, source, sourceEntityId, itemType, upc, summary, classifications, parameters, tags, properties, itemStatus, taxCodeRecommendationStatus, taxCodeRecommendations @@ -8893,13 +9114,13 @@ export default class AvaTaxClient { * @param {string} orderBy A comma separated list of sort statements in the format `(fieldname) [ASC|DESC]`, for example `id ASC`. * @param {string} tagName Tag Name on the basis of which you want to filter Items * @param {string} itemStatus A comma separated list of item status on the basis of which you want to filter Items - * @param {string} taxCodeRecommendationStatus Tax code recommendation status on the basis of which you want to filter Items - * @return {FetchResult} - */ - - listItemsByCompany({ companyId, filter, include, top, skip, orderBy, tagName, itemStatus, taxCodeRecommendationStatus }: { companyId: number, filter?: string, include?: string, top?: number, skip?: number, orderBy?: string, tagName?: string, itemStatus?: string, taxCodeRecommendationStatus?: string }): Promise> { - var path = this.buildUrl({ - url: `/api/v2/companies/${companyId}/items`, + * @param {string} taxCodeRecommendationStatus Tax code recommendation status on the basis of which you want to filter Items + * @return {FetchResult} + */ + + listItemsByCompany({ companyId, filter, include, top, skip, orderBy, tagName, itemStatus, taxCodeRecommendationStatus }: { companyId: number, filter?: string, include?: string, top?: number, skip?: number, orderBy?: string, tagName?: string, itemStatus?: string, taxCodeRecommendationStatus?: string }): Promise> { + var path = this.buildUrl({ + url: `/api/v2/companies/${companyId}/items`, parameters: { $filter: filter, $include: include, @@ -8910,18 +9131,58 @@ export default class AvaTaxClient { itemStatus: itemStatus, taxCodeRecommendationStatus: taxCodeRecommendationStatus } - }); - var strClientId = - this.appNM + - '; ' + - this.appVer + - '; JavascriptSdk; ' + this.apiVersion + '; ' + - this.machineNM; + }); + var strClientId = + this.appNM + + '; ' + + this.appVer + + '; JavascriptSdk; ' + this.apiVersion + '; ' + + this.machineNM; return this.restCall({ url: path, verb: 'get', payload: null, clientId: strClientId }, FetchResult); - } - - /** - * Retrieve all items + } + + /** + * Retrieve the parameters by companyId and itemId. + * 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. + * + * ### Security Policies + * + * * This API requires one of the following user roles: AccountAdmin, AccountUser, BatchServiceAdmin, CompanyAdmin, CompanyUser, CSPAdmin, CSPTester, SiteAdmin, SSTAdmin, SystemAdmin, TechnicalSupportAdmin, TechnicalSupportUser. + * Swagger Name: AvaTaxClient + * + * + * @param {number} companyId Company Identifier. + * @param {number} itemId Item Identifier. + * @param {string} filter A filter statement to identify specific records to retrieve. For more information on filtering, see [Filtering in REST](http://developer.avalara.com/avatax/filtering-in-rest/).
*Not filterable:* serviceTypes, regularExpression, attributeSubType, values + * @param {number} top If nonzero, return no more than this number of results. Used with `$skip` to provide pagination for large datasets. Unless otherwise specified, the maximum number of records that can be returned from an API call is 1,000 records. + * @param {number} skip If nonzero, skip this number of results before returning data. Used with `$top` to provide pagination for large datasets. + * @param {string} orderBy A comma separated list of sort statements in the format `(fieldname) [ASC|DESC]`, for example `id ASC`. + * @return {FetchResult} + */ + + listRecommendedParameterByCompanyIdAndItemId({ companyId, itemId, filter, top, skip, orderBy }: { companyId: number, itemId: number, filter?: string, top?: number, skip?: number, orderBy?: string }): Promise> { + var path = this.buildUrl({ + url: `/api/v2/definitions/companies/${companyId}/items/${itemId}/parameters`, + parameters: { + $filter: filter, + $top: top, + $skip: skip, + $orderBy: orderBy + } + }); + var strClientId = + this.appNM + + '; ' + + this.appVer + + '; JavascriptSdk; ' + this.apiVersion + '; ' + + this.machineNM; + return this.restCall({ url: path, verb: 'get', payload: null, clientId: strClientId }, FetchResult); + } + + /** + * Retrieve 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 @@ -8936,21 +9197,21 @@ export default class AvaTaxClient { * * ### Security Policies * - * * This API requires one of the following user roles: AccountAdmin, AccountUser, BatchServiceAdmin, CompanyAdmin, CompanyUser, CSPAdmin, CSPTester, SiteAdmin, SSTAdmin, SystemAdmin, TechnicalSupportAdmin, TechnicalSupportUser. - * Swagger Name: AvaTaxClient - * + * * This API requires one of the following user roles: AccountAdmin, AccountUser, BatchServiceAdmin, CompanyAdmin, CompanyUser, CSPAdmin, CSPTester, SiteAdmin, SSTAdmin, SystemAdmin, TechnicalSupportAdmin, TechnicalSupportUser. + * Swagger Name: AvaTaxClient + * * * @param {string} filter A filter statement to identify specific records to retrieve. For more information on filtering, see [Filtering in REST](http://developer.avalara.com/avatax/filtering-in-rest/).
*Not filterable:* taxCode, source, sourceEntityId, itemType, upc, summary, classifications, parameters, tags, properties, itemStatus, taxCodeRecommendationStatus, taxCodeRecommendations * @param {string} include A comma separated list of additional data to retrieve. * @param {number} top If nonzero, return no more than this number of results. Used with `$skip` to provide pagination for large datasets. Unless otherwise specified, the maximum number of records that can be returned from an API call is 1,000 records. * @param {number} skip If nonzero, skip this number of results before returning data. Used with `$top` to provide pagination for large datasets. - * @param {string} orderBy A comma separated list of sort statements in the format `(fieldname) [ASC|DESC]`, for example `id ASC`. - * @return {FetchResult} - */ - - queryItems({ filter, include, top, skip, orderBy }: { filter?: string, include?: string, top?: number, skip?: number, orderBy?: string }): Promise> { - 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 }: { filter?: string, include?: string, top?: number, skip?: number, orderBy?: string }): Promise> { + var path = this.buildUrl({ + url: `/api/v2/items`, parameters: { $filter: filter, $include: include, @@ -8958,18 +9219,18 @@ export default class AvaTaxClient { $skip: skip, $orderBy: orderBy } - }); - var strClientId = - this.appNM + - '; ' + - this.appVer + - '; JavascriptSdk; ' + this.apiVersion + '; ' + - this.machineNM; + }); + var strClientId = + this.appNM + + '; ' + + this.appVer + + '; JavascriptSdk; ' + this.apiVersion + '; ' + + this.machineNM; return this.restCall({ url: path, verb: 'get', payload: null, clientId: strClientId }, FetchResult); - } - - /** - * Retrieve items for this company based on System Code and filter criteria(optional) provided + } + + /** + * Retrieve items for this company based on System Code and filter criteria(optional) provided * Retrieve items based on System Code * * Items are a way of separating your tax calculation process from your tax configuration details. If you choose, you @@ -8984,39 +9245,39 @@ export default class AvaTaxClient { * * ### Security Policies * - * * This API requires one of the following user roles: AccountAdmin, AccountUser, BatchServiceAdmin, CompanyAdmin, CompanyUser, CSPAdmin, CSPTester, SiteAdmin, SSTAdmin, SystemAdmin, TechnicalSupportAdmin, TechnicalSupportUser. - * Swagger Name: AvaTaxClient - * + * * This API requires one of the following user roles: AccountAdmin, AccountUser, BatchServiceAdmin, CompanyAdmin, CompanyUser, CSPAdmin, CSPTester, SiteAdmin, SSTAdmin, SystemAdmin, TechnicalSupportAdmin, TechnicalSupportUser. + * Swagger Name: AvaTaxClient + * * * @param {number} companyId The ID of the company that defined these items * @param {string} systemCode System code on the basis of which you want to filter Items * @param {number} top If nonzero, return no more than this number of results. Used with `$skip` to provide pagination for large datasets. Unless otherwise specified, the maximum number of records that can be returned from an API call is 1,000 records. * @param {number} skip If nonzero, skip this number of results before returning data. Used with `$top` to provide pagination for large datasets. * @param {string} orderBy A comma separated list of sort statements in the format `(fieldname) [ASC|DESC]`, for example `id ASC`. - * @param {Models.FilterModel} model A filter statement to select specific records, as defined by https://github.com/Microsoft/api-guidelines/blob/master/Guidelines.md#97-filtering . - * @return {FetchResult} - */ - - queryItemsBySystemCode({ companyId, systemCode, top, skip, orderBy, model }: { companyId: number, systemCode: string, top?: number, skip?: number, orderBy?: string, model?: Models.FilterModel }): Promise> { - var path = this.buildUrl({ - url: `/api/v2/companies/${companyId}/items/internal/bySystemCode/${systemCode}`, + * @param {Models.FilterModel} model A filter statement to select specific records, as defined by https://github.com/Microsoft/api-guidelines/blob/master/Guidelines.md#97-filtering . + * @return {FetchResult} + */ + + queryItemsBySystemCode({ companyId, systemCode, top, skip, orderBy, model }: { companyId: number, systemCode: string, top?: number, skip?: number, orderBy?: string, model?: Models.FilterModel }): Promise> { + var path = this.buildUrl({ + url: `/api/v2/companies/${companyId}/items/internal/bySystemCode/${systemCode}`, parameters: { $top: top, $skip: skip, $orderBy: orderBy } - }); - var strClientId = - this.appNM + - '; ' + - this.appVer + - '; JavascriptSdk; ' + this.apiVersion + '; ' + - this.machineNM; + }); + var strClientId = + this.appNM + + '; ' + + this.appVer + + '; JavascriptSdk; ' + this.apiVersion + '; ' + + this.machineNM; return this.restCall({ url: path, verb: 'post', payload: model, clientId: strClientId }, FetchResult); - } - - /** - * Retrieve all items associated with given tag + } + + /** + * 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 @@ -9031,9 +9292,9 @@ export default class AvaTaxClient { * * ### Security Policies * - * * This API requires one of the following user roles: AccountAdmin, AccountUser, BatchServiceAdmin, CompanyAdmin, CompanyUser, CSPAdmin, CSPTester, SiteAdmin, SSTAdmin, SystemAdmin, TechnicalSupportAdmin, TechnicalSupportUser. - * Swagger Name: AvaTaxClient - * + * * This API requires one of the following user roles: AccountAdmin, AccountUser, BatchServiceAdmin, CompanyAdmin, CompanyUser, CSPAdmin, CSPTester, SiteAdmin, SSTAdmin, SystemAdmin, TechnicalSupportAdmin, TechnicalSupportUser. + * Swagger Name: AvaTaxClient + * * * @param {number} companyId The ID of the company that defined these items. * @param {string} tag The master tag to be associated with item. @@ -9041,13 +9302,13 @@ export default class AvaTaxClient { * @param {string} include A comma separated list of additional data to retrieve. * @param {number} top If nonzero, return no more than this number of results. Used with `$skip` to provide pagination for large datasets. Unless otherwise specified, the maximum number of records that can be returned from an API call is 1,000 records. * @param {number} skip If nonzero, skip this number of results before returning data. Used with `$top` to provide pagination for large datasets. - * @param {string} orderBy A comma separated list of sort statements in the format `(fieldname) [ASC|DESC]`, for example `id ASC`. - * @return {FetchResult} - */ - - queryItemsByTag({ companyId, tag, filter, include, top, skip, orderBy }: { companyId: number, tag: string, filter?: string, include?: string, top?: number, skip?: number, orderBy?: string }): Promise> { - 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 }: { companyId: number, tag: string, filter?: string, include?: string, top?: number, skip?: number, orderBy?: string }): Promise> { + var path = this.buildUrl({ + url: `/api/v2/companies/${companyId}/items/bytags/${tag}`, parameters: { $filter: filter, $include: include, @@ -9055,18 +9316,18 @@ export default class AvaTaxClient { $skip: skip, $orderBy: orderBy } - }); - var strClientId = - this.appNM + - '; ' + - this.appVer + - '; JavascriptSdk; ' + this.apiVersion + '; ' + - this.machineNM; + }); + var strClientId = + this.appNM + + '; ' + + this.appVer + + '; JavascriptSdk; ' + this.apiVersion + '; ' + + this.machineNM; return this.restCall({ url: path, verb: 'get', payload: null, clientId: strClientId }, FetchResult); - } - - /** - * Create or update items from a product catalog. + } + + /** + * Create or update items from a product catalog. * Creates/updates one or more item objects with additional properties and the AvaTax category attached to this company. * * Items are a way of separating your tax calculation process from your tax configuration details. Use this endpoint to create @@ -9077,31 +9338,31 @@ export default class AvaTaxClient { * * ### Security Policies * - * * This API requires one of the following user roles: AccountAdmin, BatchServiceAdmin, CompanyAdmin, CSPTester, SSTAdmin, TechnicalSupportAdmin. - * Swagger Name: AvaTaxClient - * + * * This API requires one of the following user roles: AccountAdmin, BatchServiceAdmin, CompanyAdmin, CSPTester, SSTAdmin, TechnicalSupportAdmin. + * Swagger Name: AvaTaxClient + * * * @param {number} companyId The ID of the company that owns this item. - * @param {Models.ItemCatalogueInputModel[]} model The items you want to create or update. - * @return {Models.ItemCatalogueOutputModel} - */ - - syncItemCatalogue({ companyId, model }: { companyId: number, model: Models.ItemCatalogueInputModel[] }): Promise { - var path = this.buildUrl({ - url: `/api/v2/companies/${companyId}/itemcatalogue`, - parameters: {} - }); - var strClientId = - this.appNM + - '; ' + - this.appVer + - '; JavascriptSdk; ' + this.apiVersion + '; ' + - this.machineNM; + * @param {Models.ItemCatalogueInputModel[]} model The items you want to create or update. + * @return {Models.ItemCatalogueOutputModel} + */ + + syncItemCatalogue({ companyId, model }: { companyId: number, model: Models.ItemCatalogueInputModel[] }): Promise { + var path = this.buildUrl({ + url: `/api/v2/companies/${companyId}/itemcatalogue`, + parameters: {} + }); + var strClientId = + this.appNM + + '; ' + + this.appVer + + '; JavascriptSdk; ' + this.apiVersion + '; ' + + this.machineNM; return this.restCall({ url: path, verb: 'post', payload: model, clientId: strClientId }, Models.ItemCatalogueOutputModel); - } - - /** - * Sync items from a product catalog + } + + /** + * 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. * @@ -9117,31 +9378,31 @@ export default class AvaTaxClient { * * ### Security Policies * - * * This API requires one of the following user roles: AccountAdmin, BatchServiceAdmin, CompanyAdmin, CSPTester, SSTAdmin, TechnicalSupportAdmin. - * Swagger Name: AvaTaxClient - * + * * This API requires one of the following user roles: AccountAdmin, BatchServiceAdmin, CompanyAdmin, CSPTester, SSTAdmin, TechnicalSupportAdmin. + * Swagger Name: AvaTaxClient + * * * @param {number} companyId The ID of the company that owns this item. - * @param {Models.SyncItemsRequestModel} model The request object. - * @return {Models.SyncItemsResponseModel} - */ - - syncItems({ companyId, model }: { companyId: number, model: Models.SyncItemsRequestModel }): Promise { - var path = this.buildUrl({ - url: `/api/v2/companies/${companyId}/items/sync`, - parameters: {} - }); - var strClientId = - this.appNM + - '; ' + - this.appVer + - '; JavascriptSdk; ' + this.apiVersion + '; ' + - this.machineNM; + * @param {Models.SyncItemsRequestModel} model The request object. + * @return {Models.SyncItemsResponseModel} + */ + + syncItems({ companyId, model }: { companyId: number, model: Models.SyncItemsRequestModel }): Promise { + var path = this.buildUrl({ + url: `/api/v2/companies/${companyId}/items/sync`, + parameters: {} + }); + var strClientId = + this.appNM + + '; ' + + this.appVer + + '; JavascriptSdk; ' + this.apiVersion + '; ' + + this.machineNM; return this.restCall({ url: path, verb: 'post', payload: model, clientId: strClientId }, Models.SyncItemsResponseModel); - } - - /** - * Update a single item + } + + /** + * 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 @@ -9157,35 +9418,35 @@ export default class AvaTaxClient { * * ### Security Policies * - * * This API requires one of the following user roles: AccountAdmin, BatchServiceAdmin, CompanyAdmin, CSPTester, SSTAdmin, TechnicalSupportAdmin. - * Swagger Name: AvaTaxClient - * + * * This API requires one of the following user roles: AccountAdmin, BatchServiceAdmin, CompanyAdmin, CSPTester, SSTAdmin, TechnicalSupportAdmin. + * Swagger Name: AvaTaxClient + * * * @param {number} companyId The ID of the company that this item belongs to. * @param {number} id The ID of the item you wish to update * @param {boolean} isRecommendationSelected If true then Set recommendation status to RecommendationSelected - * @param {Models.ItemModel} model The item object you wish to update. - * @return {Models.ItemModel} - */ - - updateItem({ companyId, id, isRecommendationSelected, model }: { companyId: number, id: number, isRecommendationSelected?: boolean, model: Models.ItemModel }): Promise { - var path = this.buildUrl({ - url: `/api/v2/companies/${companyId}/items/${id}`, + * @param {Models.ItemModel} model The item object you wish to update. + * @return {Models.ItemModel} + */ + + updateItem({ companyId, id, isRecommendationSelected, model }: { companyId: number, id: number, isRecommendationSelected?: boolean, model: Models.ItemModel }): Promise { + var path = this.buildUrl({ + url: `/api/v2/companies/${companyId}/items/${id}`, parameters: { isRecommendationSelected: isRecommendationSelected } - }); - var strClientId = - this.appNM + - '; ' + - this.appVer + - '; JavascriptSdk; ' + this.apiVersion + '; ' + - this.machineNM; + }); + var strClientId = + this.appNM + + '; ' + + this.appVer + + '; JavascriptSdk; ' + this.apiVersion + '; ' + + this.machineNM; return this.restCall({ url: path, verb: 'put', payload: model, clientId: strClientId }, Models.ItemModel); - } - - /** - * Update an item classification. + } + + /** + * 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. @@ -9196,33 +9457,33 @@ export default class AvaTaxClient { * * ### Security Policies * - * * This API requires one of the following user roles: AccountAdmin, BatchServiceAdmin, CompanyAdmin, CSPTester, SSTAdmin, TechnicalSupportAdmin. - * Swagger Name: AvaTaxClient - * + * * This API requires one of the following user roles: AccountAdmin, BatchServiceAdmin, CompanyAdmin, CSPTester, SSTAdmin, TechnicalSupportAdmin. + * Swagger Name: AvaTaxClient + * * * @param {number} companyId The company id. * @param {number} itemId The item id. * @param {number} id The item classification id. - * @param {Models.ItemClassificationInputModel} model The item object you wish to update. - * @return {Models.ItemClassificationOutputModel} - */ - - updateItemClassification({ companyId, itemId, id, model }: { companyId: number, itemId: number, id: number, model: Models.ItemClassificationInputModel }): Promise { - var path = this.buildUrl({ - url: `/api/v2/companies/${companyId}/items/${itemId}/classifications/${id}`, - parameters: {} - }); - var strClientId = - this.appNM + - '; ' + - this.appVer + - '; JavascriptSdk; ' + this.apiVersion + '; ' + - this.machineNM; + * @param {Models.ItemClassificationInputModel} model The item object you wish to update. + * @return {Models.ItemClassificationOutputModel} + */ + + updateItemClassification({ companyId, itemId, id, model }: { companyId: number, itemId: number, id: number, model: Models.ItemClassificationInputModel }): Promise { + var path = this.buildUrl({ + url: `/api/v2/companies/${companyId}/items/${itemId}/classifications/${id}`, + parameters: {} + }); + var strClientId = + this.appNM + + '; ' + + this.appVer + + '; JavascriptSdk; ' + this.apiVersion + '; ' + + this.machineNM; return this.restCall({ url: path, verb: 'put', payload: model, clientId: strClientId }, Models.ItemClassificationOutputModel); - } - - /** - * Update an item parameter + } + + /** + * 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". @@ -9233,33 +9494,33 @@ export default class AvaTaxClient { * * ### Security Policies * - * * This API requires one of the following user roles: AccountAdmin, BatchServiceAdmin, CompanyAdmin, CSPTester, SSTAdmin, TechnicalSupportAdmin. - * Swagger Name: AvaTaxClient - * + * * This API requires one of the following user roles: AccountAdmin, BatchServiceAdmin, CompanyAdmin, CSPTester, SSTAdmin, TechnicalSupportAdmin. + * Swagger Name: AvaTaxClient + * * * @param {number} companyId The company id. * @param {number} itemId The item id * @param {number} id The item parameter id - * @param {Models.ItemParameterModel} model The item object you wish to update. - * @return {Models.ItemParameterModel} - */ - - updateItemParameter({ companyId, itemId, id, model }: { companyId: number, itemId: number, id: number, model: Models.ItemParameterModel }): Promise { - var path = this.buildUrl({ - url: `/api/v2/companies/${companyId}/items/${itemId}/parameters/${id}`, - parameters: {} - }); - var strClientId = - this.appNM + - '; ' + - this.appVer + - '; JavascriptSdk; ' + this.apiVersion + '; ' + - this.machineNM; + * @param {Models.ItemParameterModel} model The item object you wish to update. + * @return {Models.ItemParameterModel} + */ + + updateItemParameter({ companyId, itemId, id, model }: { companyId: number, itemId: number, id: number, model: Models.ItemParameterModel }): Promise { + var path = this.buildUrl({ + url: `/api/v2/companies/${companyId}/items/${itemId}/parameters/${id}`, + parameters: {} + }); + var strClientId = + this.appNM + + '; ' + + this.appVer + + '; JavascriptSdk; ' + this.apiVersion + '; ' + + this.machineNM; return this.restCall({ url: path, verb: 'put', payload: model, clientId: strClientId }, Models.ItemParameterModel); - } - - /** - * Create one or more overrides + } + + /** + * 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 @@ -9269,60 +9530,60 @@ export default class AvaTaxClient { * * ### Security Policies * - * * This API requires one of the following user roles: AccountAdmin, BatchServiceAdmin, CSPTester, SSTAdmin, TechnicalSupportAdmin. - * Swagger Name: AvaTaxClient - * + * * This API requires one of the following user roles: AccountAdmin, BatchServiceAdmin, CSPTester, SSTAdmin, TechnicalSupportAdmin. + * Swagger Name: AvaTaxClient + * * * @param {number} accountId The ID of the account that owns this override - * @param {Models.JurisdictionOverrideModel[]} model The jurisdiction override objects to create - * @return {Models.JurisdictionOverrideModel[]} - */ - - createJurisdictionOverrides({ accountId, model }: { accountId: number, model: Models.JurisdictionOverrideModel[] }): Promise> { - var path = this.buildUrl({ - url: `/api/v2/accounts/${accountId}/jurisdictionoverrides`, - parameters: {} - }); - var strClientId = - this.appNM + - '; ' + - this.appVer + - '; JavascriptSdk; ' + this.apiVersion + '; ' + - this.machineNM; + * @param {Models.JurisdictionOverrideModel[]} model The jurisdiction override objects to create + * @return {Models.JurisdictionOverrideModel[]} + */ + + createJurisdictionOverrides({ accountId, model }: { accountId: number, model: Models.JurisdictionOverrideModel[] }): Promise> { + var path = this.buildUrl({ + url: `/api/v2/accounts/${accountId}/jurisdictionoverrides`, + parameters: {} + }); + var strClientId = + this.appNM + + '; ' + + this.appVer + + '; JavascriptSdk; ' + this.apiVersion + '; ' + + this.machineNM; return this.restCall({ url: path, verb: 'post', payload: model, clientId: strClientId }, Array); - } - - /** - * Delete a single override + } + + /** + * 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, BatchServiceAdmin, CSPTester, SSTAdmin, TechnicalSupportAdmin. - * Swagger Name: AvaTaxClient - * + * * This API requires one of the following user roles: AccountAdmin, BatchServiceAdmin, CSPTester, SSTAdmin, TechnicalSupportAdmin. + * Swagger Name: AvaTaxClient + * * * @param {number} accountId The ID of the account that owns this override - * @param {number} id The ID of the override you wish to delete - * @return {Models.ErrorDetail[]} - */ - - deleteJurisdictionOverride({ accountId, id }: { accountId: number, id: number }): Promise> { - var path = this.buildUrl({ - url: `/api/v2/accounts/${accountId}/jurisdictionoverrides/${id}`, - parameters: {} - }); - var strClientId = - this.appNM + - '; ' + - this.appVer + - '; JavascriptSdk; ' + this.apiVersion + '; ' + - this.machineNM; + * @param {number} id The ID of the override you wish to delete + * @return {Models.ErrorDetail[]} + */ + + deleteJurisdictionOverride({ accountId, id }: { accountId: number, id: number }): Promise> { + var path = this.buildUrl({ + url: `/api/v2/accounts/${accountId}/jurisdictionoverrides/${id}`, + parameters: {} + }); + var strClientId = + this.appNM + + '; ' + + this.appVer + + '; JavascriptSdk; ' + this.apiVersion + '; ' + + this.machineNM; return this.restCall({ url: path, verb: 'delete', payload: null, clientId: strClientId }, Array); - } - - /** - * Retrieve a single override + } + + /** + * 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 @@ -9332,31 +9593,31 @@ export default class AvaTaxClient { * * ### Security Policies * - * * This API requires one of the following user roles: AccountAdmin, AccountUser, BatchServiceAdmin, CompanyAdmin, CompanyUser, CSPAdmin, CSPTester, SiteAdmin, SSTAdmin, SystemAdmin, TechnicalSupportAdmin, TechnicalSupportUser. - * Swagger Name: AvaTaxClient - * + * * This API requires one of the following user roles: AccountAdmin, AccountUser, BatchServiceAdmin, CompanyAdmin, CompanyUser, CSPAdmin, CSPTester, SiteAdmin, SSTAdmin, SystemAdmin, TechnicalSupportAdmin, TechnicalSupportUser. + * Swagger Name: AvaTaxClient + * * * @param {number} accountId The ID of the account that owns this override - * @param {number} id The primary key of this override - * @return {Models.JurisdictionOverrideModel} - */ - - getJurisdictionOverride({ accountId, id }: { accountId: number, id: number }): Promise { - var path = this.buildUrl({ - url: `/api/v2/accounts/${accountId}/jurisdictionoverrides/${id}`, - parameters: {} - }); - var strClientId = - this.appNM + - '; ' + - this.appVer + - '; JavascriptSdk; ' + this.apiVersion + '; ' + - this.machineNM; + * @param {number} id The primary key of this override + * @return {Models.JurisdictionOverrideModel} + */ + + getJurisdictionOverride({ accountId, id }: { accountId: number, id: number }): Promise { + var path = this.buildUrl({ + url: `/api/v2/accounts/${accountId}/jurisdictionoverrides/${id}`, + parameters: {} + }); + var strClientId = + this.appNM + + '; ' + + this.appVer + + '; JavascriptSdk; ' + this.apiVersion + '; ' + + this.machineNM; return this.restCall({ url: path, verb: 'get', payload: null, clientId: strClientId }, Models.JurisdictionOverrideModel); - } - - /** - * Retrieve overrides for this account + } + + /** + * 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 @@ -9369,22 +9630,22 @@ export default class AvaTaxClient { * * ### Security Policies * - * * This API requires one of the following user roles: AccountAdmin, AccountUser, BatchServiceAdmin, CompanyAdmin, CompanyUser, CSPAdmin, CSPTester, SiteAdmin, SSTAdmin, SystemAdmin, TechnicalSupportAdmin, TechnicalSupportUser. - * Swagger Name: AvaTaxClient - * + * * This API requires one of the following user roles: AccountAdmin, AccountUser, BatchServiceAdmin, CompanyAdmin, CompanyUser, CSPAdmin, CSPTester, SiteAdmin, SSTAdmin, SystemAdmin, TechnicalSupportAdmin, TechnicalSupportUser. + * Swagger Name: AvaTaxClient + * * * @param {number} 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 {number} top If nonzero, return no more than this number of results. Used with `$skip` to provide pagination for large datasets. Unless otherwise specified, the maximum number of records that can be returned from an API call is 1,000 records. * @param {number} skip If nonzero, skip this number of results before returning data. Used with `$top` to provide pagination for large datasets. - * @param {string} orderBy A comma separated list of sort statements in the format `(fieldname) [ASC|DESC]`, for example `id ASC`. - * @return {FetchResult} - */ - - listJurisdictionOverridesByAccount({ accountId, filter, include, top, skip, orderBy }: { accountId: number, filter?: string, include?: string, top?: number, skip?: number, orderBy?: string }): Promise> { - 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 }: { accountId: number, filter?: string, include?: string, top?: number, skip?: number, orderBy?: string }): Promise> { + var path = this.buildUrl({ + url: `/api/v2/accounts/${accountId}/jurisdictionoverrides`, parameters: { $filter: filter, $include: include, @@ -9392,18 +9653,18 @@ export default class AvaTaxClient { $skip: skip, $orderBy: orderBy } - }); - var strClientId = - this.appNM + - '; ' + - this.appVer + - '; JavascriptSdk; ' + this.apiVersion + '; ' + - this.machineNM; + }); + var strClientId = + this.appNM + + '; ' + + this.appVer + + '; JavascriptSdk; ' + this.apiVersion + '; ' + + this.machineNM; return this.restCall({ url: path, verb: 'get', payload: null, clientId: strClientId }, FetchResult); - } - - /** - * Retrieve all overrides + } + + /** + * 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 @@ -9416,21 +9677,21 @@ export default class AvaTaxClient { * * ### Security Policies * - * * This API requires one of the following user roles: AccountAdmin, AccountUser, BatchServiceAdmin, CompanyAdmin, CompanyUser, CSPAdmin, CSPTester, SiteAdmin, SSTAdmin, SystemAdmin, TechnicalSupportAdmin, TechnicalSupportUser. - * Swagger Name: AvaTaxClient - * + * * This API requires one of the following user roles: AccountAdmin, AccountUser, BatchServiceAdmin, CompanyAdmin, CompanyUser, CSPAdmin, CSPTester, SiteAdmin, SSTAdmin, SystemAdmin, TechnicalSupportAdmin, TechnicalSupportUser. + * Swagger Name: AvaTaxClient + * * * @param {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 {number} top If nonzero, return no more than this number of results. Used with `$skip` to provide pagination for large datasets. Unless otherwise specified, the maximum number of records that can be returned from an API call is 1,000 records. * @param {number} skip If nonzero, skip this number of results before returning data. Used with `$top` to provide pagination for large datasets. - * @param {string} orderBy A comma separated list of sort statements in the format `(fieldname) [ASC|DESC]`, for example `id ASC`. - * @return {FetchResult} - */ - - queryJurisdictionOverrides({ filter, include, top, skip, orderBy }: { filter?: string, include?: string, top?: number, skip?: number, orderBy?: string }): Promise> { - 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 }: { filter?: string, include?: string, top?: number, skip?: number, orderBy?: string }): Promise> { + var path = this.buildUrl({ + url: `/api/v2/jurisdictionoverrides`, parameters: { $filter: filter, $include: include, @@ -9438,48 +9699,48 @@ export default class AvaTaxClient { $skip: skip, $orderBy: orderBy } - }); - var strClientId = - this.appNM + - '; ' + - this.appVer + - '; JavascriptSdk; ' + this.apiVersion + '; ' + - this.machineNM; + }); + var strClientId = + this.appNM + + '; ' + + this.appVer + + '; JavascriptSdk; ' + this.apiVersion + '; ' + + this.machineNM; return this.restCall({ url: path, verb: 'get', payload: null, clientId: strClientId }, FetchResult); - } - - /** - * Update a single jurisdictionoverride + } + + /** + * 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, BatchServiceAdmin, CSPTester, SSTAdmin, TechnicalSupportAdmin. - * Swagger Name: AvaTaxClient - * + * * This API requires one of the following user roles: AccountAdmin, BatchServiceAdmin, CSPTester, SSTAdmin, TechnicalSupportAdmin. + * Swagger Name: AvaTaxClient + * * * @param {number} accountId The ID of the account that this jurisdictionoverride belongs to. * @param {number} id The ID of the jurisdictionoverride you wish to update - * @param {Models.JurisdictionOverrideModel} model The jurisdictionoverride object you wish to update. - * @return {Models.JurisdictionOverrideModel} - */ - - updateJurisdictionOverride({ accountId, id, model }: { accountId: number, id: number, model: Models.JurisdictionOverrideModel }): Promise { - var path = this.buildUrl({ - url: `/api/v2/accounts/${accountId}/jurisdictionoverrides/${id}`, - parameters: {} - }); - var strClientId = - this.appNM + - '; ' + - this.appVer + - '; JavascriptSdk; ' + this.apiVersion + '; ' + - this.machineNM; + * @param {Models.JurisdictionOverrideModel} model The jurisdictionoverride object you wish to update. + * @return {Models.JurisdictionOverrideModel} + */ + + updateJurisdictionOverride({ accountId, id, model }: { accountId: number, id: number, model: Models.JurisdictionOverrideModel }): Promise { + var path = this.buildUrl({ + url: `/api/v2/accounts/${accountId}/jurisdictionoverrides/${id}`, + parameters: {} + }); + var strClientId = + this.appNM + + '; ' + + this.appVer + + '; JavascriptSdk; ' + this.apiVersion + '; ' + + this.machineNM; return this.restCall({ url: path, verb: 'put', payload: model, clientId: strClientId }, Models.JurisdictionOverrideModel); - } - - /** - * Add parameters to a location. + } + + /** + * 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". @@ -9494,90 +9755,90 @@ export default class AvaTaxClient { * * ### Security Policies * - * * This API requires one of the following user roles: AccountAdmin, BatchServiceAdmin, CompanyAdmin, CSPAdmin, CSPTester, FirmAdmin, SiteAdmin, SSTAdmin, SystemAdmin, TechnicalSupportAdmin. - * Swagger Name: AvaTaxClient - * + * * This API requires one of the following user roles: AccountAdmin, BatchServiceAdmin, CompanyAdmin, CSPAdmin, CSPTester, FirmAdmin, SiteAdmin, SSTAdmin, SystemAdmin, TechnicalSupportAdmin. + * Swagger Name: AvaTaxClient + * * * @param {number} companyId The ID of the company that owns this location parameter. * @param {number} locationId The location id. - * @param {Models.LocationParameterModel[]} model The location parameters you wish to create. - * @return {Models.LocationParameterModel[]} - */ - - createLocationParameters({ companyId, locationId, model }: { companyId: number, locationId: number, model: Models.LocationParameterModel[] }): Promise> { - var path = this.buildUrl({ - url: `/api/v2/companies/${companyId}/locations/${locationId}/parameters`, - parameters: {} - }); - var strClientId = - this.appNM + - '; ' + - this.appVer + - '; JavascriptSdk; ' + this.apiVersion + '; ' + - this.machineNM; + * @param {Models.LocationParameterModel[]} model The location parameters you wish to create. + * @return {Models.LocationParameterModel[]} + */ + + createLocationParameters({ companyId, locationId, model }: { companyId: number, locationId: number, model: Models.LocationParameterModel[] }): Promise> { + var path = this.buildUrl({ + url: `/api/v2/companies/${companyId}/locations/${locationId}/parameters`, + parameters: {} + }); + var strClientId = + this.appNM + + '; ' + + this.appVer + + '; JavascriptSdk; ' + this.apiVersion + '; ' + + this.machineNM; return this.restCall({ url: path, verb: 'post', payload: model, clientId: strClientId }, Array); - } - - /** - * Create a new location + } + + /** + * 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, BatchServiceAdmin, CompanyAdmin, CSPAdmin, CSPTester, FirmAdmin, SiteAdmin, SSTAdmin, SystemAdmin, TechnicalSupportAdmin. - * Swagger Name: AvaTaxClient - * + * * This API requires one of the following user roles: AccountAdmin, BatchServiceAdmin, CompanyAdmin, CSPAdmin, CSPTester, FirmAdmin, SiteAdmin, SSTAdmin, SystemAdmin, TechnicalSupportAdmin. + * Swagger Name: AvaTaxClient + * * * @param {number} companyId The ID of the company that owns this location. - * @param {Models.LocationModel[]} model The location you wish to create. - * @return {Models.LocationModel[]} - */ - - createLocations({ companyId, model }: { companyId: number, model: Models.LocationModel[] }): Promise> { - var path = this.buildUrl({ - url: `/api/v2/companies/${companyId}/locations`, - parameters: {} - }); - var strClientId = - this.appNM + - '; ' + - this.appVer + - '; JavascriptSdk; ' + this.apiVersion + '; ' + - this.machineNM; + * @param {Models.LocationModel[]} model The location you wish to create. + * @return {Models.LocationModel[]} + */ + + createLocations({ companyId, model }: { companyId: number, model: Models.LocationModel[] }): Promise> { + var path = this.buildUrl({ + url: `/api/v2/companies/${companyId}/locations`, + parameters: {} + }); + var strClientId = + this.appNM + + '; ' + + this.appVer + + '; JavascriptSdk; ' + this.apiVersion + '; ' + + this.machineNM; return this.restCall({ url: path, verb: 'post', payload: model, clientId: strClientId }, Array); - } - - /** - * Delete a single location + } + + /** + * 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, BatchServiceAdmin, CompanyAdmin, CSPAdmin, CSPTester, FirmAdmin, SiteAdmin, SSTAdmin, SystemAdmin, TechnicalSupportAdmin. - * Swagger Name: AvaTaxClient - * + * * This API requires one of the following user roles: AccountAdmin, BatchServiceAdmin, CompanyAdmin, CSPAdmin, CSPTester, FirmAdmin, SiteAdmin, SSTAdmin, SystemAdmin, TechnicalSupportAdmin. + * Swagger Name: AvaTaxClient + * * * @param {number} companyId The ID of the company that owns this location. - * @param {number} id The ID of the location you wish to delete. - * @return {Models.ErrorDetail[]} - */ - - deleteLocation({ companyId, id }: { companyId: number, id: number }): Promise> { - var path = this.buildUrl({ - url: `/api/v2/companies/${companyId}/locations/${id}`, - parameters: {} - }); - var strClientId = - this.appNM + - '; ' + - this.appVer + - '; JavascriptSdk; ' + this.apiVersion + '; ' + - this.machineNM; + * @param {number} id The ID of the location you wish to delete. + * @return {Models.ErrorDetail[]} + */ + + deleteLocation({ companyId, id }: { companyId: number, id: number }): Promise> { + var path = this.buildUrl({ + url: `/api/v2/companies/${companyId}/locations/${id}`, + parameters: {} + }); + var strClientId = + this.appNM + + '; ' + + this.appVer + + '; JavascriptSdk; ' + this.apiVersion + '; ' + + this.machineNM; return this.restCall({ url: path, verb: 'delete', payload: null, clientId: strClientId }, Array); - } - - /** - * Delete a single location parameter + } + + /** + * 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". @@ -9588,32 +9849,32 @@ export default class AvaTaxClient { * * ### Security Policies * - * * This API requires one of the following user roles: AccountAdmin, BatchServiceAdmin, CompanyAdmin, CSPAdmin, CSPTester, FirmAdmin, SiteAdmin, SSTAdmin, SystemAdmin, TechnicalSupportAdmin. - * Swagger Name: AvaTaxClient - * + * * This API requires one of the following user roles: AccountAdmin, BatchServiceAdmin, CompanyAdmin, CSPAdmin, CSPTester, FirmAdmin, SiteAdmin, SSTAdmin, SystemAdmin, TechnicalSupportAdmin. + * Swagger Name: AvaTaxClient + * * * @param {number} companyId The company id * @param {number} locationId The location id - * @param {number} id The parameter id - * @return {Models.ErrorDetail[]} - */ - - deleteLocationParameter({ companyId, locationId, id }: { companyId: number, locationId: number, id: number }): Promise> { - var path = this.buildUrl({ - url: `/api/v2/companies/${companyId}/locations/${locationId}/parameters/${id}`, - parameters: {} - }); - var strClientId = - this.appNM + - '; ' + - this.appVer + - '; JavascriptSdk; ' + this.apiVersion + '; ' + - this.machineNM; + * @param {number} id The parameter id + * @return {Models.ErrorDetail[]} + */ + + deleteLocationParameter({ companyId, locationId, id }: { companyId: number, locationId: number, id: number }): Promise> { + var path = this.buildUrl({ + url: `/api/v2/companies/${companyId}/locations/${locationId}/parameters/${id}`, + parameters: {} + }); + var strClientId = + this.appNM + + '; ' + + this.appVer + + '; JavascriptSdk; ' + this.apiVersion + '; ' + + this.machineNM; return this.restCall({ url: path, verb: 'delete', payload: null, clientId: strClientId }, Array); - } - - /** - * Retrieve a single location + } + + /** + * 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. @@ -9627,34 +9888,34 @@ export default class AvaTaxClient { * * ### Security Policies * - * * This API requires one of the following user roles: AccountAdmin, AccountUser, BatchServiceAdmin, CompanyAdmin, CompanyUser, CSPAdmin, CSPTester, ECMAccountUser, ECMCompanyUser, FirmAdmin, FirmUser, SiteAdmin, SSTAdmin, SystemAdmin, TechnicalSupportAdmin, TechnicalSupportUser, TreasuryAdmin, TreasuryUser. - * Swagger Name: AvaTaxClient - * + * * This API requires one of the following user roles: AccountAdmin, AccountUser, BatchServiceAdmin, CompanyAdmin, CompanyUser, CSPAdmin, CSPTester, ECMAccountUser, ECMCompanyUser, FirmAdmin, FirmUser, SiteAdmin, SSTAdmin, SystemAdmin, TechnicalSupportAdmin, TechnicalSupportUser, TreasuryAdmin, TreasuryUser. + * Swagger Name: AvaTaxClient + * * * @param {number} companyId The ID of the company that owns this location * @param {number} id The primary key of this location - * @param {string} include A comma separated list of additional data to retrieve. - * @return {Models.LocationModel} - */ - - getLocation({ companyId, id, include }: { companyId: number, id: number, include?: string }): Promise { - var path = this.buildUrl({ - url: `/api/v2/companies/${companyId}/locations/${id}`, + * @param {string} include A comma separated list of additional data to retrieve. + * @return {Models.LocationModel} + */ + + getLocation({ companyId, id, include }: { companyId: number, id: number, include?: string }): Promise { + var path = this.buildUrl({ + url: `/api/v2/companies/${companyId}/locations/${id}`, parameters: { $include: include } - }); - var strClientId = - this.appNM + - '; ' + - this.appVer + - '; JavascriptSdk; ' + this.apiVersion + '; ' + - this.machineNM; + }); + var strClientId = + this.appNM + + '; ' + + this.appVer + + '; JavascriptSdk; ' + this.apiVersion + '; ' + + this.machineNM; return this.restCall({ url: path, verb: 'get', payload: null, clientId: strClientId }, Models.LocationModel); - } - - /** - * Retrieve a single company location parameter + } + + /** + * 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". @@ -9665,32 +9926,32 @@ export default class AvaTaxClient { * * ### Security Policies * - * * This API requires one of the following user roles: AccountAdmin, AccountUser, BatchServiceAdmin, CompanyAdmin, CompanyUser, CSPAdmin, CSPTester, ECMAccountUser, ECMCompanyUser, FirmAdmin, FirmUser, SiteAdmin, SSTAdmin, SystemAdmin, TechnicalSupportAdmin, TechnicalSupportUser, TreasuryAdmin, TreasuryUser. - * Swagger Name: AvaTaxClient - * + * * This API requires one of the following user roles: AccountAdmin, AccountUser, BatchServiceAdmin, CompanyAdmin, CompanyUser, CSPAdmin, CSPTester, ECMAccountUser, ECMCompanyUser, FirmAdmin, FirmUser, SiteAdmin, SSTAdmin, SystemAdmin, TechnicalSupportAdmin, TechnicalSupportUser, TreasuryAdmin, TreasuryUser. + * Swagger Name: AvaTaxClient + * * * @param {number} companyId The company id * @param {number} locationId The location id - * @param {number} id The parameter id - * @return {Models.LocationParameterModel} - */ - - getLocationParameter({ companyId, locationId, id }: { companyId: number, locationId: number, id: number }): Promise { - var path = this.buildUrl({ - url: `/api/v2/companies/${companyId}/locations/${locationId}/parameters/${id}`, - parameters: {} - }); - var strClientId = - this.appNM + - '; ' + - this.appVer + - '; JavascriptSdk; ' + this.apiVersion + '; ' + - this.machineNM; + * @param {number} id The parameter id + * @return {Models.LocationParameterModel} + */ + + getLocationParameter({ companyId, locationId, id }: { companyId: number, locationId: number, id: number }): Promise { + var path = this.buildUrl({ + url: `/api/v2/companies/${companyId}/locations/${locationId}/parameters/${id}`, + parameters: {} + }); + var strClientId = + this.appNM + + '; ' + + this.appVer + + '; JavascriptSdk; ' + this.apiVersion + '; ' + + this.machineNM; return this.restCall({ url: path, verb: 'get', payload: null, clientId: strClientId }, Models.LocationParameterModel); - } - - /** - * Retrieve parameters for a location + } + + /** + * 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". @@ -9704,40 +9965,40 @@ export default class AvaTaxClient { * * ### Security Policies * - * * This API requires one of the following user roles: AccountAdmin, AccountUser, BatchServiceAdmin, CompanyAdmin, CompanyUser, CSPAdmin, CSPTester, ECMAccountUser, ECMCompanyUser, FirmAdmin, FirmUser, SiteAdmin, SSTAdmin, SystemAdmin, TechnicalSupportAdmin, TechnicalSupportUser, TreasuryAdmin, TreasuryUser. - * Swagger Name: AvaTaxClient - * + * * This API requires one of the following user roles: AccountAdmin, AccountUser, BatchServiceAdmin, CompanyAdmin, CompanyUser, CSPAdmin, CSPTester, ECMAccountUser, ECMCompanyUser, FirmAdmin, FirmUser, SiteAdmin, SSTAdmin, SystemAdmin, TechnicalSupportAdmin, TechnicalSupportUser, TreasuryAdmin, TreasuryUser. + * Swagger Name: AvaTaxClient + * * * @param {number} companyId The company id * @param {number} 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 {number} top If nonzero, return no more than this number of results. Used with `$skip` to provide pagination for large datasets. Unless otherwise specified, the maximum number of records that can be returned from an API call is 1,000 records. * @param {number} skip If nonzero, skip this number of results before returning data. Used with `$top` to provide pagination for large datasets. - * @param {string} orderBy A comma separated list of sort statements in the format `(fieldname) [ASC|DESC]`, for example `id ASC`. - * @return {FetchResult} - */ - - listLocationParameters({ companyId, locationId, filter, top, skip, orderBy }: { companyId: number, locationId: number, filter?: string, top?: number, skip?: number, orderBy?: string }): Promise> { - 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 }: { companyId: number, locationId: number, filter?: string, top?: number, skip?: number, orderBy?: string }): Promise> { + var path = this.buildUrl({ + url: `/api/v2/companies/${companyId}/locations/${locationId}/parameters`, parameters: { $filter: filter, $top: top, $skip: skip, $orderBy: orderBy } - }); - var strClientId = - this.appNM + - '; ' + - this.appVer + - '; JavascriptSdk; ' + this.apiVersion + '; ' + - this.machineNM; + }); + var strClientId = + this.appNM + + '; ' + + this.appVer + + '; JavascriptSdk; ' + this.apiVersion + '; ' + + this.machineNM; return this.restCall({ url: path, verb: 'get', payload: null, clientId: strClientId }, FetchResult); - } - - /** - * Retrieve locations for this company + } + + /** + * 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. @@ -9753,22 +10014,22 @@ export default class AvaTaxClient { * * ### Security Policies * - * * This API requires one of the following user roles: AccountAdmin, AccountUser, BatchServiceAdmin, CompanyAdmin, CompanyUser, CSPAdmin, CSPTester, ECMAccountUser, ECMCompanyUser, FirmAdmin, FirmUser, SiteAdmin, SSTAdmin, SystemAdmin, TechnicalSupportAdmin, TechnicalSupportUser, TreasuryAdmin, TreasuryUser. - * Swagger Name: AvaTaxClient - * + * * This API requires one of the following user roles: AccountAdmin, AccountUser, BatchServiceAdmin, CompanyAdmin, CompanyUser, CSPAdmin, CSPTester, ECMAccountUser, ECMCompanyUser, FirmAdmin, FirmUser, SiteAdmin, SSTAdmin, SystemAdmin, TechnicalSupportAdmin, TechnicalSupportUser, TreasuryAdmin, TreasuryUser. + * Swagger Name: AvaTaxClient + * * * @param {number} 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 {number} top If nonzero, return no more than this number of results. Used with `$skip` to provide pagination for large datasets. Unless otherwise specified, the maximum number of records that can be returned from an API call is 1,000 records. * @param {number} skip If nonzero, skip this number of results before returning data. Used with `$top` to provide pagination for large datasets. - * @param {string} orderBy A comma separated list of sort statements in the format `(fieldname) [ASC|DESC]`, for example `id ASC`. - * @return {FetchResult} - */ - - listLocationsByCompany({ companyId, filter, include, top, skip, orderBy }: { companyId: number, filter?: string, include?: string, top?: number, skip?: number, orderBy?: string }): Promise> { - var path = this.buildUrl({ - url: `/api/v2/companies/${companyId}/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 }: { companyId: number, filter?: string, include?: string, top?: number, skip?: number, orderBy?: string }): Promise> { + var path = this.buildUrl({ + url: `/api/v2/companies/${companyId}/locations`, parameters: { $filter: filter, $include: include, @@ -9776,18 +10037,18 @@ export default class AvaTaxClient { $skip: skip, $orderBy: orderBy } - }); - var strClientId = - this.appNM + - '; ' + - this.appVer + - '; JavascriptSdk; ' + this.apiVersion + '; ' + - this.machineNM; + }); + var strClientId = + this.appNM + + '; ' + + this.appVer + + '; JavascriptSdk; ' + this.apiVersion + '; ' + + this.machineNM; return this.restCall({ url: path, verb: 'get', payload: null, clientId: strClientId }, FetchResult); - } - - /** - * Retrieve all locations + } + + /** + * 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. @@ -9804,21 +10065,21 @@ export default class AvaTaxClient { * * ### Security Policies * - * * This API requires one of the following user roles: AccountAdmin, AccountUser, BatchServiceAdmin, CompanyAdmin, CompanyUser, CSPAdmin, CSPTester, ECMAccountUser, ECMCompanyUser, FirmAdmin, FirmUser, SiteAdmin, SSTAdmin, SystemAdmin, TechnicalSupportAdmin, TechnicalSupportUser, TreasuryAdmin, TreasuryUser. - * Swagger Name: AvaTaxClient - * + * * This API requires one of the following user roles: AccountAdmin, AccountUser, BatchServiceAdmin, CompanyAdmin, CompanyUser, CSPAdmin, CSPTester, ECMAccountUser, ECMCompanyUser, 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 {number} top If nonzero, return no more than this number of results. Used with `$skip` to provide pagination for large datasets. Unless otherwise specified, the maximum number of records that can be returned from an API call is 1,000 records. * @param {number} skip If nonzero, skip this number of results before returning data. Used with `$top` to provide pagination for large datasets. - * @param {string} orderBy A comma separated list of sort statements in the format `(fieldname) [ASC|DESC]`, for example `id ASC`. - * @return {FetchResult} - */ - - queryLocations({ filter, include, top, skip, orderBy }: { filter?: string, include?: string, top?: number, skip?: number, orderBy?: string }): Promise> { - 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 }: { filter?: string, include?: string, top?: number, skip?: number, orderBy?: string }): Promise> { + var path = this.buildUrl({ + url: `/api/v2/locations`, parameters: { $filter: filter, $include: include, @@ -9826,50 +10087,50 @@ export default class AvaTaxClient { $skip: skip, $orderBy: orderBy } - }); - var strClientId = - this.appNM + - '; ' + - this.appVer + - '; JavascriptSdk; ' + this.apiVersion + '; ' + - this.machineNM; + }); + var strClientId = + this.appNM + + '; ' + + this.appVer + + '; JavascriptSdk; ' + this.apiVersion + '; ' + + this.machineNM; return this.restCall({ url: path, verb: 'get', payload: null, clientId: strClientId }, FetchResult); - } - - /** - * Update a single location + } + + /** + * 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, BatchServiceAdmin, CompanyAdmin, CSPAdmin, CSPTester, FirmAdmin, SiteAdmin, SSTAdmin, SystemAdmin, TechnicalSupportAdmin. - * Swagger Name: AvaTaxClient - * + * * This API requires one of the following user roles: AccountAdmin, BatchServiceAdmin, CompanyAdmin, CSPAdmin, CSPTester, FirmAdmin, SiteAdmin, SSTAdmin, SystemAdmin, TechnicalSupportAdmin. + * Swagger Name: AvaTaxClient + * * * @param {number} companyId The ID of the company that this location belongs to. * @param {number} id The ID of the location you wish to update - * @param {Models.LocationModel} model The location you wish to update. - * @return {Models.LocationModel} - */ - - updateLocation({ companyId, id, model }: { companyId: number, id: number, model: Models.LocationModel }): Promise { - var path = this.buildUrl({ - url: `/api/v2/companies/${companyId}/locations/${id}`, - parameters: {} - }); - var strClientId = - this.appNM + - '; ' + - this.appVer + - '; JavascriptSdk; ' + this.apiVersion + '; ' + - this.machineNM; + * @param {Models.LocationModel} model The location you wish to update. + * @return {Models.LocationModel} + */ + + updateLocation({ companyId, id, model }: { companyId: number, id: number, model: Models.LocationModel }): Promise { + var path = this.buildUrl({ + url: `/api/v2/companies/${companyId}/locations/${id}`, + parameters: {} + }); + var strClientId = + this.appNM + + '; ' + + this.appVer + + '; JavascriptSdk; ' + this.apiVersion + '; ' + + this.machineNM; return this.restCall({ url: path, verb: 'put', payload: model, clientId: strClientId }, Models.LocationModel); - } - - /** - * Update a location parameter + } + + /** + * 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". @@ -9880,64 +10141,64 @@ export default class AvaTaxClient { * * ### Security Policies * - * * This API requires one of the following user roles: AccountAdmin, BatchServiceAdmin, CompanyAdmin, CSPAdmin, CSPTester, FirmAdmin, SiteAdmin, SSTAdmin, SystemAdmin, TechnicalSupportAdmin. - * Swagger Name: AvaTaxClient - * + * * This API requires one of the following user roles: AccountAdmin, BatchServiceAdmin, CompanyAdmin, CSPAdmin, CSPTester, FirmAdmin, SiteAdmin, SSTAdmin, SystemAdmin, TechnicalSupportAdmin. + * Swagger Name: AvaTaxClient + * * * @param {number} companyId The company id. * @param {number} locationId The location id * @param {number} id The location parameter id - * @param {Models.LocationParameterModel} model The location parameter object you wish to update. - * @return {Models.LocationParameterModel} - */ - - updateLocationParameter({ companyId, locationId, id, model }: { companyId: number, locationId: number, id: number, model: Models.LocationParameterModel }): Promise { - var path = this.buildUrl({ - url: `/api/v2/companies/${companyId}/locations/${locationId}/parameters/${id}`, - parameters: {} - }); - var strClientId = - this.appNM + - '; ' + - this.appVer + - '; JavascriptSdk; ' + this.apiVersion + '; ' + - this.machineNM; + * @param {Models.LocationParameterModel} model The location parameter object you wish to update. + * @return {Models.LocationParameterModel} + */ + + updateLocationParameter({ companyId, locationId, id, model }: { companyId: number, locationId: number, id: number, model: Models.LocationParameterModel }): Promise { + var path = this.buildUrl({ + url: `/api/v2/companies/${companyId}/locations/${locationId}/parameters/${id}`, + parameters: {} + }); + var strClientId = + this.appNM + + '; ' + + this.appVer + + '; JavascriptSdk; ' + this.apiVersion + '; ' + + this.machineNM; return this.restCall({ url: path, verb: 'put', payload: model, clientId: strClientId }, Models.LocationParameterModel); - } - - /** - * Validate the location against local requirements + } + + /** + * 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, BatchServiceAdmin, CompanyAdmin, CompanyUser, CSPAdmin, CSPTester, ECMAccountUser, ECMCompanyUser, FirmAdmin, FirmUser, SiteAdmin, SSTAdmin, SystemAdmin, TechnicalSupportAdmin, TechnicalSupportUser, TreasuryAdmin, TreasuryUser. - * Swagger Name: AvaTaxClient - * + * * This API requires one of the following user roles: AccountAdmin, AccountUser, BatchServiceAdmin, CompanyAdmin, CompanyUser, CSPAdmin, CSPTester, ECMAccountUser, ECMCompanyUser, FirmAdmin, FirmUser, SiteAdmin, SSTAdmin, SystemAdmin, TechnicalSupportAdmin, TechnicalSupportUser, TreasuryAdmin, TreasuryUser. + * Swagger Name: AvaTaxClient + * * * @param {number} companyId The ID of the company that owns this location - * @param {number} id The primary key of this location - * @return {Models.LocationValidationModel} - */ - - validateLocation({ companyId, id }: { companyId: number, id: number }): Promise { - var path = this.buildUrl({ - url: `/api/v2/companies/${companyId}/locations/${id}/validate`, - parameters: {} - }); - var strClientId = - this.appNM + - '; ' + - this.appVer + - '; JavascriptSdk; ' + this.apiVersion + '; ' + - this.machineNM; + * @param {number} id The primary key of this location + * @return {Models.LocationValidationModel} + */ + + validateLocation({ companyId, id }: { companyId: number, id: number }): Promise { + var path = this.buildUrl({ + url: `/api/v2/companies/${companyId}/locations/${id}/validate`, + parameters: {} + }); + var strClientId = + this.appNM + + '; ' + + this.appVer + + '; JavascriptSdk; ' + this.apiVersion + '; ' + + this.machineNM; return this.restCall({ url: path, verb: 'get', payload: null, clientId: strClientId }, Models.LocationValidationModel); - } - - /** - * Adjust a MultiDocument transaction + } + + /** + * 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 @@ -9960,35 +10221,35 @@ export default class AvaTaxClient { * ### Security Policies * * * This API requires one of the following user roles: AccountAdmin, AccountOperator, BatchServiceAdmin, CompanyAdmin, CSPTester, SSTAdmin, TechnicalSupportAdmin, TechnicalSupportUser. - * * This API depends on the following active services:*Required* (all): AvaTaxPro. - * Swagger Name: AvaTaxClient - * + * * 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 {Enums.DocumentType} 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 {Models.AdjustMultiDocumentModel} model The adjust request you wish to execute - * @return {Models.MultiDocumentModel} - */ - - adjustMultiDocumentTransaction({ code, type, include, model }: { code: string, type: Enums.DocumentType, include?: string, model: Models.AdjustMultiDocumentModel }): Promise { - var path = this.buildUrl({ - url: `/api/v2/transactions/multidocument/${code}/type/${type}/adjust`, + * @param {Models.AdjustMultiDocumentModel} model The adjust request you wish to execute + * @return {Models.MultiDocumentModel} + */ + + adjustMultiDocumentTransaction({ code, type, include, model }: { code: string, type: Enums.DocumentType, include?: string, model: Models.AdjustMultiDocumentModel }): Promise { + var path = this.buildUrl({ + url: `/api/v2/transactions/multidocument/${code}/type/${type}/adjust`, parameters: { include: include } - }); - var strClientId = - this.appNM + - '; ' + - this.appVer + - '; JavascriptSdk; ' + this.apiVersion + '; ' + - this.machineNM; + }); + var strClientId = + this.appNM + + '; ' + + this.appVer + + '; JavascriptSdk; ' + this.apiVersion + '; ' + + this.machineNM; return this.restCall({ url: path, verb: 'post', payload: model, clientId: strClientId }, Models.MultiDocumentModel); - } - - /** - * Get audit information about a MultiDocument transaction + } + + /** + * 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 @@ -10015,31 +10276,31 @@ export default class AvaTaxClient { * ### Security Policies * * * This API requires one of the following user roles: AccountAdmin, AccountUser, BatchServiceAdmin, CompanyAdmin, CompanyUser, CSPAdmin, CSPTester, ProStoresOperator, SiteAdmin, SSTAdmin, SystemAdmin, TechnicalSupportAdmin, TechnicalSupportUser. - * * This API depends on the following active services:*Required* (all): AvaTaxPro. - * Swagger Name: AvaTaxClient - * + * * 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 {Enums.DocumentType} type The transaction type for this MultiDocument transaction (See DocumentType::* for a list of allowable values) - * @return {Models.AuditMultiDocumentModel} - */ - - auditMultiDocumentTransaction({ code, type }: { code: string, type: Enums.DocumentType }): Promise { - var path = this.buildUrl({ - url: `/api/v2/transactions/multidocument/${code}/type/${type}/audit`, - parameters: {} - }); - var strClientId = - this.appNM + - '; ' + - this.appVer + - '; JavascriptSdk; ' + this.apiVersion + '; ' + - this.machineNM; + * @param {Enums.DocumentType} type The transaction type for this MultiDocument transaction (See DocumentType::* for a list of allowable values) + * @return {Models.AuditMultiDocumentModel} + */ + + auditMultiDocumentTransaction({ code, type }: { code: string, type: Enums.DocumentType }): Promise { + var path = this.buildUrl({ + url: `/api/v2/transactions/multidocument/${code}/type/${type}/audit`, + parameters: {} + }); + var strClientId = + this.appNM + + '; ' + + this.appVer + + '; JavascriptSdk; ' + this.apiVersion + '; ' + + this.machineNM; return this.restCall({ url: path, verb: 'get', payload: null, clientId: strClientId }, Models.AuditMultiDocumentModel); - } - - /** - * Commit a MultiDocument transaction + } + + /** + * 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. @@ -10060,30 +10321,30 @@ export default class AvaTaxClient { * ### Security Policies * * * This API requires one of the following user roles: AccountAdmin, AccountOperator, AccountUser, BatchServiceAdmin, CompanyAdmin, CompanyUser, CSPTester, ProStoresOperator, SSTAdmin, TechnicalSupportAdmin. - * * This API depends on the following active services:*Required* (all): AvaTaxPro. - * Swagger Name: AvaTaxClient - * - * - * @param {Models.CommitMultiDocumentModel} model The commit request you wish to execute - * @return {Models.MultiDocumentModel} - */ - - commitMultiDocumentTransaction({ model }: { model: Models.CommitMultiDocumentModel }): Promise { - var path = this.buildUrl({ - url: `/api/v2/transactions/multidocument/commit`, - parameters: {} - }); - var strClientId = - this.appNM + - '; ' + - this.appVer + - '; JavascriptSdk; ' + this.apiVersion + '; ' + - this.machineNM; + * * This API depends on the following active services:*Required* (all): AvaTaxPro. + * Swagger Name: AvaTaxClient + * + * + * @param {Models.CommitMultiDocumentModel} model The commit request you wish to execute + * @return {Models.MultiDocumentModel} + */ + + commitMultiDocumentTransaction({ model }: { model: Models.CommitMultiDocumentModel }): Promise { + var path = this.buildUrl({ + url: `/api/v2/transactions/multidocument/commit`, + parameters: {} + }); + var strClientId = + this.appNM + + '; ' + + this.appVer + + '; JavascriptSdk; ' + this.apiVersion + '; ' + + this.machineNM; return this.restCall({ url: path, verb: 'post', payload: model, clientId: strClientId }, Models.MultiDocumentModel); - } - - /** - * Create a new MultiDocument transaction + } + + /** + * 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 @@ -10128,33 +10389,33 @@ export default class AvaTaxClient { * ### Security Policies * * * This API requires one of the following user roles: AccountAdmin, AccountOperator, AccountUser, BatchServiceAdmin, CompanyAdmin, CompanyUser, CSPTester, SSTAdmin, TechnicalSupportAdmin, TechnicalSupportUser. - * * This API depends on the following active services:*Required* (all): AvaTaxPro. - * Swagger Name: AvaTaxClient - * + * * 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 {Models.CreateMultiDocumentModel} model the multi document transaction model - * @return {Models.MultiDocumentModel} - */ - - createMultiDocumentTransaction({ include, model }: { include?: string, model: Models.CreateMultiDocumentModel }): Promise { - var path = this.buildUrl({ - url: `/api/v2/transactions/multidocument`, + * @param {Models.CreateMultiDocumentModel} model the multi document transaction model + * @return {Models.MultiDocumentModel} + */ + + createMultiDocumentTransaction({ include, model }: { include?: string, model: Models.CreateMultiDocumentModel }): Promise { + var path = this.buildUrl({ + url: `/api/v2/transactions/multidocument`, parameters: { $include: include } - }); - var strClientId = - this.appNM + - '; ' + - this.appVer + - '; JavascriptSdk; ' + this.apiVersion + '; ' + - this.machineNM; + }); + var strClientId = + this.appNM + + '; ' + + this.appVer + + '; JavascriptSdk; ' + this.apiVersion + '; ' + + this.machineNM; return this.restCall({ url: path, verb: 'post', payload: model, clientId: strClientId }, Models.MultiDocumentModel); - } - - /** - * Retrieve a MultiDocument transaction + } + + /** + * 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. @@ -10179,34 +10440,34 @@ export default class AvaTaxClient { * ### Security Policies * * * This API requires one of the following user roles: AccountAdmin, AccountUser, BatchServiceAdmin, CompanyAdmin, CompanyUser, CSPAdmin, CSPTester, ProStoresOperator, SiteAdmin, SSTAdmin, SystemAdmin, TechnicalSupportAdmin, TechnicalSupportUser. - * * This API depends on the following active services:*Required* (all): AvaTaxPro. - * Swagger Name: AvaTaxClient - * + * * This API depends on the following active services:*Required* (all): AvaTaxPro. + * Swagger Name: AvaTaxClient + * * * @param {string} code The multidocument code to retrieve * @param {Enums.DocumentType} 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 {Models.MultiDocumentModel} - */ - - getMultiDocumentTransactionByCodeAndType({ code, type, include }: { code: string, type: Enums.DocumentType, include?: string }): Promise { - 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 {Models.MultiDocumentModel} + */ + + getMultiDocumentTransactionByCodeAndType({ code, type, include }: { code: string, type: Enums.DocumentType, include?: string }): Promise { + var path = this.buildUrl({ + url: `/api/v2/transactions/multidocument/${code}/type/${type}`, parameters: { $include: include } - }); - var strClientId = - this.appNM + - '; ' + - this.appVer + - '; JavascriptSdk; ' + this.apiVersion + '; ' + - this.machineNM; + }); + var strClientId = + this.appNM + + '; ' + + this.appVer + + '; JavascriptSdk; ' + this.apiVersion + '; ' + + this.machineNM; return this.restCall({ url: path, verb: 'get', payload: null, clientId: strClientId }, Models.MultiDocumentModel); - } - - /** - * Retrieve a MultiDocument transaction by ID + } + + /** + * 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 @@ -10240,33 +10501,33 @@ export default class AvaTaxClient { * ### Security Policies * * * This API requires one of the following user roles: AccountAdmin, AccountUser, BatchServiceAdmin, CompanyAdmin, CompanyUser, CSPAdmin, CSPTester, ProStoresOperator, SiteAdmin, SSTAdmin, SystemAdmin, TechnicalSupportAdmin, TechnicalSupportUser. - * * This API depends on the following active services:*Required* (all): AvaTaxPro. - * Swagger Name: AvaTaxClient - * + * * This API depends on the following active services:*Required* (all): AvaTaxPro. + * Swagger Name: AvaTaxClient + * * * @param {number} 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 {Models.MultiDocumentModel} - */ - - getMultiDocumentTransactionById({ id, include }: { id: number, include?: string }): Promise { - 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 {Models.MultiDocumentModel} + */ + + getMultiDocumentTransactionById({ id, include }: { id: number, include?: string }): Promise { + var path = this.buildUrl({ + url: `/api/v2/transactions/multidocument/${id}`, parameters: { $include: include } - }); - var strClientId = - this.appNM + - '; ' + - this.appVer + - '; JavascriptSdk; ' + this.apiVersion + '; ' + - this.machineNM; + }); + var strClientId = + this.appNM + + '; ' + + this.appVer + + '; JavascriptSdk; ' + this.apiVersion + '; ' + + this.machineNM; return this.restCall({ url: path, verb: 'get', payload: null, clientId: strClientId }, Models.MultiDocumentModel); - } - - /** - * Retrieve all MultiDocument transactions + } + + /** + * 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 @@ -10298,21 +10559,21 @@ export default class AvaTaxClient { * ### Security Policies * * * This API requires one of the following user roles: AccountAdmin, AccountUser, BatchServiceAdmin, CompanyAdmin, CompanyUser, CSPAdmin, CSPTester, ProStoresOperator, SiteAdmin, SSTAdmin, SystemAdmin, TechnicalSupportAdmin, TechnicalSupportUser. - * * This API depends on the following active services:*Required* (all): AvaTaxPro. - * Swagger Name: AvaTaxClient - * + * * 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 {number} top If nonzero, return no more than this number of results. Used with `$skip` to provide pagination for large datasets. Unless otherwise specified, the maximum number of records that can be returned from an API call is 1,000 records. * @param {number} skip If nonzero, skip this number of results before returning data. Used with `$top` to provide pagination for large datasets. - * @param {string} orderBy A comma separated list of sort statements in the format `(fieldname) [ASC|DESC]`, for example `id ASC`. - * @return {FetchResult} - */ - - listMultiDocumentTransactions({ filter, include, top, skip, orderBy }: { filter?: string, include?: string, top?: number, skip?: number, orderBy?: string }): Promise> { - 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 }: { filter?: string, include?: string, top?: number, skip?: number, orderBy?: string }): Promise> { + var path = this.buildUrl({ + url: `/api/v2/transactions/multidocument`, parameters: { $filter: filter, $include: include, @@ -10320,18 +10581,18 @@ export default class AvaTaxClient { $skip: skip, $orderBy: orderBy } - }); - var strClientId = - this.appNM + - '; ' + - this.appVer + - '; JavascriptSdk; ' + this.apiVersion + '; ' + - this.machineNM; + }); + var strClientId = + this.appNM + + '; ' + + this.appVer + + '; JavascriptSdk; ' + this.apiVersion + '; ' + + this.machineNM; return this.restCall({ url: path, verb: 'get', payload: null, clientId: strClientId }, FetchResult); - } - - /** - * Create a refund for a MultiDocument transaction + } + + /** + * 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 @@ -10380,35 +10641,35 @@ export default class AvaTaxClient { * ### Security Policies * * * This API requires one of the following user roles: AccountAdmin, AccountOperator, AccountUser, BatchServiceAdmin, CompanyAdmin, CompanyUser, CSPTester, SSTAdmin, TechnicalSupportAdmin, TechnicalSupportUser. - * * This API depends on the following active services:*Required* (all): AvaTaxPro. - * Swagger Name: AvaTaxClient - * + * * This API depends on the following active services:*Required* (all): AvaTaxPro. + * Swagger Name: AvaTaxClient + * * * @param {string} code The code of this MultiDocument transaction * @param {Enums.DocumentType} 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 {Models.RefundTransactionModel} model Information about the refund to create - * @return {Models.MultiDocumentModel} - */ - - refundMultiDocumentTransaction({ code, type, include, model }: { code: string, type: Enums.DocumentType, include?: string, model: Models.RefundTransactionModel }): Promise { - var path = this.buildUrl({ - url: `/api/v2/transactions/multidocument/${code}/type/${type}/refund`, + * @param {Models.RefundTransactionModel} model Information about the refund to create + * @return {Models.MultiDocumentModel} + */ + + refundMultiDocumentTransaction({ code, type, include, model }: { code: string, type: Enums.DocumentType, include?: string, model: Models.RefundTransactionModel }): Promise { + var path = this.buildUrl({ + url: `/api/v2/transactions/multidocument/${code}/type/${type}/refund`, parameters: { $include: include } - }); - var strClientId = - this.appNM + - '; ' + - this.appVer + - '; JavascriptSdk; ' + this.apiVersion + '; ' + - this.machineNM; + }); + var strClientId = + this.appNM + + '; ' + + this.appVer + + '; JavascriptSdk; ' + this.apiVersion + '; ' + + this.machineNM; return this.restCall({ url: path, verb: 'post', payload: model, clientId: strClientId }, Models.MultiDocumentModel); - } - - /** - * Verify a MultiDocument transaction + } + + /** + * 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. @@ -10427,30 +10688,30 @@ export default class AvaTaxClient { * ### Security Policies * * * This API requires one of the following user roles: AccountAdmin, AccountUser, BatchServiceAdmin, CompanyAdmin, CompanyUser, CSPAdmin, CSPTester, ProStoresOperator, SiteAdmin, SSTAdmin, SystemAdmin, TechnicalSupportAdmin, TechnicalSupportUser. - * * This API depends on the following active services:*Required* (all): AvaTaxPro. - * Swagger Name: AvaTaxClient - * - * - * @param {Models.VerifyMultiDocumentModel} model Information from your accounting system to verify against this MultiDocument transaction as it is stored in AvaTax - * @return {Models.MultiDocumentModel} - */ - - verifyMultiDocumentTransaction({ model }: { model: Models.VerifyMultiDocumentModel }): Promise { - var path = this.buildUrl({ - url: `/api/v2/transactions/multidocument/verify`, - parameters: {} - }); - var strClientId = - this.appNM + - '; ' + - this.appVer + - '; JavascriptSdk; ' + this.apiVersion + '; ' + - this.machineNM; + * * This API depends on the following active services:*Required* (all): AvaTaxPro. + * Swagger Name: AvaTaxClient + * + * + * @param {Models.VerifyMultiDocumentModel} model Information from your accounting system to verify against this MultiDocument transaction as it is stored in AvaTax + * @return {Models.MultiDocumentModel} + */ + + verifyMultiDocumentTransaction({ model }: { model: Models.VerifyMultiDocumentModel }): Promise { + var path = this.buildUrl({ + url: `/api/v2/transactions/multidocument/verify`, + parameters: {} + }); + var strClientId = + this.appNM + + '; ' + + this.appVer + + '; JavascriptSdk; ' + this.apiVersion + '; ' + + this.machineNM; return this.restCall({ url: path, verb: 'post', payload: model, clientId: strClientId }, Models.MultiDocumentModel); - } - - /** - * Void a MultiDocument transaction + } + + /** + * 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 @@ -10472,32 +10733,32 @@ export default class AvaTaxClient { * ### Security Policies * * * This API requires one of the following user roles: AccountAdmin, AccountOperator, BatchServiceAdmin, CompanyAdmin, CSPTester, ProStoresOperator, SSTAdmin, TechnicalSupportAdmin. - * * This API depends on the following active services:*Required* (all): AvaTaxPro. - * Swagger Name: AvaTaxClient - * + * * 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 {Enums.DocumentType} type The transaction type for this MultiDocument transaction (See DocumentType::* for a list of allowable values) - * @param {Models.VoidTransactionModel} model The void request you wish to execute - * @return {Models.MultiDocumentModel} - */ - - voidMultiDocumentTransaction({ code, type, model }: { code: string, type: Enums.DocumentType, model: Models.VoidTransactionModel }): Promise { - var path = this.buildUrl({ - url: `/api/v2/transactions/multidocument/${code}/type/${type}/void`, - parameters: {} - }); - var strClientId = - this.appNM + - '; ' + - this.appVer + - '; JavascriptSdk; ' + this.apiVersion + '; ' + - this.machineNM; + * @param {Models.VoidTransactionModel} model The void request you wish to execute + * @return {Models.MultiDocumentModel} + */ + + voidMultiDocumentTransaction({ code, type, model }: { code: string, type: Enums.DocumentType, model: Models.VoidTransactionModel }): Promise { + var path = this.buildUrl({ + url: `/api/v2/transactions/multidocument/${code}/type/${type}/void`, + parameters: {} + }); + var strClientId = + this.appNM + + '; ' + + this.appVer + + '; JavascriptSdk; ' + this.apiVersion + '; ' + + this.machineNM; return this.restCall({ url: path, verb: 'post', payload: model, clientId: strClientId }, Models.MultiDocumentModel); - } - - /** - * Create a new nexus + } + + /** + * 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 @@ -10520,31 +10781,31 @@ export default class AvaTaxClient { * * ### Security Policies * - * * This API requires one of the following user roles: AccountAdmin, BatchServiceAdmin, CompanyAdmin, CSPTester, SSTAdmin, TechnicalSupportAdmin. - * Swagger Name: AvaTaxClient - * + * * This API requires one of the following user roles: AccountAdmin, BatchServiceAdmin, CompanyAdmin, CSPTester, SSTAdmin, TechnicalSupportAdmin. + * Swagger Name: AvaTaxClient + * * * @param {number} companyId The ID of the company that owns this nexus. - * @param {Models.NexusModel[]} model The nexus you wish to create. - * @return {Models.NexusModel[]} - */ - - createNexus({ companyId, model }: { companyId: number, model: Models.NexusModel[] }): Promise> { - var path = this.buildUrl({ - url: `/api/v2/companies/${companyId}/nexus`, - parameters: {} - }); - var strClientId = - this.appNM + - '; ' + - this.appVer + - '; JavascriptSdk; ' + this.apiVersion + '; ' + - this.machineNM; + * @param {Models.NexusModel[]} model The nexus you wish to create. + * @return {Models.NexusModel[]} + */ + + createNexus({ companyId, model }: { companyId: number, model: Models.NexusModel[] }): Promise> { + var path = this.buildUrl({ + url: `/api/v2/companies/${companyId}/nexus`, + parameters: {} + }); + var strClientId = + this.appNM + + '; ' + + this.appVer + + '; JavascriptSdk; ' + this.apiVersion + '; ' + + this.machineNM; return this.restCall({ url: path, verb: 'post', payload: model, clientId: strClientId }, Array); - } - - /** - * Add parameters to a nexus. + } + + /** + * 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". * @@ -10558,32 +10819,32 @@ export default class AvaTaxClient { * * ### Security Policies * - * * This API requires one of the following user roles: AccountAdmin, BatchServiceAdmin, CompanyAdmin, CSPTester, SSTAdmin, TechnicalSupportAdmin. - * Swagger Name: AvaTaxClient - * + * * This API requires one of the following user roles: AccountAdmin, BatchServiceAdmin, CompanyAdmin, CSPTester, SSTAdmin, TechnicalSupportAdmin. + * Swagger Name: AvaTaxClient + * * * @param {number} companyId The ID of the company that owns this nexus parameter. * @param {number} nexusId The nexus id. - * @param {Models.NexusParameterDetailModel[]} model The nexus parameters you wish to create. - * @return {Models.NexusParameterDetailModel[]} - */ - - createNexusParameters({ companyId, nexusId, model }: { companyId: number, nexusId: number, model: Models.NexusParameterDetailModel[] }): Promise> { - var path = this.buildUrl({ - url: `/api/v2/companies/${companyId}/nexus/${nexusId}/parameters`, - parameters: {} - }); - var strClientId = - this.appNM + - '; ' + - this.appVer + - '; JavascriptSdk; ' + this.apiVersion + '; ' + - this.machineNM; + * @param {Models.NexusParameterDetailModel[]} model The nexus parameters you wish to create. + * @return {Models.NexusParameterDetailModel[]} + */ + + createNexusParameters({ companyId, nexusId, model }: { companyId: number, nexusId: number, model: Models.NexusParameterDetailModel[] }): Promise> { + var path = this.buildUrl({ + url: `/api/v2/companies/${companyId}/nexus/${nexusId}/parameters`, + parameters: {} + }); + var strClientId = + this.appNM + + '; ' + + this.appVer + + '; JavascriptSdk; ' + this.apiVersion + '; ' + + this.machineNM; return this.restCall({ url: path, verb: 'post', payload: model, clientId: strClientId }, Array); - } - - /** - * Creates nexus for a list of addresses. + } + + /** + * 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. @@ -10602,31 +10863,31 @@ export default class AvaTaxClient { * * ### Security Policies * - * * This API requires one of the following user roles: AccountAdmin, BatchServiceAdmin, CompanyAdmin, CSPTester, SSTAdmin, TechnicalSupportAdmin. - * Swagger Name: AvaTaxClient - * + * * This API requires one of the following user roles: AccountAdmin, BatchServiceAdmin, CompanyAdmin, CSPTester, SSTAdmin, TechnicalSupportAdmin. + * Swagger Name: AvaTaxClient + * * * @param {number} companyId The ID of the company that will own this nexus. - * @param {Models.DeclareNexusByAddressModel[]} model The nexus you wish to create. - * @return {Models.NexusByAddressModel[]} - */ - - declareNexusByAddress({ companyId, model }: { companyId: number, model: Models.DeclareNexusByAddressModel[] }): Promise> { - var path = this.buildUrl({ - url: `/api/v2/companies/${companyId}/nexus/byaddress`, - parameters: {} - }); - var strClientId = - this.appNM + - '; ' + - this.appVer + - '; JavascriptSdk; ' + this.apiVersion + '; ' + - this.machineNM; + * @param {Models.DeclareNexusByAddressModel[]} model The nexus you wish to create. + * @return {Models.NexusByAddressModel[]} + */ + + declareNexusByAddress({ companyId, model }: { companyId: number, model: Models.DeclareNexusByAddressModel[] }): Promise> { + var path = this.buildUrl({ + url: `/api/v2/companies/${companyId}/nexus/byaddress`, + parameters: {} + }); + var strClientId = + this.appNM + + '; ' + + this.appVer + + '; JavascriptSdk; ' + this.apiVersion + '; ' + + this.machineNM; return this.restCall({ url: path, verb: 'post', payload: model, clientId: strClientId }, Array); - } - - /** - * Delete a single nexus + } + + /** + * 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 @@ -10638,34 +10899,34 @@ export default class AvaTaxClient { * * ### Security Policies * - * * This API requires one of the following user roles: AccountAdmin, BatchServiceAdmin, CompanyAdmin, CSPTester, SSTAdmin, TechnicalSupportAdmin. - * Swagger Name: AvaTaxClient - * + * * This API requires one of the following user roles: AccountAdmin, BatchServiceAdmin, CompanyAdmin, CSPTester, SSTAdmin, TechnicalSupportAdmin. + * Swagger Name: AvaTaxClient + * * * @param {number} companyId The ID of the company that owns this nexus. * @param {number} 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 {Models.ErrorDetail[]} - */ - - deleteNexus({ companyId, id, cascadeDelete }: { companyId: number, id: number, cascadeDelete?: boolean }): Promise> { - 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 {Models.ErrorDetail[]} + */ + + deleteNexus({ companyId, id, cascadeDelete }: { companyId: number, id: number, cascadeDelete?: boolean }): Promise> { + var path = this.buildUrl({ + url: `/api/v2/companies/${companyId}/nexus/${id}`, parameters: { cascadeDelete: cascadeDelete } - }); - var strClientId = - this.appNM + - '; ' + - this.appVer + - '; JavascriptSdk; ' + this.apiVersion + '; ' + - this.machineNM; + }); + var strClientId = + this.appNM + + '; ' + + this.appVer + + '; JavascriptSdk; ' + this.apiVersion + '; ' + + this.machineNM; return this.restCall({ url: path, verb: 'delete', payload: null, clientId: strClientId }, Array); - } - - /** - * Delete a single nexus parameter + } + + /** + * 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". * @@ -10675,32 +10936,32 @@ export default class AvaTaxClient { * * ### Security Policies * - * * This API requires one of the following user roles: AccountAdmin, BatchServiceAdmin, CompanyAdmin, CSPTester, SSTAdmin, TechnicalSupportAdmin. - * Swagger Name: AvaTaxClient - * + * * This API requires one of the following user roles: AccountAdmin, BatchServiceAdmin, CompanyAdmin, CSPTester, SSTAdmin, TechnicalSupportAdmin. + * Swagger Name: AvaTaxClient + * * * @param {number} companyId The company id * @param {number} nexusId The nexus id - * @param {number} id The parameter id - * @return {Models.ErrorDetail[]} - */ - - deleteNexusParameter({ companyId, nexusId, id }: { companyId: number, nexusId: number, id: number }): Promise> { - var path = this.buildUrl({ - url: `/api/v2/companies/${companyId}/nexus/${nexusId}/parameters/${id}`, - parameters: {} - }); - var strClientId = - this.appNM + - '; ' + - this.appVer + - '; JavascriptSdk; ' + this.apiVersion + '; ' + - this.machineNM; + * @param {number} id The parameter id + * @return {Models.ErrorDetail[]} + */ + + deleteNexusParameter({ companyId, nexusId, id }: { companyId: number, nexusId: number, id: number }): Promise> { + var path = this.buildUrl({ + url: `/api/v2/companies/${companyId}/nexus/${nexusId}/parameters/${id}`, + parameters: {} + }); + var strClientId = + this.appNM + + '; ' + + this.appVer + + '; JavascriptSdk; ' + this.apiVersion + '; ' + + this.machineNM; return this.restCall({ url: path, verb: 'delete', payload: null, clientId: strClientId }, Array); - } - - /** - * Delete all parameters for an nexus + } + + /** + * 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". * @@ -10710,31 +10971,31 @@ export default class AvaTaxClient { * * ### Security Policies * - * * This API requires one of the following user roles: AccountAdmin, BatchServiceAdmin, CompanyAdmin, CSPTester, SSTAdmin, TechnicalSupportAdmin. - * Swagger Name: AvaTaxClient - * + * * This API requires one of the following user roles: AccountAdmin, BatchServiceAdmin, CompanyAdmin, CSPTester, SSTAdmin, TechnicalSupportAdmin. + * Swagger Name: AvaTaxClient + * * * @param {number} companyId The ID of the company that owns this nexus. - * @param {number} nexusId The ID of the nexus you wish to delete the parameters. - * @return {Models.ErrorDetail[]} - */ - - deleteNexusParameters({ companyId, nexusId }: { companyId: number, nexusId: number }): Promise> { - var path = this.buildUrl({ - url: `/api/v2/companies/${companyId}/nexus/${nexusId}/parameters`, - parameters: {} - }); - var strClientId = - this.appNM + - '; ' + - this.appVer + - '; JavascriptSdk; ' + this.apiVersion + '; ' + - this.machineNM; + * @param {number} nexusId The ID of the nexus you wish to delete the parameters. + * @return {Models.ErrorDetail[]} + */ + + deleteNexusParameters({ companyId, nexusId }: { companyId: number, nexusId: number }): Promise> { + var path = this.buildUrl({ + url: `/api/v2/companies/${companyId}/nexus/${nexusId}/parameters`, + parameters: {} + }); + var strClientId = + this.appNM + + '; ' + + this.appVer + + '; JavascriptSdk; ' + this.apiVersion + '; ' + + this.machineNM; return this.restCall({ url: path, verb: 'delete', payload: null, clientId: strClientId }, Array); - } - - /** - * Retrieve a single nexus + } + + /** + * 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 @@ -10746,34 +11007,34 @@ export default class AvaTaxClient { * * ### Security Policies * - * * This API requires one of the following user roles: AccountAdmin, AccountUser, BatchServiceAdmin, CompanyAdmin, CompanyUser, Compliance Root User, ComplianceAdmin, ComplianceUser, CSPAdmin, CSPTester, FirmAdmin, FirmUser, SiteAdmin, SSTAdmin, SystemAdmin, TechnicalSupportAdmin, TechnicalSupportUser. - * Swagger Name: AvaTaxClient - * + * * This API requires one of the following user roles: AccountAdmin, AccountUser, BatchServiceAdmin, CompanyAdmin, CompanyUser, Compliance Root User, ComplianceAdmin, ComplianceUser, CSPAdmin, CSPTester, FirmAdmin, FirmUser, SiteAdmin, SSTAdmin, SystemAdmin, TechnicalSupportAdmin, TechnicalSupportUser. + * Swagger Name: AvaTaxClient + * * * @param {number} companyId The ID of the company that owns this nexus object * @param {number} id The primary key of this nexus - * @param {string} include - * @return {Models.NexusModel} - */ - - getNexus({ companyId, id, include }: { companyId: number, id: number, include?: string }): Promise { - var path = this.buildUrl({ - url: `/api/v2/companies/${companyId}/nexus/${id}`, + * @param {string} include + * @return {Models.NexusModel} + */ + + getNexus({ companyId, id, include }: { companyId: number, id: number, include?: string }): Promise { + var path = this.buildUrl({ + url: `/api/v2/companies/${companyId}/nexus/${id}`, parameters: { $include: include } - }); - var strClientId = - this.appNM + - '; ' + - this.appVer + - '; JavascriptSdk; ' + this.apiVersion + '; ' + - this.machineNM; + }); + var strClientId = + this.appNM + + '; ' + + this.appVer + + '; JavascriptSdk; ' + this.apiVersion + '; ' + + this.machineNM; return this.restCall({ url: path, verb: 'get', payload: null, clientId: strClientId }, Models.NexusModel); - } - - /** - * List company nexus related to a tax form + } + + /** + * 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 @@ -10789,34 +11050,34 @@ export default class AvaTaxClient { * * ### Security Policies * - * * This API requires one of the following user roles: AccountAdmin, AccountUser, BatchServiceAdmin, CompanyAdmin, CompanyUser, Compliance Root User, ComplianceAdmin, ComplianceUser, CSPAdmin, CSPTester, FirmAdmin, FirmUser, SiteAdmin, SSTAdmin, SystemAdmin, TechnicalSupportAdmin, TechnicalSupportUser. - * Swagger Name: AvaTaxClient - * + * * This API requires one of the following user roles: AccountAdmin, AccountUser, BatchServiceAdmin, CompanyAdmin, CompanyUser, Compliance Root User, ComplianceAdmin, ComplianceUser, CSPAdmin, CSPTester, FirmAdmin, FirmUser, SiteAdmin, SSTAdmin, SystemAdmin, TechnicalSupportAdmin, TechnicalSupportUser. + * Swagger Name: AvaTaxClient + * * * @param {number} 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 {Models.NexusByTaxFormModel} - */ - - getNexusByFormCode({ companyId, formCode, include }: { companyId: number, formCode: string, include?: string }): Promise { - var path = this.buildUrl({ - url: `/api/v2/companies/${companyId}/nexus/byform/${formCode}`, + * @param {string} include + * @return {Models.NexusByTaxFormModel} + */ + + getNexusByFormCode({ companyId, formCode, include }: { companyId: number, formCode: string, include?: string }): Promise { + var path = this.buildUrl({ + url: `/api/v2/companies/${companyId}/nexus/byform/${formCode}`, parameters: { $include: include } - }); - var strClientId = - this.appNM + - '; ' + - this.appVer + - '; JavascriptSdk; ' + this.apiVersion + '; ' + - this.machineNM; + }); + var strClientId = + this.appNM + + '; ' + + this.appVer + + '; JavascriptSdk; ' + this.apiVersion + '; ' + + this.machineNM; return this.restCall({ url: path, verb: 'get', payload: null, clientId: strClientId }, Models.NexusByTaxFormModel); - } - - /** - * Retrieve a single nexus parameter + } + + /** + * 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". * @@ -10826,32 +11087,32 @@ export default class AvaTaxClient { * * ### Security Policies * - * * This API requires one of the following user roles: AccountAdmin, AccountUser, BatchServiceAdmin, CompanyAdmin, CompanyUser, Compliance Root User, ComplianceAdmin, ComplianceUser, CSPAdmin, CSPTester, FirmAdmin, FirmUser, SiteAdmin, SSTAdmin, SystemAdmin, TechnicalSupportAdmin, TechnicalSupportUser. - * Swagger Name: AvaTaxClient - * + * * This API requires one of the following user roles: AccountAdmin, AccountUser, BatchServiceAdmin, CompanyAdmin, CompanyUser, Compliance Root User, ComplianceAdmin, ComplianceUser, CSPAdmin, CSPTester, FirmAdmin, FirmUser, SiteAdmin, SSTAdmin, SystemAdmin, TechnicalSupportAdmin, TechnicalSupportUser. + * Swagger Name: AvaTaxClient + * * * @param {number} companyId The company id * @param {number} nexusId The nexus id - * @param {number} id The parameter id - * @return {Models.NexusParameterDetailModel} - */ - - getNexusParameter({ companyId, nexusId, id }: { companyId: number, nexusId: number, id: number }): Promise { - var path = this.buildUrl({ - url: `/api/v2/companies/${companyId}/nexus/${nexusId}/parameters/${id}`, - parameters: {} - }); - var strClientId = - this.appNM + - '; ' + - this.appVer + - '; JavascriptSdk; ' + this.apiVersion + '; ' + - this.machineNM; + * @param {number} id The parameter id + * @return {Models.NexusParameterDetailModel} + */ + + getNexusParameter({ companyId, nexusId, id }: { companyId: number, nexusId: number, id: number }): Promise { + var path = this.buildUrl({ + url: `/api/v2/companies/${companyId}/nexus/${nexusId}/parameters/${id}`, + parameters: {} + }); + var strClientId = + this.appNM + + '; ' + + this.appVer + + '; JavascriptSdk; ' + this.apiVersion + '; ' + + this.machineNM; return this.restCall({ url: path, verb: 'get', payload: null, clientId: strClientId }, Models.NexusParameterDetailModel); - } - - /** - * Retrieve nexus for this company + } + + /** + * 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 @@ -10866,22 +11127,22 @@ export default class AvaTaxClient { * * ### Security Policies * - * * This API requires one of the following user roles: AccountAdmin, AccountUser, BatchServiceAdmin, CompanyAdmin, CompanyUser, Compliance Root User, ComplianceAdmin, ComplianceUser, CSPAdmin, CSPTester, FirmAdmin, FirmUser, SiteAdmin, SSTAdmin, SystemAdmin, TechnicalSupportAdmin, TechnicalSupportUser. - * Swagger Name: AvaTaxClient - * + * * This API requires one of the following user roles: AccountAdmin, AccountUser, BatchServiceAdmin, CompanyAdmin, CompanyUser, Compliance Root User, ComplianceAdmin, ComplianceUser, CSPAdmin, CSPTester, FirmAdmin, FirmUser, SiteAdmin, SSTAdmin, SystemAdmin, TechnicalSupportAdmin, TechnicalSupportUser. + * Swagger Name: AvaTaxClient + * * * @param {number} 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 * @param {string} include A comma separated list of additional data to retrieve. * @param {number} top If nonzero, return no more than this number of results. Used with `$skip` to provide pagination for large datasets. Unless otherwise specified, the maximum number of records that can be returned from an API call is 1,000 records. * @param {number} skip If nonzero, skip this number of results before returning data. Used with `$top` to provide pagination for large datasets. - * @param {string} orderBy A comma separated list of sort statements in the format `(fieldname) [ASC|DESC]`, for example `id ASC`. - * @return {FetchResult} - */ - - listNexusByCompany({ companyId, filter, include, top, skip, orderBy }: { companyId: number, filter?: string, include?: string, top?: number, skip?: number, orderBy?: string }): Promise> { - var path = this.buildUrl({ - url: `/api/v2/companies/${companyId}/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 }: { companyId: number, filter?: string, include?: string, top?: number, skip?: number, orderBy?: string }): Promise> { + var path = this.buildUrl({ + url: `/api/v2/companies/${companyId}/nexus`, parameters: { $filter: filter, $include: include, @@ -10889,18 +11150,18 @@ export default class AvaTaxClient { $skip: skip, $orderBy: orderBy } - }); - var strClientId = - this.appNM + - '; ' + - this.appVer + - '; JavascriptSdk; ' + this.apiVersion + '; ' + - this.machineNM; + }); + var strClientId = + this.appNM + + '; ' + + this.appVer + + '; JavascriptSdk; ' + this.apiVersion + '; ' + + this.machineNM; return this.restCall({ url: path, verb: 'get', payload: null, clientId: strClientId }, FetchResult); - } - - /** - * Retrieve nexus for this company By TaxTypeGroup + } + + /** + * 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 @@ -10915,9 +11176,9 @@ export default class AvaTaxClient { * * ### Security Policies * - * * This API requires one of the following user roles: AccountAdmin, AccountUser, BatchServiceAdmin, CompanyAdmin, CompanyUser, Compliance Root User, ComplianceAdmin, ComplianceUser, CSPAdmin, CSPTester, FirmAdmin, FirmUser, SiteAdmin, SSTAdmin, SystemAdmin, TechnicalSupportAdmin, TechnicalSupportUser. - * Swagger Name: AvaTaxClient - * + * * This API requires one of the following user roles: AccountAdmin, AccountUser, BatchServiceAdmin, CompanyAdmin, CompanyUser, Compliance Root User, ComplianceAdmin, ComplianceUser, CSPAdmin, CSPTester, FirmAdmin, FirmUser, SiteAdmin, SSTAdmin, SystemAdmin, TechnicalSupportAdmin, TechnicalSupportUser. + * Swagger Name: AvaTaxClient + * * * @param {number} companyId The ID of the company that owns these nexus objects * @param {string} taxTypeGroup Name of TaxTypeGroup to filter by @@ -10925,13 +11186,13 @@ export default class AvaTaxClient { * @param {string} include A comma separated list of additional data to retrieve. * @param {number} top If nonzero, return no more than this number of results. Used with `$skip` to provide pagination for large datasets. Unless otherwise specified, the maximum number of records that can be returned from an API call is 1,000 records. * @param {number} skip If nonzero, skip this number of results before returning data. Used with `$top` to provide pagination for large datasets. - * @param {string} orderBy A comma separated list of sort statements in the format `(fieldname) [ASC|DESC]`, for example `id ASC`. - * @return {FetchResult} - */ - - listNexusByCompanyAndTaxTypeGroup({ companyId, taxTypeGroup, filter, include, top, skip, orderBy }: { companyId: number, taxTypeGroup: string, filter?: string, include?: string, top?: number, skip?: number, orderBy?: string }): Promise> { - 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 }: { companyId: number, taxTypeGroup: string, filter?: string, include?: string, top?: number, skip?: number, orderBy?: string }): Promise> { + var path = this.buildUrl({ + url: `/api/v2/companies/${companyId}/nexus/byTaxTypeGroup/${taxTypeGroup}`, parameters: { $filter: filter, $include: include, @@ -10939,18 +11200,18 @@ export default class AvaTaxClient { $skip: skip, $orderBy: orderBy } - }); - var strClientId = - this.appNM + - '; ' + - this.appVer + - '; JavascriptSdk; ' + this.apiVersion + '; ' + - this.machineNM; + }); + var strClientId = + this.appNM + + '; ' + + this.appVer + + '; JavascriptSdk; ' + this.apiVersion + '; ' + + this.machineNM; return this.restCall({ url: path, verb: 'get', payload: null, clientId: strClientId }, FetchResult); - } - - /** - * Retrieve parameters for a nexus + } + + /** + * 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". * @@ -10963,40 +11224,40 @@ export default class AvaTaxClient { * * ### Security Policies * - * * This API requires one of the following user roles: AccountAdmin, AccountUser, BatchServiceAdmin, CompanyAdmin, CompanyUser, Compliance Root User, ComplianceAdmin, ComplianceUser, CSPAdmin, CSPTester, FirmAdmin, FirmUser, SiteAdmin, SSTAdmin, SystemAdmin, TechnicalSupportAdmin, TechnicalSupportUser. - * Swagger Name: AvaTaxClient - * + * * This API requires one of the following user roles: AccountAdmin, AccountUser, BatchServiceAdmin, CompanyAdmin, CompanyUser, Compliance Root User, ComplianceAdmin, ComplianceUser, CSPAdmin, CSPTester, FirmAdmin, FirmUser, SiteAdmin, SSTAdmin, SystemAdmin, TechnicalSupportAdmin, TechnicalSupportUser. + * Swagger Name: AvaTaxClient + * * * @param {number} companyId The company id * @param {number} 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 {number} top If nonzero, return no more than this number of results. Used with `$skip` to provide pagination for large datasets. Unless otherwise specified, the maximum number of records that can be returned from an API call is 1,000 records. * @param {number} skip If nonzero, skip this number of results before returning data. Used with `$top` to provide pagination for large datasets. - * @param {string} orderBy A comma separated list of sort statements in the format `(fieldname) [ASC|DESC]`, for example `id ASC`. - * @return {FetchResult} - */ - - listNexusParameters({ companyId, nexusId, filter, top, skip, orderBy }: { companyId: number, nexusId: number, filter?: string, top?: number, skip?: number, orderBy?: string }): Promise> { - 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 }: { companyId: number, nexusId: number, filter?: string, top?: number, skip?: number, orderBy?: string }): Promise> { + var path = this.buildUrl({ + url: `/api/v2/companies/${companyId}/nexus/${nexusId}/parameters`, parameters: { $filter: filter, $top: top, $skip: skip, $orderBy: orderBy } - }); - var strClientId = - this.appNM + - '; ' + - this.appVer + - '; JavascriptSdk; ' + this.apiVersion + '; ' + - this.machineNM; + }); + var strClientId = + this.appNM + + '; ' + + this.appVer + + '; JavascriptSdk; ' + this.apiVersion + '; ' + + this.machineNM; return this.restCall({ url: path, verb: 'get', payload: null, clientId: strClientId }, FetchResult); - } - - /** - * Retrieve all nexus + } + + /** + * 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 @@ -11011,21 +11272,21 @@ export default class AvaTaxClient { * * ### Security Policies * - * * This API requires one of the following user roles: AccountAdmin, AccountUser, BatchServiceAdmin, CompanyAdmin, CompanyUser, Compliance Root User, ComplianceAdmin, ComplianceUser, CSPAdmin, CSPTester, FirmAdmin, FirmUser, SiteAdmin, SSTAdmin, SystemAdmin, TechnicalSupportAdmin, TechnicalSupportUser. - * Swagger Name: AvaTaxClient - * + * * This API requires one of the following user roles: AccountAdmin, AccountUser, BatchServiceAdmin, 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 * @param {string} include A comma separated list of additional data to retrieve. * @param {number} top If nonzero, return no more than this number of results. Used with `$skip` to provide pagination for large datasets. Unless otherwise specified, the maximum number of records that can be returned from an API call is 1,000 records. * @param {number} skip If nonzero, skip this number of results before returning data. Used with `$top` to provide pagination for large datasets. - * @param {string} orderBy A comma separated list of sort statements in the format `(fieldname) [ASC|DESC]`, for example `id ASC`. - * @return {FetchResult} - */ - - queryNexus({ filter, include, top, skip, orderBy }: { filter?: string, include?: string, top?: number, skip?: number, orderBy?: string }): Promise> { - 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 }: { filter?: string, include?: string, top?: number, skip?: number, orderBy?: string }): Promise> { + var path = this.buildUrl({ + url: `/api/v2/nexus`, parameters: { $filter: filter, $include: include, @@ -11033,18 +11294,18 @@ export default class AvaTaxClient { $skip: skip, $orderBy: orderBy } - }); - var strClientId = - this.appNM + - '; ' + - this.appVer + - '; JavascriptSdk; ' + this.apiVersion + '; ' + - this.machineNM; + }); + var strClientId = + this.appNM + + '; ' + + this.appVer + + '; JavascriptSdk; ' + this.apiVersion + '; ' + + this.machineNM; return this.restCall({ url: path, verb: 'get', payload: null, clientId: strClientId }, FetchResult); - } - - /** - * Update a single nexus + } + + /** + * 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 @@ -11067,32 +11328,32 @@ export default class AvaTaxClient { * * ### Security Policies * - * * This API requires one of the following user roles: AccountAdmin, BatchServiceAdmin, CompanyAdmin, CSPTester, SSTAdmin, TechnicalSupportAdmin. - * Swagger Name: AvaTaxClient - * + * * This API requires one of the following user roles: AccountAdmin, BatchServiceAdmin, CompanyAdmin, CSPTester, SSTAdmin, TechnicalSupportAdmin. + * Swagger Name: AvaTaxClient + * * * @param {number} companyId The ID of the company that this nexus belongs to. * @param {number} id The ID of the nexus you wish to update - * @param {Models.NexusModel} model The nexus object you wish to update. - * @return {Models.NexusModel} - */ - - updateNexus({ companyId, id, model }: { companyId: number, id: number, model: Models.NexusModel }): Promise { - var path = this.buildUrl({ - url: `/api/v2/companies/${companyId}/nexus/${id}`, - parameters: {} - }); - var strClientId = - this.appNM + - '; ' + - this.appVer + - '; JavascriptSdk; ' + this.apiVersion + '; ' + - this.machineNM; + * @param {Models.NexusModel} model The nexus object you wish to update. + * @return {Models.NexusModel} + */ + + updateNexus({ companyId, id, model }: { companyId: number, id: number, model: Models.NexusModel }): Promise { + var path = this.buildUrl({ + url: `/api/v2/companies/${companyId}/nexus/${id}`, + parameters: {} + }); + var strClientId = + this.appNM + + '; ' + + this.appVer + + '; JavascriptSdk; ' + this.apiVersion + '; ' + + this.machineNM; return this.restCall({ url: path, verb: 'put', payload: model, clientId: strClientId }, Models.NexusModel); - } - - /** - * Update an nexus parameter + } + + /** + * 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". @@ -11103,147 +11364,147 @@ export default class AvaTaxClient { * * ### Security Policies * - * * This API requires one of the following user roles: AccountAdmin, BatchServiceAdmin, CompanyAdmin, CSPTester, SSTAdmin, TechnicalSupportAdmin. - * Swagger Name: AvaTaxClient - * + * * This API requires one of the following user roles: AccountAdmin, BatchServiceAdmin, CompanyAdmin, CSPTester, SSTAdmin, TechnicalSupportAdmin. + * Swagger Name: AvaTaxClient + * * * @param {number} companyId The company id. * @param {number} nexusId The nexus id * @param {number} id The nexus parameter id - * @param {Models.NexusParameterDetailModel} model The nexus object you wish to update. - * @return {Models.NexusParameterDetailModel} - */ - - updateNexusParameter({ companyId, nexusId, id, model }: { companyId: number, nexusId: number, id: number, model: Models.NexusParameterDetailModel }): Promise { - var path = this.buildUrl({ - url: `/api/v2/companies/${companyId}/nexus/${nexusId}/parameters/${id}`, - parameters: {} - }); - var strClientId = - this.appNM + - '; ' + - this.appVer + - '; JavascriptSdk; ' + this.apiVersion + '; ' + - this.machineNM; + * @param {Models.NexusParameterDetailModel} model The nexus object you wish to update. + * @return {Models.NexusParameterDetailModel} + */ + + updateNexusParameter({ companyId, nexusId, id, model }: { companyId: number, nexusId: number, id: number, model: Models.NexusParameterDetailModel }): Promise { + var path = this.buildUrl({ + url: `/api/v2/companies/${companyId}/nexus/${nexusId}/parameters/${id}`, + parameters: {} + }); + var strClientId = + this.appNM + + '; ' + + this.appVer + + '; JavascriptSdk; ' + this.apiVersion + '; ' + + this.machineNM; return this.restCall({ url: path, verb: 'put', payload: model, clientId: strClientId }, Models.NexusParameterDetailModel); - } - - /** - * Creates a new tax notice responsibility type. + } + + /** + * 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, BatchServiceAdmin, 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. - * Swagger Name: AvaTaxClient - * - * - * @param {Models.CreateNoticeResponsibilityTypeModel} model The responsibility type to create - * @return {Models.NoticeResponsibilityModel} - */ - - createNoticeResponsibilityType({ model }: { model: Models.CreateNoticeResponsibilityTypeModel }): Promise { - var path = this.buildUrl({ - url: `/api/v2/notices/responsibilities`, - parameters: {} - }); - var strClientId = - this.appNM + - '; ' + - this.appVer + - '; JavascriptSdk; ' + this.apiVersion + '; ' + - this.machineNM; + * * 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 {Models.CreateNoticeResponsibilityTypeModel} model The responsibility type to create + * @return {Models.NoticeResponsibilityModel} + */ + + createNoticeResponsibilityType({ model }: { model: Models.CreateNoticeResponsibilityTypeModel }): Promise { + var path = this.buildUrl({ + url: `/api/v2/notices/responsibilities`, + parameters: {} + }); + var strClientId = + this.appNM + + '; ' + + this.appVer + + '; JavascriptSdk; ' + this.apiVersion + '; ' + + this.machineNM; return this.restCall({ url: path, verb: 'post', payload: model, clientId: strClientId }, Models.NoticeResponsibilityModel); - } - - /** - * Creates a new tax notice root cause type. + } + + /** + * 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, BatchServiceAdmin, 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. - * Swagger Name: AvaTaxClient - * - * - * @param {Models.CreateNoticeRootCauseTypeModel} model The root cause type to create - * @return {Models.NoticeRootCauseModel} - */ - - createNoticeRootCauseType({ model }: { model: Models.CreateNoticeRootCauseTypeModel }): Promise { - var path = this.buildUrl({ - url: `/api/v2/notices/rootcauses`, - parameters: {} - }); - var strClientId = - this.appNM + - '; ' + - this.appVer + - '; JavascriptSdk; ' + this.apiVersion + '; ' + - this.machineNM; + * * 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 {Models.CreateNoticeRootCauseTypeModel} model The root cause type to create + * @return {Models.NoticeRootCauseModel} + */ + + createNoticeRootCauseType({ model }: { model: Models.CreateNoticeRootCauseTypeModel }): Promise { + var path = this.buildUrl({ + url: `/api/v2/notices/rootcauses`, + parameters: {} + }); + var strClientId = + this.appNM + + '; ' + + this.appVer + + '; JavascriptSdk; ' + this.apiVersion + '; ' + + this.machineNM; return this.restCall({ url: path, verb: 'post', payload: model, clientId: strClientId }, Models.NoticeRootCauseModel); - } - - /** - * Delete a tax notice responsibility type. + } + + /** + * 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, BatchServiceAdmin, CompanyAdmin, Compliance Root User, ComplianceAdmin, ComplianceUser, CSPTester, FirmAdmin, FirmUser, SSTAdmin, TechnicalSupportAdmin, TechnicalSupportUser, TreasuryAdmin, TreasuryUser. - * Swagger Name: AvaTaxClient - * - * - * @param {number} responsibilityId The unique ID of the responsibility type - * @return {Models.ErrorDetail[]} - */ - - deleteNoticeResponsibilityType({ responsibilityId }: { responsibilityId: number }): Promise> { - var path = this.buildUrl({ - url: `/api/v2/notices/responsibilities/${responsibilityId}`, - parameters: {} - }); - var strClientId = - this.appNM + - '; ' + - this.appVer + - '; JavascriptSdk; ' + this.apiVersion + '; ' + - this.machineNM; + * * This API requires one of the following user roles: AccountAdmin, BatchServiceAdmin, CompanyAdmin, Compliance Root User, ComplianceAdmin, ComplianceUser, CSPTester, FirmAdmin, FirmUser, SSTAdmin, TechnicalSupportAdmin, TechnicalSupportUser, TreasuryAdmin, TreasuryUser. + * Swagger Name: AvaTaxClient + * + * + * @param {number} responsibilityId The unique ID of the responsibility type + * @return {Models.ErrorDetail[]} + */ + + deleteNoticeResponsibilityType({ responsibilityId }: { responsibilityId: number }): Promise> { + var path = this.buildUrl({ + url: `/api/v2/notices/responsibilities/${responsibilityId}`, + parameters: {} + }); + var strClientId = + this.appNM + + '; ' + + this.appVer + + '; JavascriptSdk; ' + this.apiVersion + '; ' + + this.machineNM; return this.restCall({ url: path, verb: 'delete', payload: null, clientId: strClientId }, Array); - } - - /** - * Delete a tax notice root cause type. + } + + /** + * 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, BatchServiceAdmin, CompanyAdmin, Compliance Root User, ComplianceAdmin, ComplianceUser, CSPTester, FirmAdmin, FirmUser, SSTAdmin, TechnicalSupportAdmin, TechnicalSupportUser, TreasuryAdmin, TreasuryUser. - * Swagger Name: AvaTaxClient - * - * - * @param {number} rootCauseId The unique ID of the root cause type - * @return {Models.ErrorDetail[]} - */ - - deleteNoticeRootCauseType({ rootCauseId }: { rootCauseId: number }): Promise> { - var path = this.buildUrl({ - url: `/api/v2/notices/rootcauses/${rootCauseId}`, - parameters: {} - }); - var strClientId = - this.appNM + - '; ' + - this.appVer + - '; JavascriptSdk; ' + this.apiVersion + '; ' + - this.machineNM; + * * This API requires one of the following user roles: AccountAdmin, BatchServiceAdmin, CompanyAdmin, Compliance Root User, ComplianceAdmin, ComplianceUser, CSPTester, FirmAdmin, FirmUser, SSTAdmin, TechnicalSupportAdmin, TechnicalSupportUser, TreasuryAdmin, TreasuryUser. + * Swagger Name: AvaTaxClient + * + * + * @param {number} rootCauseId The unique ID of the root cause type + * @return {Models.ErrorDetail[]} + */ + + deleteNoticeRootCauseType({ rootCauseId }: { rootCauseId: number }): Promise> { + var path = this.buildUrl({ + url: `/api/v2/notices/rootcauses/${rootCauseId}`, + parameters: {} + }); + var strClientId = + this.appNM + + '; ' + + this.appVer + + '; JavascriptSdk; ' + this.apiVersion + '; ' + + this.machineNM; return this.restCall({ url: path, verb: 'delete', payload: null, clientId: strClientId }, Array); - } - - /** - * Mark a single notification as dismissed. + } + + /** + * 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 @@ -11261,30 +11522,30 @@ export default class AvaTaxClient { * * ### Security Policies * - * * This API requires one of the following user roles: AccountAdmin, AccountUser, BatchServiceAdmin, CompanyAdmin, CompanyUser, Compliance Root User, ComplianceAdmin, ComplianceUser, CSPAdmin, CSPTester, ECMAccountUser, ECMCompanyUser, FirmAdmin, FirmUser, Registrar, SiteAdmin, SSTAdmin, SystemAdmin, TechnicalSupportAdmin, TechnicalSupportUser, TreasuryAdmin, TreasuryUser. - * Swagger Name: AvaTaxClient - * + * * This API requires one of the following user roles: AccountAdmin, AccountUser, BatchServiceAdmin, CompanyAdmin, CompanyUser, Compliance Root User, ComplianceAdmin, ComplianceUser, CSPAdmin, CSPTester, ECMAccountUser, ECMCompanyUser, FirmAdmin, FirmUser, Registrar, SiteAdmin, SSTAdmin, SystemAdmin, TechnicalSupportAdmin, TechnicalSupportUser, TreasuryAdmin, TreasuryUser. + * Swagger Name: AvaTaxClient + * * - * @param {number} id The id of the notification you wish to mark as dismissed. - * @return {Models.NotificationModel} - */ - - dismissNotification({ id }: { id: number }): Promise { - var path = this.buildUrl({ - url: `/api/v2/notifications/${id}/dismiss`, + * @param {number} id The id of the notification you wish to mark as dismissed. + * @return {Models.NotificationModel} + */ + + dismissNotification({ id }: { id: number }): Promise { + var path = this.buildUrl({ + url: `/api/v2/notifications/${id}/dismiss`, parameters: {} - }); - var strClientId = - this.appNM + - '; ' + - this.appVer + - '; JavascriptSdk; ' + this.apiVersion + '; ' + - this.machineNM; + }); + var strClientId = + this.appNM + + '; ' + + this.appVer + + '; JavascriptSdk; ' + this.apiVersion + '; ' + + this.machineNM; return this.restCall({ url: path, verb: 'put', payload: null, clientId: strClientId }, Models.NotificationModel); - } - - /** - * Retrieve a single notification. + } + + /** + * 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 @@ -11296,30 +11557,30 @@ export default class AvaTaxClient { * * ### Security Policies * - * * This API requires one of the following user roles: AccountAdmin, AccountOperator, AccountUser, BatchServiceAdmin, CompanyAdmin, CompanyUser, Compliance Root User, ComplianceAdmin, ComplianceUser, CSPAdmin, CSPTester, ECMAccountUser, ECMCompanyUser, FirmAdmin, FirmUser, ProStoresOperator, Registrar, SiteAdmin, SSTAdmin, SystemAdmin, TechnicalSupportAdmin, TechnicalSupportUser, TreasuryAdmin, TreasuryUser. - * Swagger Name: AvaTaxClient - * - * - * @param {number} id The id of the notification to retrieve. - * @return {Models.NotificationModel} - */ - - getNotification({ id }: { id: number }): Promise { - var path = this.buildUrl({ - url: `/api/v2/notifications/${id}`, - parameters: {} - }); - var strClientId = - this.appNM + - '; ' + - this.appVer + - '; JavascriptSdk; ' + this.apiVersion + '; ' + - this.machineNM; + * * This API requires one of the following user roles: AccountAdmin, AccountOperator, AccountUser, BatchServiceAdmin, CompanyAdmin, CompanyUser, Compliance Root User, ComplianceAdmin, ComplianceUser, CSPAdmin, CSPTester, ECMAccountUser, ECMCompanyUser, FirmAdmin, FirmUser, ProStoresOperator, Registrar, SiteAdmin, SSTAdmin, SystemAdmin, TechnicalSupportAdmin, TechnicalSupportUser, TreasuryAdmin, TreasuryUser. + * Swagger Name: AvaTaxClient + * + * + * @param {number} id The id of the notification to retrieve. + * @return {Models.NotificationModel} + */ + + getNotification({ id }: { id: number }): Promise { + var path = this.buildUrl({ + url: `/api/v2/notifications/${id}`, + parameters: {} + }); + var strClientId = + this.appNM + + '; ' + + this.appVer + + '; JavascriptSdk; ' + this.apiVersion + '; ' + + this.machineNM; return this.restCall({ url: path, verb: 'get', payload: null, clientId: strClientId }, Models.NotificationModel); - } - - /** - * List all notifications. + } + + /** + * List all notifications. * List all notifications. * * A notification is a message from Avalara that may have relevance to your business. You may want @@ -11334,38 +11595,38 @@ export default class AvaTaxClient { * * ### Security Policies * - * * This API requires one of the following user roles: AccountAdmin, AccountOperator, AccountUser, BatchServiceAdmin, CompanyAdmin, CompanyUser, Compliance Root User, ComplianceAdmin, ComplianceUser, CSPAdmin, CSPTester, ECMAccountUser, ECMCompanyUser, FirmAdmin, FirmUser, ProStoresOperator, Registrar, SiteAdmin, SSTAdmin, SystemAdmin, TechnicalSupportAdmin, TechnicalSupportUser, TreasuryAdmin, TreasuryUser. - * Swagger Name: AvaTaxClient - * + * * This API requires one of the following user roles: AccountAdmin, AccountOperator, AccountUser, BatchServiceAdmin, CompanyAdmin, CompanyUser, Compliance Root User, ComplianceAdmin, ComplianceUser, CSPAdmin, CSPTester, ECMAccountUser, ECMCompanyUser, 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 {number} top If nonzero, return no more than this number of results. Used with `$skip` to provide pagination for large datasets. Unless otherwise specified, the maximum number of records that can be returned from an API call is 1,000 records. * @param {number} skip If nonzero, skip this number of results before returning data. Used with `$top` to provide pagination for large datasets. - * @param {string} orderBy A comma separated list of sort statements in the format `(fieldname) [ASC|DESC]`, for example `id ASC`. - * @return {FetchResult} - */ - - listNotifications({ filter, top, skip, orderBy }: { filter?: string, top?: number, skip?: number, orderBy?: string }): Promise> { - 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 }: { filter?: string, top?: number, skip?: number, orderBy?: string }): Promise> { + var path = this.buildUrl({ + url: `/api/v2/notifications`, parameters: { $filter: filter, $top: top, $skip: skip, $orderBy: orderBy } - }); - var strClientId = - this.appNM + - '; ' + - this.appVer + - '; JavascriptSdk; ' + this.apiVersion + '; ' + - this.machineNM; + }); + var strClientId = + this.appNM + + '; ' + + this.appVer + + '; JavascriptSdk; ' + this.apiVersion + '; ' + + this.machineNM; return this.restCall({ url: path, verb: 'get', payload: null, clientId: strClientId }, FetchResult); - } - - /** - * Request a new Avalara account + } + + /** + * 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 @@ -11385,30 +11646,30 @@ export default class AvaTaxClient { * * * This API requires one of the following user roles: AccountAdmin, BatchServiceAdmin, 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]. - * Swagger Name: AvaTaxClient - * - * - * @param {Models.NewAccountRequestModel} model Information about the account you wish to create and the selected product offerings. - * @return {Models.NewAccountModel} - */ - - requestNewAccount({ model }: { model: Models.NewAccountRequestModel }): Promise { - var path = this.buildUrl({ - url: `/api/v2/accounts/request`, - parameters: {} - }); - var strClientId = - this.appNM + - '; ' + - this.appVer + - '; JavascriptSdk; ' + this.apiVersion + '; ' + - this.machineNM; + * * 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 {Models.NewAccountRequestModel} model Information about the account you wish to create and the selected product offerings. + * @return {Models.NewAccountModel} + */ + + requestNewAccount({ model }: { model: Models.NewAccountRequestModel }): Promise { + var path = this.buildUrl({ + url: `/api/v2/accounts/request`, + parameters: {} + }); + var strClientId = + this.appNM + + '; ' + + this.appVer + + '; JavascriptSdk; ' + this.apiVersion + '; ' + + this.machineNM; return this.restCall({ url: path, verb: 'post', payload: model, clientId: strClientId }, Models.NewAccountModel); - } - - /** - * Request a new entitilement to an existing customer + } + + /** + * Request a new entitilement to an existing customer * This API is for use by partner provisioning services customers only. This allows the partners to add * new entitlements to an existing customer. * @@ -11416,31 +11677,31 @@ export default class AvaTaxClient { * * * This API requires one of the following user roles: AccountAdmin, BatchServiceAdmin, 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]. - * Swagger Name: AvaTaxClient - * + * * 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 {number} id The avatax account id of the customer - * @param {string} offer The offer to be added to an already existing customer - * @return {Models.OfferModel} - */ - - requestNewEntitlement({ id, offer }: { id: number, offer: string }): Promise { - var path = this.buildUrl({ - url: `/api/v2/accounts/${id}/entitlements/${offer}`, - parameters: {} - }); - var strClientId = - this.appNM + - '; ' + - this.appVer + - '; JavascriptSdk; ' + this.apiVersion + '; ' + - this.machineNM; + * @param {string} offer The offer to be added to an already existing customer + * @return {Models.OfferModel} + */ + + requestNewEntitlement({ id, offer }: { id: number, offer: string }): Promise { + var path = this.buildUrl({ + url: `/api/v2/accounts/${id}/entitlements/${offer}`, + parameters: {} + }); + var strClientId = + this.appNM + + '; ' + + this.appVer + + '; JavascriptSdk; ' + this.apiVersion + '; ' + + this.machineNM; return this.restCall({ url: path, verb: 'post', payload: null, clientId: strClientId }, Models.OfferModel); - } - - /** - * Create a new account + } + + /** + * Create a new account * # For Registrar Use Only * This API is for use by Avalara Registrar administrative users only. * @@ -11449,30 +11710,30 @@ export default class AvaTaxClient { * * ### Security Policies * - * * This API requires one of the following user roles: BatchServiceAdmin, FirmAdmin, Registrar, SiteAdmin, SSTAdmin, SystemAdmin, TechnicalSupportAdmin. - * Swagger Name: AvaTaxClient - * - * - * @param {Models.AccountModel} model The account you wish to create. - * @return {Models.AccountModel[]} - */ - - createAccount({ model }: { model: Models.AccountModel }): Promise> { - var path = this.buildUrl({ - url: `/api/v2/accounts`, - parameters: {} - }); - var strClientId = - this.appNM + - '; ' + - this.appVer + - '; JavascriptSdk; ' + this.apiVersion + '; ' + - this.machineNM; + * * This API requires one of the following user roles: BatchServiceAdmin, FirmAdmin, Registrar, SiteAdmin, SSTAdmin, SystemAdmin, TechnicalSupportAdmin. + * Swagger Name: AvaTaxClient + * + * + * @param {Models.AccountModel} model The account you wish to create. + * @return {Models.AccountModel[]} + */ + + createAccount({ model }: { model: Models.AccountModel }): Promise> { + var path = this.buildUrl({ + url: `/api/v2/accounts`, + parameters: {} + }); + var strClientId = + this.appNM + + '; ' + + this.appVer + + '; JavascriptSdk; ' + this.apiVersion + '; ' + + this.machineNM; return this.restCall({ url: path, verb: 'post', payload: model, clientId: strClientId }, Array); - } - - /** - * Create new notifications. + } + + /** + * Create new notifications. * This API is available by invitation only. * * Create a single notification. @@ -11490,30 +11751,30 @@ export default class AvaTaxClient { * ### Security Policies * * * This API requires one of the following user roles: BatchServiceAdmin, 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]. - * Swagger Name: AvaTaxClient - * - * - * @param {Models.NotificationModel[]} model The notifications you wish to create. - * @return {Models.NotificationModel[]} - */ - - createNotifications({ model }: { model: Models.NotificationModel[] }): Promise> { - var path = this.buildUrl({ - url: `/api/v2/notifications`, - parameters: {} - }); - var strClientId = - this.appNM + - '; ' + - this.appVer + - '; JavascriptSdk; ' + this.apiVersion + '; ' + - this.machineNM; + * * 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 {Models.NotificationModel[]} model The notifications you wish to create. + * @return {Models.NotificationModel[]} + */ + + createNotifications({ model }: { model: Models.NotificationModel[] }): Promise> { + var path = this.buildUrl({ + url: `/api/v2/notifications`, + parameters: {} + }); + var strClientId = + this.appNM + + '; ' + + this.appVer + + '; JavascriptSdk; ' + this.apiVersion + '; ' + + this.machineNM; return this.restCall({ url: path, verb: 'post', payload: model, clientId: strClientId }, Array); - } - - /** - * Create a new subscription + } + + /** + * 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. @@ -11522,31 +11783,31 @@ export default class AvaTaxClient { * * ### Security Policies * - * * This API requires one of the following user roles: BatchServiceAdmin, Registrar, SiteAdmin, SSTAdmin, SystemAdmin, TechnicalSupportAdmin. - * Swagger Name: AvaTaxClient - * + * * This API requires one of the following user roles: BatchServiceAdmin, Registrar, SiteAdmin, SSTAdmin, SystemAdmin, TechnicalSupportAdmin. + * Swagger Name: AvaTaxClient + * * * @param {number} accountId The ID of the account that owns this subscription. - * @param {Models.SubscriptionModel[]} model The subscription you wish to create. - * @return {Models.SubscriptionModel[]} - */ - - createSubscriptions({ accountId, model }: { accountId: number, model: Models.SubscriptionModel[] }): Promise> { - var path = this.buildUrl({ - url: `/api/v2/accounts/${accountId}/subscriptions`, - parameters: {} - }); - var strClientId = - this.appNM + - '; ' + - this.appVer + - '; JavascriptSdk; ' + this.apiVersion + '; ' + - this.machineNM; + * @param {Models.SubscriptionModel[]} model The subscription you wish to create. + * @return {Models.SubscriptionModel[]} + */ + + createSubscriptions({ accountId, model }: { accountId: number, model: Models.SubscriptionModel[] }): Promise> { + var path = this.buildUrl({ + url: `/api/v2/accounts/${accountId}/subscriptions`, + parameters: {} + }); + var strClientId = + this.appNM + + '; ' + + this.appVer + + '; JavascriptSdk; ' + this.apiVersion + '; ' + + this.machineNM; return this.restCall({ url: path, verb: 'post', payload: model, clientId: strClientId }, Array); - } - - /** - * Delete a single account + } + + /** + * Delete a single account * # For Registrar Use Only * This API is for use by Avalara Registrar administrative users only. * @@ -11555,30 +11816,30 @@ export default class AvaTaxClient { * * ### Security Policies * - * * This API requires the user role SystemAdmin. - * Swagger Name: AvaTaxClient - * + * * This API requires the user role SystemAdmin. + * Swagger Name: AvaTaxClient + * * - * @param {number} id The ID of the account you wish to delete. - * @return {Models.ErrorDetail[]} - */ - - deleteAccount({ id }: { id: number }): Promise> { - var path = this.buildUrl({ - url: `/api/v2/accounts/${id}`, + * @param {number} id The ID of the account you wish to delete. + * @return {Models.ErrorDetail[]} + */ + + deleteAccount({ id }: { id: number }): Promise> { + var path = this.buildUrl({ + url: `/api/v2/accounts/${id}`, parameters: {} - }); - var strClientId = - this.appNM + - '; ' + - this.appVer + - '; JavascriptSdk; ' + this.apiVersion + '; ' + - this.machineNM; + }); + var strClientId = + this.appNM + + '; ' + + this.appVer + + '; JavascriptSdk; ' + this.apiVersion + '; ' + + this.machineNM; return this.restCall({ url: path, verb: 'delete', payload: null, clientId: strClientId }, Array); - } - - /** - * Delete a single notification. + } + + /** + * Delete a single notification. * This API is available by invitation only. * * Delete the existing notification identified by this URL. @@ -11593,30 +11854,30 @@ export default class AvaTaxClient { * ### Security Policies * * * This API requires one of the following user roles: BatchServiceAdmin, 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]. - * Swagger Name: AvaTaxClient - * - * - * @param {number} id The id of the notification you wish to delete. - * @return {Models.ErrorDetail[]} - */ - - deleteNotification({ id }: { id: number }): Promise> { - var path = this.buildUrl({ - url: `/api/v2/notifications/${id}`, - parameters: {} - }); - var strClientId = - this.appNM + - '; ' + - this.appVer + - '; JavascriptSdk; ' + this.apiVersion + '; ' + - this.machineNM; + * * 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 {number} id The id of the notification you wish to delete. + * @return {Models.ErrorDetail[]} + */ + + deleteNotification({ id }: { id: number }): Promise> { + var path = this.buildUrl({ + url: `/api/v2/notifications/${id}`, + parameters: {} + }); + var strClientId = + this.appNM + + '; ' + + this.appVer + + '; JavascriptSdk; ' + this.apiVersion + '; ' + + this.machineNM; return this.restCall({ url: path, verb: 'delete', payload: null, clientId: strClientId }, Array); - } - - /** - * Delete a single subscription + } + + /** + * Delete a single subscription * # For Registrar Use Only * This API is for use by Avalara Registrar administrative users only. * @@ -11624,31 +11885,31 @@ export default class AvaTaxClient { * * ### Security Policies * - * * This API requires one of the following user roles: BatchServiceAdmin, Registrar, SiteAdmin, SSTAdmin, SystemAdmin, TechnicalSupportAdmin. - * Swagger Name: AvaTaxClient - * + * * This API requires one of the following user roles: BatchServiceAdmin, Registrar, SiteAdmin, SSTAdmin, SystemAdmin, TechnicalSupportAdmin. + * Swagger Name: AvaTaxClient + * * * @param {number} accountId The ID of the account that owns this subscription. - * @param {number} id The ID of the subscription you wish to delete. - * @return {Models.ErrorDetail[]} - */ - - deleteSubscription({ accountId, id }: { accountId: number, id: number }): Promise> { - var path = this.buildUrl({ - url: `/api/v2/accounts/${accountId}/subscriptions/${id}`, - parameters: {} - }); - var strClientId = - this.appNM + - '; ' + - this.appVer + - '; JavascriptSdk; ' + this.apiVersion + '; ' + - this.machineNM; + * @param {number} id The ID of the subscription you wish to delete. + * @return {Models.ErrorDetail[]} + */ + + deleteSubscription({ accountId, id }: { accountId: number, id: number }): Promise> { + var path = this.buildUrl({ + url: `/api/v2/accounts/${accountId}/subscriptions/${id}`, + parameters: {} + }); + var strClientId = + this.appNM + + '; ' + + this.appVer + + '; JavascriptSdk; ' + this.apiVersion + '; ' + + this.machineNM; return this.restCall({ url: path, verb: 'delete', payload: null, clientId: strClientId }, Array); - } - - /** - * Retrieve the full list of Avalara-supported subscription (ServiceTypes) + } + + /** + * Retrieve the full list of Avalara-supported subscription (ServiceTypes) * For Registrar Use Only * This API is for use by Avalara Registrar administrative users only. * @@ -11659,38 +11920,38 @@ export default class AvaTaxClient { * * ### Security Policies * - * * This API requires one of the following user roles: AccountAdmin, AccountUser, BatchServiceAdmin, CompanyAdmin, CompanyUser, Compliance Root User, ComplianceAdmin, ComplianceUser, CSPAdmin, CSPTester, FirmAdmin, FirmUser, Registrar, SiteAdmin, SSTAdmin, SystemAdmin, TechnicalSupportAdmin, TechnicalSupportUser, TreasuryAdmin, TreasuryUser. - * Swagger Name: AvaTaxClient - * + * * This API requires one of the following user roles: AccountAdmin, AccountUser, BatchServiceAdmin, 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:* taxTypeGroupIdSK * @param {number} top If nonzero, return no more than this number of results. Used with `$skip` to provide pagination for large datasets. Unless otherwise specified, the maximum number of records that can be returned from an API call is 1,000 records. * @param {number} skip If nonzero, skip this number of results before returning data. Used with `$top` to provide pagination for large datasets. - * @param {string} orderBy A comma separated list of sort statements in the format `(fieldname) [ASC|DESC]`, for example `id ASC`. - * @return {FetchResult} - */ - - listServiceTypes({ filter, top, skip, orderBy }: { filter?: string, top?: number, skip?: number, orderBy?: string }): Promise> { - var path = this.buildUrl({ - url: `/api/v2/servicetypes/servicetypes`, + * @param {string} orderBy A comma separated list of sort statements in the format `(fieldname) [ASC|DESC]`, for example `id ASC`. + * @return {FetchResult} + */ + + listServiceTypes({ filter, top, skip, orderBy }: { filter?: string, top?: number, skip?: number, orderBy?: string }): Promise> { + var path = this.buildUrl({ + url: `/api/v2/servicetypes/servicetypes`, parameters: { $filter: filter, $top: top, $skip: skip, $orderBy: orderBy } - }); - var strClientId = - this.appNM + - '; ' + - this.appVer + - '; JavascriptSdk; ' + this.apiVersion + '; ' + - this.machineNM; + }); + var strClientId = + this.appNM + + '; ' + + this.appVer + + '; JavascriptSdk; ' + this.apiVersion + '; ' + + this.machineNM; return this.restCall({ url: path, verb: 'get', payload: null, clientId: strClientId }, FetchResult); - } - - /** - * Reset a user's password programmatically + } + + /** + * Reset a user's password programmatically * # For Registrar Use Only * This API is for use by Avalara Registrar administrative users only. * @@ -11701,34 +11962,34 @@ export default class AvaTaxClient { * ### Security Policies * * * This API requires one of the following user roles: AccountAdmin, AccountUser, BatchServiceAdmin, 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. - * Swagger Name: AvaTaxClient - * + * * This API is available to Avalara system-level (registrar-level) users only. + * Swagger Name: AvaTaxClient + * * * @param {number} userId The unique ID of the user whose password will be changed * @param {boolean} isUndoMigrateRequest If user's password was migrated to AI, undo this. - * @param {Models.SetPasswordModel} model The new password for this user - * @return {string} - */ - - resetPassword({ userId, isUndoMigrateRequest, model }: { userId: number, isUndoMigrateRequest?: boolean, model: Models.SetPasswordModel }): Promise { - var path = this.buildUrl({ - url: `/api/v2/passwords/${userId}/reset`, + * @param {Models.SetPasswordModel} model The new password for this user + * @return {string} + */ + + resetPassword({ userId, isUndoMigrateRequest, model }: { userId: number, isUndoMigrateRequest?: boolean, model: Models.SetPasswordModel }): Promise { + var path = this.buildUrl({ + url: `/api/v2/passwords/${userId}/reset`, parameters: { isUndoMigrateRequest: isUndoMigrateRequest } - }); - var strClientId = - this.appNM + - '; ' + - this.appVer + - '; JavascriptSdk; ' + this.apiVersion + '; ' + - this.machineNM; + }); + var strClientId = + this.appNM + + '; ' + + this.appVer + + '; JavascriptSdk; ' + this.apiVersion + '; ' + + this.machineNM; return this.restCall({ url: path, verb: 'post', payload: model, clientId: strClientId }, String); - } - - /** - * Update a single account + } + + /** + * Update a single account * # For Registrar Use Only * This API is for use by Avalara Registrar administrative users only. * @@ -11736,31 +11997,31 @@ export default class AvaTaxClient { * * ### Security Policies * - * * This API requires one of the following user roles: BatchServiceAdmin, FirmAdmin, Registrar, SiteAdmin, SSTAdmin, SystemAdmin, TechnicalSupportAdmin. - * Swagger Name: AvaTaxClient - * + * * This API requires one of the following user roles: BatchServiceAdmin, FirmAdmin, Registrar, SiteAdmin, SSTAdmin, SystemAdmin, TechnicalSupportAdmin. + * Swagger Name: AvaTaxClient + * * * @param {number} id The ID of the account you wish to update. - * @param {Models.AccountModel} model The account object you wish to update. - * @return {Models.AccountModel} - */ - - updateAccount({ id, model }: { id: number, model: Models.AccountModel }): Promise { - var path = this.buildUrl({ - url: `/api/v2/accounts/${id}`, - parameters: {} - }); - var strClientId = - this.appNM + - '; ' + - this.appVer + - '; JavascriptSdk; ' + this.apiVersion + '; ' + - this.machineNM; + * @param {Models.AccountModel} model The account object you wish to update. + * @return {Models.AccountModel} + */ + + updateAccount({ id, model }: { id: number, model: Models.AccountModel }): Promise { + var path = this.buildUrl({ + url: `/api/v2/accounts/${id}`, + parameters: {} + }); + var strClientId = + this.appNM + + '; ' + + this.appVer + + '; JavascriptSdk; ' + this.apiVersion + '; ' + + this.machineNM; return this.restCall({ url: path, verb: 'put', payload: model, clientId: strClientId }, Models.AccountModel); - } - - /** - * Update a single notification. + } + + /** + * Update a single notification. * This API is available by invitation only. * * Replaces the notification identified by this URL with a new notification. @@ -11775,31 +12036,31 @@ export default class AvaTaxClient { * ### Security Policies * * * This API requires one of the following user roles: BatchServiceAdmin, 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]. - * Swagger Name: AvaTaxClient - * + * * 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 {number} id The id of the notification you wish to update. - * @param {Models.NotificationModel} model The notification object you wish to update. - * @return {Models.NotificationModel} - */ - - updateNotification({ id, model }: { id: number, model: Models.NotificationModel }): Promise { - var path = this.buildUrl({ - url: `/api/v2/notifications/${id}`, - parameters: {} - }); - var strClientId = - this.appNM + - '; ' + - this.appVer + - '; JavascriptSdk; ' + this.apiVersion + '; ' + - this.machineNM; + * @param {Models.NotificationModel} model The notification object you wish to update. + * @return {Models.NotificationModel} + */ + + updateNotification({ id, model }: { id: number, model: Models.NotificationModel }): Promise { + var path = this.buildUrl({ + url: `/api/v2/notifications/${id}`, + parameters: {} + }); + var strClientId = + this.appNM + + '; ' + + this.appVer + + '; JavascriptSdk; ' + this.apiVersion + '; ' + + this.machineNM; return this.restCall({ url: path, verb: 'put', payload: model, clientId: strClientId }, Models.NotificationModel); - } - - /** - * Update a single subscription + } + + /** + * Update a single subscription * # For Registrar Use Only * This API is for use by Avalara Registrar administrative users only. * @@ -11811,32 +12072,32 @@ export default class AvaTaxClient { * * ### Security Policies * - * * This API requires one of the following user roles: BatchServiceAdmin, Registrar, SiteAdmin, SSTAdmin, SystemAdmin, TechnicalSupportAdmin. - * Swagger Name: AvaTaxClient - * + * * This API requires one of the following user roles: BatchServiceAdmin, Registrar, SiteAdmin, SSTAdmin, SystemAdmin, TechnicalSupportAdmin. + * Swagger Name: AvaTaxClient + * * * @param {number} accountId The ID of the account that this subscription belongs to. * @param {number} id The ID of the subscription you wish to update - * @param {Models.SubscriptionModel} model The subscription you wish to update. - * @return {Models.SubscriptionModel} - */ - - updateSubscription({ accountId, id, model }: { accountId: number, id: number, model: Models.SubscriptionModel }): Promise { - var path = this.buildUrl({ - url: `/api/v2/accounts/${accountId}/subscriptions/${id}`, - parameters: {} - }); - var strClientId = - this.appNM + - '; ' + - this.appVer + - '; JavascriptSdk; ' + this.apiVersion + '; ' + - this.machineNM; + * @param {Models.SubscriptionModel} model The subscription you wish to update. + * @return {Models.SubscriptionModel} + */ + + updateSubscription({ accountId, id, model }: { accountId: number, id: number, model: Models.SubscriptionModel }): Promise { + var path = this.buildUrl({ + url: `/api/v2/accounts/${accountId}/subscriptions/${id}`, + parameters: {} + }); + var strClientId = + this.appNM + + '; ' + + this.appVer + + '; JavascriptSdk; ' + this.apiVersion + '; ' + + this.machineNM; return this.restCall({ url: path, verb: 'put', payload: model, clientId: strClientId }, Models.SubscriptionModel); - } - - /** - * Download a report + } + + /** + * 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, @@ -11854,30 +12115,30 @@ export default class AvaTaxClient { * * ### Security Policies * - * * This API requires one of the following user roles: AccountAdmin, AccountUser, BatchServiceAdmin, CompanyAdmin, CompanyUser, CSPAdmin, CSPTester, ProStoresOperator, SiteAdmin, SSTAdmin, SystemAdmin, TechnicalSupportAdmin, TechnicalSupportUser. - * Swagger Name: AvaTaxClient - * - * - * @param {number} id The unique ID number of this report - * @return {object} - */ - - downloadReport({ id }: { id: number }): Promise { - var path = this.buildUrl({ - url: `/api/v2/reports/${id}/attachment`, - parameters: {} - }); - var strClientId = - this.appNM + - '; ' + - this.appVer + - '; JavascriptSdk; ' + this.apiVersion + '; ' + - this.machineNM; + * * This API requires one of the following user roles: AccountAdmin, AccountUser, BatchServiceAdmin, CompanyAdmin, CompanyUser, CSPAdmin, CSPTester, ProStoresOperator, SiteAdmin, SSTAdmin, SystemAdmin, TechnicalSupportAdmin, TechnicalSupportUser. + * Swagger Name: AvaTaxClient + * + * + * @param {number} id The unique ID number of this report + * @return {object} + */ + + downloadReport({ id }: { id: number }): Promise { + var path = this.buildUrl({ + url: `/api/v2/reports/${id}/attachment`, + parameters: {} + }); + var strClientId = + this.appNM + + '; ' + + this.appVer + + '; JavascriptSdk; ' + this.apiVersion + '; ' + + this.machineNM; return this.restCall({ url: path, verb: 'get', payload: null, clientId: strClientId }, Object); - } - - /** - * Retrieve a single report + } + + /** + * 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 @@ -11888,30 +12149,30 @@ 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. - * Swagger Name: AvaTaxClient - * - * - * @param {number} id The unique ID number of the report to retrieve - * @return {Models.ReportModel} - */ - - getReport({ id }: { id: number }): Promise { - var path = this.buildUrl({ - url: `/api/v2/reports/${id}`, - parameters: {} - }); - var strClientId = - this.appNM + - '; ' + - this.appVer + - '; JavascriptSdk; ' + this.apiVersion + '; ' + - this.machineNM; + * This API call returns information about any report type. + * Swagger Name: AvaTaxClient + * + * + * @param {number} id The unique ID number of the report to retrieve + * @return {Models.ReportModel} + */ + + getReport({ id }: { id: number }): Promise { + var path = this.buildUrl({ + url: `/api/v2/reports/${id}`, + parameters: {} + }); + var strClientId = + this.appNM + + '; ' + + this.appVer + + '; JavascriptSdk; ' + this.apiVersion + '; ' + + this.machineNM; return this.restCall({ url: path, verb: 'get', payload: null, clientId: strClientId }, Models.ReportModel); - } - - /** - * Initiate an ExportDocumentLine report task + } + + /** + * 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 @@ -11935,31 +12196,31 @@ export default class AvaTaxClient { * * ### Security Policies * - * * This API requires one of the following user roles: AccountAdmin, AccountOperator, AccountUser, BatchServiceAdmin, CompanyAdmin, CompanyUser, CSPTester, SSTAdmin, TechnicalSupportAdmin, TechnicalSupportUser. - * Swagger Name: AvaTaxClient - * + * * This API requires one of the following user roles: AccountAdmin, AccountOperator, AccountUser, BatchServiceAdmin, CompanyAdmin, CompanyUser, CSPTester, SSTAdmin, TechnicalSupportAdmin, TechnicalSupportUser. + * Swagger Name: AvaTaxClient + * * * @param {number} companyId The unique ID number of the company to report on. - * @param {Models.ExportDocumentLineModel} model Options that may be configured to customize the report. - * @return {Models.ReportModel[]} - */ - - initiateExportDocumentLineReport({ companyId, model }: { companyId: number, model: Models.ExportDocumentLineModel }): Promise> { - var path = this.buildUrl({ - url: `/api/v2/companies/${companyId}/reports/exportdocumentline/initiate`, - parameters: {} - }); - var strClientId = - this.appNM + - '; ' + - this.appVer + - '; JavascriptSdk; ' + this.apiVersion + '; ' + - this.machineNM; + * @param {Models.ExportDocumentLineModel} model Options that may be configured to customize the report. + * @return {Models.ReportModel[]} + */ + + initiateExportDocumentLineReport({ companyId, model }: { companyId: number, model: Models.ExportDocumentLineModel }): Promise> { + var path = this.buildUrl({ + url: `/api/v2/companies/${companyId}/reports/exportdocumentline/initiate`, + parameters: {} + }); + var strClientId = + this.appNM + + '; ' + + this.appVer + + '; JavascriptSdk; ' + this.apiVersion + '; ' + + this.machineNM; return this.restCall({ url: path, verb: 'post', payload: model, clientId: strClientId }, Array); - } - - /** - * List all report tasks for account + } + + /** + * 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 @@ -11974,38 +12235,38 @@ export default class AvaTaxClient { * * ### Security Policies * - * * This API requires one of the following user roles: AccountAdmin, AccountUser, BatchServiceAdmin, CompanyAdmin, CompanyUser, CSPAdmin, CSPTester, ProStoresOperator, SiteAdmin, SSTAdmin, SystemAdmin, TechnicalSupportAdmin, TechnicalSupportUser. - * Swagger Name: AvaTaxClient - * + * * This API requires one of the following user roles: AccountAdmin, AccountUser, BatchServiceAdmin, CompanyAdmin, CompanyUser, CSPAdmin, CSPTester, ProStoresOperator, SiteAdmin, SSTAdmin, SystemAdmin, TechnicalSupportAdmin, TechnicalSupportUser. + * Swagger Name: AvaTaxClient + * * * @param {number} 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 {number} skip If nonzero, skip this number of results before returning data. Used with `$top` to provide pagination for large datasets. - * @param {number} top If nonzero, return no more than this number of results. Used with `$skip` to provide pagination for large datasets. Unless otherwise specified, the maximum number of records that can be returned from an API call is 1,000 records. - * @return {FetchResult} - */ - - listReports({ companyId, pageKey, skip, top }: { companyId?: number, pageKey?: string, skip?: number, top?: number }): Promise> { - var path = this.buildUrl({ - url: `/api/v2/reports`, + * @param {number} top If nonzero, return no more than this number of results. Used with `$skip` to provide pagination for large datasets. Unless otherwise specified, the maximum number of records that can be returned from an API call is 1,000 records. + * @return {FetchResult} + */ + + listReports({ companyId, pageKey, skip, top }: { companyId?: number, pageKey?: string, skip?: number, top?: number }): Promise> { + var path = this.buildUrl({ + url: `/api/v2/reports`, parameters: { companyId: companyId, pageKey: pageKey, $skip: skip, $top: top } - }); - var strClientId = - this.appNM + - '; ' + - this.appVer + - '; JavascriptSdk; ' + this.apiVersion + '; ' + - this.machineNM; + }); + var strClientId = + this.appNM + + '; ' + + this.appVer + + '; JavascriptSdk; ' + this.apiVersion + '; ' + + this.machineNM; return this.restCall({ url: path, verb: 'get', payload: null, clientId: strClientId }, FetchResult); - } - - /** - * Create a new setting + } + + /** + * 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 @@ -12024,31 +12285,31 @@ export default class AvaTaxClient { * * ### Security Policies * - * * This API requires one of the following user roles: AccountAdmin, BatchServiceAdmin, CompanyAdmin, CSPTester, ProStoresOperator, Registrar, SiteAdmin, SSTAdmin, SystemAdmin, TechnicalSupportAdmin. - * Swagger Name: AvaTaxClient - * + * * This API requires one of the following user roles: AccountAdmin, BatchServiceAdmin, CompanyAdmin, CSPTester, ProStoresOperator, Registrar, SiteAdmin, SSTAdmin, SystemAdmin, TechnicalSupportAdmin. + * Swagger Name: AvaTaxClient + * * * @param {number} companyId The ID of the company that owns this setting. - * @param {Models.SettingModel[]} model The setting you wish to create. - * @return {Models.SettingModel[]} - */ - - createSettings({ companyId, model }: { companyId: number, model: Models.SettingModel[] }): Promise> { - var path = this.buildUrl({ - url: `/api/v2/companies/${companyId}/settings`, - parameters: {} - }); - var strClientId = - this.appNM + - '; ' + - this.appVer + - '; JavascriptSdk; ' + this.apiVersion + '; ' + - this.machineNM; + * @param {Models.SettingModel[]} model The setting you wish to create. + * @return {Models.SettingModel[]} + */ + + createSettings({ companyId, model }: { companyId: number, model: Models.SettingModel[] }): Promise> { + var path = this.buildUrl({ + url: `/api/v2/companies/${companyId}/settings`, + parameters: {} + }); + var strClientId = + this.appNM + + '; ' + + this.appVer + + '; JavascriptSdk; ' + this.apiVersion + '; ' + + this.machineNM; return this.restCall({ url: path, verb: 'post', payload: model, clientId: strClientId }, Array); - } - - /** - * Delete a single setting + } + + /** + * 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 @@ -12062,31 +12323,31 @@ export default class AvaTaxClient { * * ### Security Policies * - * * This API requires one of the following user roles: AccountAdmin, BatchServiceAdmin, CompanyAdmin, CSPTester, FirmAdmin, Registrar, SiteAdmin, SSTAdmin, SystemAdmin, TechnicalSupportAdmin. - * Swagger Name: AvaTaxClient - * + * * This API requires one of the following user roles: AccountAdmin, BatchServiceAdmin, CompanyAdmin, CSPTester, FirmAdmin, Registrar, SiteAdmin, SSTAdmin, SystemAdmin, TechnicalSupportAdmin. + * Swagger Name: AvaTaxClient + * * * @param {number} companyId The ID of the company that owns this setting. - * @param {number} id The ID of the setting you wish to delete. - * @return {Models.ErrorDetail[]} - */ - - deleteSetting({ companyId, id }: { companyId: number, id: number }): Promise> { - var path = this.buildUrl({ - url: `/api/v2/companies/${companyId}/settings/${id}`, - parameters: {} - }); - var strClientId = - this.appNM + - '; ' + - this.appVer + - '; JavascriptSdk; ' + this.apiVersion + '; ' + - this.machineNM; + * @param {number} id The ID of the setting you wish to delete. + * @return {Models.ErrorDetail[]} + */ + + deleteSetting({ companyId, id }: { companyId: number, id: number }): Promise> { + var path = this.buildUrl({ + url: `/api/v2/companies/${companyId}/settings/${id}`, + parameters: {} + }); + var strClientId = + this.appNM + + '; ' + + this.appVer + + '; JavascriptSdk; ' + this.apiVersion + '; ' + + this.machineNM; return this.restCall({ url: path, verb: 'delete', payload: null, clientId: strClientId }, Array); - } - - /** - * Retrieve a single setting + } + + /** + * 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 @@ -12100,31 +12361,31 @@ export default class AvaTaxClient { * * ### Security Policies * - * * This API requires one of the following user roles: AccountAdmin, AccountUser, BatchServiceAdmin, CompanyAdmin, CompanyUser, Compliance Root User, ComplianceAdmin, ComplianceUser, CSPAdmin, CSPTester, ECMAccountUser, ECMCompanyUser, FirmAdmin, FirmUser, ProStoresOperator, SiteAdmin, SSTAdmin, SystemAdmin, TechnicalSupportAdmin, TechnicalSupportUser. - * Swagger Name: AvaTaxClient - * + * * This API requires one of the following user roles: AccountAdmin, AccountUser, BatchServiceAdmin, CompanyAdmin, CompanyUser, Compliance Root User, ComplianceAdmin, ComplianceUser, CSPAdmin, CSPTester, ECMAccountUser, ECMCompanyUser, FirmAdmin, FirmUser, ProStoresOperator, SiteAdmin, SSTAdmin, SystemAdmin, TechnicalSupportAdmin, TechnicalSupportUser. + * Swagger Name: AvaTaxClient + * * * @param {number} companyId The ID of the company that owns this setting - * @param {number} id The primary key of this setting - * @return {Models.SettingModel} - */ - - getSetting({ companyId, id }: { companyId: number, id: number }): Promise { - var path = this.buildUrl({ - url: `/api/v2/companies/${companyId}/settings/${id}`, - parameters: {} - }); - var strClientId = - this.appNM + - '; ' + - this.appVer + - '; JavascriptSdk; ' + this.apiVersion + '; ' + - this.machineNM; + * @param {number} id The primary key of this setting + * @return {Models.SettingModel} + */ + + getSetting({ companyId, id }: { companyId: number, id: number }): Promise { + var path = this.buildUrl({ + url: `/api/v2/companies/${companyId}/settings/${id}`, + parameters: {} + }); + var strClientId = + this.appNM + + '; ' + + this.appVer + + '; JavascriptSdk; ' + this.apiVersion + '; ' + + this.machineNM; return this.restCall({ url: path, verb: 'get', payload: null, clientId: strClientId }, Models.SettingModel); - } - - /** - * Retrieve all settings for this company + } + + /** + * 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 @@ -12141,22 +12402,22 @@ export default class AvaTaxClient { * * ### Security Policies * - * * This API requires one of the following user roles: AccountAdmin, AccountUser, BatchServiceAdmin, CompanyAdmin, CompanyUser, Compliance Root User, ComplianceAdmin, ComplianceUser, CSPAdmin, CSPTester, ECMAccountUser, ECMCompanyUser, FirmAdmin, FirmUser, ProStoresOperator, SiteAdmin, SSTAdmin, SystemAdmin, TechnicalSupportAdmin, TechnicalSupportUser. - * Swagger Name: AvaTaxClient - * + * * This API requires one of the following user roles: AccountAdmin, AccountUser, BatchServiceAdmin, CompanyAdmin, CompanyUser, Compliance Root User, ComplianceAdmin, ComplianceUser, CSPAdmin, CSPTester, ECMAccountUser, ECMCompanyUser, FirmAdmin, FirmUser, ProStoresOperator, SiteAdmin, SSTAdmin, SystemAdmin, TechnicalSupportAdmin, TechnicalSupportUser. + * Swagger Name: AvaTaxClient + * * * @param {number} 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 {number} top If nonzero, return no more than this number of results. Used with `$skip` to provide pagination for large datasets. Unless otherwise specified, the maximum number of records that can be returned from an API call is 1,000 records. * @param {number} skip If nonzero, skip this number of results before returning data. Used with `$top` to provide pagination for large datasets. - * @param {string} orderBy A comma separated list of sort statements in the format `(fieldname) [ASC|DESC]`, for example `id ASC`. - * @return {FetchResult} - */ - - listSettingsByCompany({ companyId, filter, include, top, skip, orderBy }: { companyId: number, filter?: string, include?: string, top?: number, skip?: number, orderBy?: string }): Promise> { - var path = this.buildUrl({ - url: `/api/v2/companies/${companyId}/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 }: { companyId: number, filter?: string, include?: string, top?: number, skip?: number, orderBy?: string }): Promise> { + var path = this.buildUrl({ + url: `/api/v2/companies/${companyId}/settings`, parameters: { $filter: filter, $include: include, @@ -12164,18 +12425,18 @@ export default class AvaTaxClient { $skip: skip, $orderBy: orderBy } - }); - var strClientId = - this.appNM + - '; ' + - this.appVer + - '; JavascriptSdk; ' + this.apiVersion + '; ' + - this.machineNM; + }); + var strClientId = + this.appNM + + '; ' + + this.appVer + + '; JavascriptSdk; ' + this.apiVersion + '; ' + + this.machineNM; return this.restCall({ url: path, verb: 'get', payload: null, clientId: strClientId }, FetchResult); - } - - /** - * Retrieve all settings + } + + /** + * 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 @@ -12192,21 +12453,21 @@ export default class AvaTaxClient { * * ### Security Policies * - * * This API requires one of the following user roles: AccountAdmin, AccountUser, BatchServiceAdmin, CompanyAdmin, CompanyUser, Compliance Root User, ComplianceAdmin, ComplianceUser, CSPAdmin, CSPTester, ECMAccountUser, ECMCompanyUser, FirmAdmin, FirmUser, ProStoresOperator, SiteAdmin, SSTAdmin, SystemAdmin, TechnicalSupportAdmin, TechnicalSupportUser. - * Swagger Name: AvaTaxClient - * + * * This API requires one of the following user roles: AccountAdmin, AccountUser, BatchServiceAdmin, CompanyAdmin, CompanyUser, Compliance Root User, ComplianceAdmin, ComplianceUser, CSPAdmin, CSPTester, ECMAccountUser, ECMCompanyUser, 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 {number} top If nonzero, return no more than this number of results. Used with `$skip` to provide pagination for large datasets. Unless otherwise specified, the maximum number of records that can be returned from an API call is 1,000 records. * @param {number} skip If nonzero, skip this number of results before returning data. Used with `$top` to provide pagination for large datasets. - * @param {string} orderBy A comma separated list of sort statements in the format `(fieldname) [ASC|DESC]`, for example `id ASC`. - * @return {FetchResult} - */ - - querySettings({ filter, include, top, skip, orderBy }: { filter?: string, include?: string, top?: number, skip?: number, orderBy?: string }): Promise> { - 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 }: { filter?: string, include?: string, top?: number, skip?: number, orderBy?: string }): Promise> { + var path = this.buildUrl({ + url: `/api/v2/settings`, parameters: { $filter: filter, $include: include, @@ -12214,18 +12475,18 @@ export default class AvaTaxClient { $skip: skip, $orderBy: orderBy } - }); - var strClientId = - this.appNM + - '; ' + - this.appVer + - '; JavascriptSdk; ' + this.apiVersion + '; ' + - this.machineNM; + }); + var strClientId = + this.appNM + + '; ' + + this.appVer + + '; JavascriptSdk; ' + this.apiVersion + '; ' + + this.machineNM; return this.restCall({ url: path, verb: 'get', payload: null, clientId: strClientId }, FetchResult); - } - - /** - * Update a single setting + } + + /** + * 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 @@ -12243,63 +12504,63 @@ export default class AvaTaxClient { * * ### Security Policies * - * * This API requires one of the following user roles: AccountAdmin, BatchServiceAdmin, CompanyAdmin, CSPTester, ProStoresOperator, Registrar, SiteAdmin, SSTAdmin, SystemAdmin, TechnicalSupportAdmin. - * Swagger Name: AvaTaxClient - * + * * This API requires one of the following user roles: AccountAdmin, BatchServiceAdmin, CompanyAdmin, CSPTester, ProStoresOperator, Registrar, SiteAdmin, SSTAdmin, SystemAdmin, TechnicalSupportAdmin. + * Swagger Name: AvaTaxClient + * * * @param {number} companyId The ID of the company that this setting belongs to. * @param {number} id The ID of the setting you wish to update - * @param {Models.SettingModel} model The setting you wish to update. - * @return {Models.SettingModel} - */ - - updateSetting({ companyId, id, model }: { companyId: number, id: number, model: Models.SettingModel }): Promise { - var path = this.buildUrl({ - url: `/api/v2/companies/${companyId}/settings/${id}`, - parameters: {} - }); - var strClientId = - this.appNM + - '; ' + - this.appVer + - '; JavascriptSdk; ' + this.apiVersion + '; ' + - this.machineNM; + * @param {Models.SettingModel} model The setting you wish to update. + * @return {Models.SettingModel} + */ + + updateSetting({ companyId, id, model }: { companyId: number, id: number, model: Models.SettingModel }): Promise { + var path = this.buildUrl({ + url: `/api/v2/companies/${companyId}/settings/${id}`, + parameters: {} + }); + var strClientId = + this.appNM + + '; ' + + this.appVer + + '; JavascriptSdk; ' + this.apiVersion + '; ' + + this.machineNM; return this.restCall({ url: path, verb: 'put', payload: model, clientId: strClientId }, Models.SettingModel); - } - - /** - * Retrieve a single subscription + } + + /** + * 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, BatchServiceAdmin, CompanyAdmin, CompanyUser, Compliance Root User, ComplianceAdmin, ComplianceUser, CSPAdmin, CSPTester, FirmAdmin, FirmUser, Registrar, SiteAdmin, SSTAdmin, SystemAdmin, TechnicalSupportAdmin, TechnicalSupportUser, TreasuryAdmin, TreasuryUser. - * Swagger Name: AvaTaxClient - * + * * This API requires one of the following user roles: AccountAdmin, AccountUser, BatchServiceAdmin, CompanyAdmin, CompanyUser, Compliance Root User, ComplianceAdmin, ComplianceUser, CSPAdmin, CSPTester, FirmAdmin, FirmUser, Registrar, SiteAdmin, SSTAdmin, SystemAdmin, TechnicalSupportAdmin, TechnicalSupportUser, TreasuryAdmin, TreasuryUser. + * Swagger Name: AvaTaxClient + * * * @param {number} accountId The ID of the account that owns this subscription - * @param {number} id The primary key of this subscription - * @return {Models.SubscriptionModel} - */ - - getSubscription({ accountId, id }: { accountId: number, id: number }): Promise { - var path = this.buildUrl({ - url: `/api/v2/accounts/${accountId}/subscriptions/${id}`, - parameters: {} - }); - var strClientId = - this.appNM + - '; ' + - this.appVer + - '; JavascriptSdk; ' + this.apiVersion + '; ' + - this.machineNM; + * @param {number} id The primary key of this subscription + * @return {Models.SubscriptionModel} + */ + + getSubscription({ accountId, id }: { accountId: number, id: number }): Promise { + var path = this.buildUrl({ + url: `/api/v2/accounts/${accountId}/subscriptions/${id}`, + parameters: {} + }); + var strClientId = + this.appNM + + '; ' + + this.appVer + + '; JavascriptSdk; ' + this.apiVersion + '; ' + + this.machineNM; return this.restCall({ url: path, verb: 'get', payload: null, clientId: strClientId }, Models.SubscriptionModel); - } - - /** - * Retrieve subscriptions for this account + } + + /** + * 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. @@ -12309,39 +12570,39 @@ export default class AvaTaxClient { * * ### Security Policies * - * * This API requires one of the following user roles: AccountAdmin, AccountUser, BatchServiceAdmin, CompanyAdmin, CompanyUser, Compliance Root User, ComplianceAdmin, ComplianceUser, CSPAdmin, CSPTester, FirmAdmin, FirmUser, Registrar, SiteAdmin, SSTAdmin, SystemAdmin, TechnicalSupportAdmin, TechnicalSupportUser, TreasuryAdmin, TreasuryUser. - * Swagger Name: AvaTaxClient - * + * * This API requires one of the following user roles: AccountAdmin, AccountUser, BatchServiceAdmin, CompanyAdmin, CompanyUser, Compliance Root User, ComplianceAdmin, ComplianceUser, CSPAdmin, CSPTester, FirmAdmin, FirmUser, Registrar, SiteAdmin, SSTAdmin, SystemAdmin, TechnicalSupportAdmin, TechnicalSupportUser, TreasuryAdmin, TreasuryUser. + * Swagger Name: AvaTaxClient + * * * @param {number} 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 {number} top If nonzero, return no more than this number of results. Used with `$skip` to provide pagination for large datasets. Unless otherwise specified, the maximum number of records that can be returned from an API call is 1,000 records. * @param {number} skip If nonzero, skip this number of results before returning data. Used with `$top` to provide pagination for large datasets. - * @param {string} orderBy A comma separated list of sort statements in the format `(fieldname) [ASC|DESC]`, for example `id ASC`. - * @return {FetchResult} - */ - - listSubscriptionsByAccount({ accountId, filter, top, skip, orderBy }: { accountId: number, filter?: string, top?: number, skip?: number, orderBy?: string }): Promise> { - 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 }: { accountId: number, filter?: string, top?: number, skip?: number, orderBy?: string }): Promise> { + var path = this.buildUrl({ + url: `/api/v2/accounts/${accountId}/subscriptions`, parameters: { $filter: filter, $top: top, $skip: skip, $orderBy: orderBy } - }); - var strClientId = - this.appNM + - '; ' + - this.appVer + - '; JavascriptSdk; ' + this.apiVersion + '; ' + - this.machineNM; + }); + var strClientId = + this.appNM + + '; ' + + this.appVer + + '; JavascriptSdk; ' + this.apiVersion + '; ' + + this.machineNM; return this.restCall({ url: path, verb: 'get', payload: null, clientId: strClientId }, FetchResult); - } - - /** - * Retrieve all subscriptions + } + + /** + * 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. @@ -12351,38 +12612,38 @@ export default class AvaTaxClient { * * ### Security Policies * - * * This API requires one of the following user roles: AccountAdmin, AccountUser, BatchServiceAdmin, CompanyAdmin, CompanyUser, Compliance Root User, ComplianceAdmin, ComplianceUser, CSPAdmin, CSPTester, FirmAdmin, FirmUser, Registrar, SiteAdmin, SSTAdmin, SystemAdmin, TechnicalSupportAdmin, TechnicalSupportUser, TreasuryAdmin, TreasuryUser. - * Swagger Name: AvaTaxClient - * + * * This API requires one of the following user roles: AccountAdmin, AccountUser, BatchServiceAdmin, 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 {number} top If nonzero, return no more than this number of results. Used with `$skip` to provide pagination for large datasets. Unless otherwise specified, the maximum number of records that can be returned from an API call is 1,000 records. * @param {number} skip If nonzero, skip this number of results before returning data. Used with `$top` to provide pagination for large datasets. - * @param {string} orderBy A comma separated list of sort statements in the format `(fieldname) [ASC|DESC]`, for example `id ASC`. - * @return {FetchResult} - */ - - querySubscriptions({ filter, top, skip, orderBy }: { filter?: string, top?: number, skip?: number, orderBy?: string }): Promise> { - 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 }: { filter?: string, top?: number, skip?: number, orderBy?: string }): Promise> { + var path = this.buildUrl({ + url: `/api/v2/subscriptions`, parameters: { $filter: filter, $top: top, $skip: skip, $orderBy: orderBy } - }); - var strClientId = - this.appNM + - '; ' + - this.appVer + - '; JavascriptSdk; ' + this.apiVersion + '; ' + - this.machineNM; + }); + var strClientId = + this.appNM + + '; ' + + this.appVer + + '; JavascriptSdk; ' + this.apiVersion + '; ' + + this.machineNM; return this.restCall({ url: path, verb: 'get', payload: null, clientId: strClientId }, FetchResult); - } - - /** - * Create a new tax code + } + + /** + * 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. @@ -12391,60 +12652,60 @@ export default class AvaTaxClient { * * ### Security Policies * - * * This API requires one of the following user roles: AccountAdmin, BatchServiceAdmin, CompanyAdmin, CSPTester, SSTAdmin, TechnicalSupportAdmin. - * Swagger Name: AvaTaxClient - * + * * This API requires one of the following user roles: AccountAdmin, BatchServiceAdmin, CompanyAdmin, CSPTester, SSTAdmin, TechnicalSupportAdmin. + * Swagger Name: AvaTaxClient + * * * @param {number} companyId The ID of the company that owns this tax code. - * @param {Models.TaxCodeModel[]} model The tax code you wish to create. - * @return {Models.TaxCodeModel[]} - */ - - createTaxCodes({ companyId, model }: { companyId: number, model: Models.TaxCodeModel[] }): Promise> { - var path = this.buildUrl({ - url: `/api/v2/companies/${companyId}/taxcodes`, - parameters: {} - }); - var strClientId = - this.appNM + - '; ' + - this.appVer + - '; JavascriptSdk; ' + this.apiVersion + '; ' + - this.machineNM; + * @param {Models.TaxCodeModel[]} model The tax code you wish to create. + * @return {Models.TaxCodeModel[]} + */ + + createTaxCodes({ companyId, model }: { companyId: number, model: Models.TaxCodeModel[] }): Promise> { + var path = this.buildUrl({ + url: `/api/v2/companies/${companyId}/taxcodes`, + parameters: {} + }); + var strClientId = + this.appNM + + '; ' + + this.appVer + + '; JavascriptSdk; ' + this.apiVersion + '; ' + + this.machineNM; return this.restCall({ url: path, verb: 'post', payload: model, clientId: strClientId }, Array); - } - - /** - * Delete a single tax code + } + + /** + * 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, BatchServiceAdmin, CompanyAdmin, CSPTester, SSTAdmin, TechnicalSupportAdmin. - * Swagger Name: AvaTaxClient - * + * * This API requires one of the following user roles: AccountAdmin, BatchServiceAdmin, CompanyAdmin, CSPTester, SSTAdmin, TechnicalSupportAdmin. + * Swagger Name: AvaTaxClient + * * * @param {number} companyId The ID of the company that owns this tax code. - * @param {number} id The ID of the tax code you wish to delete. - * @return {Models.ErrorDetail[]} - */ - - deleteTaxCode({ companyId, id }: { companyId: number, id: number }): Promise> { - var path = this.buildUrl({ - url: `/api/v2/companies/${companyId}/taxcodes/${id}`, - parameters: {} - }); - var strClientId = - this.appNM + - '; ' + - this.appVer + - '; JavascriptSdk; ' + this.apiVersion + '; ' + - this.machineNM; + * @param {number} id The ID of the tax code you wish to delete. + * @return {Models.ErrorDetail[]} + */ + + deleteTaxCode({ companyId, id }: { companyId: number, id: number }): Promise> { + var path = this.buildUrl({ + url: `/api/v2/companies/${companyId}/taxcodes/${id}`, + parameters: {} + }); + var strClientId = + this.appNM + + '; ' + + this.appVer + + '; JavascriptSdk; ' + this.apiVersion + '; ' + + this.machineNM; return this.restCall({ url: path, verb: 'delete', payload: null, clientId: strClientId }, Array); - } - - /** - * Retrieve a single tax code + } + + /** + * 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. @@ -12453,31 +12714,31 @@ export default class AvaTaxClient { * * ### Security Policies * - * * This API requires one of the following user roles: AccountAdmin, AccountUser, BatchServiceAdmin, CompanyAdmin, CompanyUser, CSPAdmin, CSPTester, ECMAccountUser, ECMCompanyUser, SiteAdmin, SSTAdmin, SystemAdmin, TechnicalSupportAdmin, TechnicalSupportUser. - * Swagger Name: AvaTaxClient - * + * * This API requires one of the following user roles: AccountAdmin, AccountUser, BatchServiceAdmin, CompanyAdmin, CompanyUser, CSPAdmin, CSPTester, ECMAccountUser, ECMCompanyUser, SiteAdmin, SSTAdmin, SystemAdmin, TechnicalSupportAdmin, TechnicalSupportUser. + * Swagger Name: AvaTaxClient + * * * @param {number} companyId The ID of the company that owns this tax code - * @param {number} id The primary key of this tax code - * @return {Models.TaxCodeModel} - */ - - getTaxCode({ companyId, id }: { companyId: number, id: number }): Promise { - var path = this.buildUrl({ - url: `/api/v2/companies/${companyId}/taxcodes/${id}`, - parameters: {} - }); - var strClientId = - this.appNM + - '; ' + - this.appVer + - '; JavascriptSdk; ' + this.apiVersion + '; ' + - this.machineNM; + * @param {number} id The primary key of this tax code + * @return {Models.TaxCodeModel} + */ + + getTaxCode({ companyId, id }: { companyId: number, id: number }): Promise { + var path = this.buildUrl({ + url: `/api/v2/companies/${companyId}/taxcodes/${id}`, + parameters: {} + }); + var strClientId = + this.appNM + + '; ' + + this.appVer + + '; JavascriptSdk; ' + this.apiVersion + '; ' + + this.machineNM; return this.restCall({ url: path, verb: 'get', payload: null, clientId: strClientId }, Models.TaxCodeModel); - } - - /** - * Retrieve tax codes for this company + } + + /** + * 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. @@ -12489,22 +12750,22 @@ export default class AvaTaxClient { * * ### Security Policies * - * * This API requires one of the following user roles: AccountAdmin, AccountUser, BatchServiceAdmin, CompanyAdmin, CompanyUser, CSPAdmin, CSPTester, ECMAccountUser, ECMCompanyUser, SiteAdmin, SSTAdmin, SystemAdmin, TechnicalSupportAdmin, TechnicalSupportUser. - * Swagger Name: AvaTaxClient - * + * * This API requires one of the following user roles: AccountAdmin, AccountUser, BatchServiceAdmin, CompanyAdmin, CompanyUser, CSPAdmin, CSPTester, ECMAccountUser, ECMCompanyUser, SiteAdmin, SSTAdmin, SystemAdmin, TechnicalSupportAdmin, TechnicalSupportUser. + * Swagger Name: AvaTaxClient + * * * @param {number} 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 {number} top If nonzero, return no more than this number of results. Used with `$skip` to provide pagination for large datasets. Unless otherwise specified, the maximum number of records that can be returned from an API call is 1,000 records. * @param {number} skip If nonzero, skip this number of results before returning data. Used with `$top` to provide pagination for large datasets. - * @param {string} orderBy A comma separated list of sort statements in the format `(fieldname) [ASC|DESC]`, for example `id ASC`. - * @return {FetchResult} - */ - - listTaxCodesByCompany({ companyId, filter, include, top, skip, orderBy }: { companyId: number, filter?: string, include?: string, top?: number, skip?: number, orderBy?: string }): Promise> { - var path = this.buildUrl({ - url: `/api/v2/companies/${companyId}/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 }: { companyId: number, filter?: string, include?: string, top?: number, skip?: number, orderBy?: string }): Promise> { + var path = this.buildUrl({ + url: `/api/v2/companies/${companyId}/taxcodes`, parameters: { $filter: filter, $include: include, @@ -12512,18 +12773,18 @@ export default class AvaTaxClient { $skip: skip, $orderBy: orderBy } - }); - var strClientId = - this.appNM + - '; ' + - this.appVer + - '; JavascriptSdk; ' + this.apiVersion + '; ' + - this.machineNM; + }); + var strClientId = + this.appNM + + '; ' + + this.appVer + + '; JavascriptSdk; ' + this.apiVersion + '; ' + + this.machineNM; return this.restCall({ url: path, verb: 'get', payload: null, clientId: strClientId }, FetchResult); - } - - /** - * Retrieve all tax codes + } + + /** + * 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. @@ -12535,21 +12796,21 @@ export default class AvaTaxClient { * * ### Security Policies * - * * This API requires one of the following user roles: AccountAdmin, AccountUser, BatchServiceAdmin, CompanyAdmin, CompanyUser, CSPAdmin, CSPTester, ECMAccountUser, ECMCompanyUser, SiteAdmin, SSTAdmin, SystemAdmin, TechnicalSupportAdmin, TechnicalSupportUser. - * Swagger Name: AvaTaxClient - * + * * This API requires one of the following user roles: AccountAdmin, AccountUser, BatchServiceAdmin, CompanyAdmin, CompanyUser, CSPAdmin, CSPTester, ECMAccountUser, ECMCompanyUser, 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 {number} top If nonzero, return no more than this number of results. Used with `$skip` to provide pagination for large datasets. Unless otherwise specified, the maximum number of records that can be returned from an API call is 1,000 records. * @param {number} skip If nonzero, skip this number of results before returning data. Used with `$top` to provide pagination for large datasets. - * @param {string} orderBy A comma separated list of sort statements in the format `(fieldname) [ASC|DESC]`, for example `id ASC`. - * @return {FetchResult} - */ - - queryTaxCodes({ filter, include, top, skip, orderBy }: { filter?: string, include?: string, top?: number, skip?: number, orderBy?: string }): Promise> { - 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 }: { filter?: string, include?: string, top?: number, skip?: number, orderBy?: string }): Promise> { + var path = this.buildUrl({ + url: `/api/v2/taxcodes`, parameters: { $filter: filter, $include: include, @@ -12557,18 +12818,18 @@ export default class AvaTaxClient { $skip: skip, $orderBy: orderBy } - }); - var strClientId = - this.appNM + - '; ' + - this.appVer + - '; JavascriptSdk; ' + this.apiVersion + '; ' + - this.machineNM; + }); + var strClientId = + this.appNM + + '; ' + + this.appVer + + '; JavascriptSdk; ' + this.apiVersion + '; ' + + this.machineNM; return this.restCall({ url: path, verb: 'get', payload: null, clientId: strClientId }, FetchResult); - } - - /** - * Update a single tax code + } + + /** + * 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. @@ -12579,32 +12840,32 @@ export default class AvaTaxClient { * * ### Security Policies * - * * This API requires one of the following user roles: AccountAdmin, BatchServiceAdmin, CompanyAdmin, CSPTester, SSTAdmin, TechnicalSupportAdmin. - * Swagger Name: AvaTaxClient - * + * * This API requires one of the following user roles: AccountAdmin, BatchServiceAdmin, CompanyAdmin, CSPTester, SSTAdmin, TechnicalSupportAdmin. + * Swagger Name: AvaTaxClient + * * * @param {number} companyId The ID of the company that this tax code belongs to. * @param {number} id The ID of the tax code you wish to update - * @param {Models.TaxCodeModel} model The tax code you wish to update. - * @return {Models.TaxCodeModel} - */ - - updateTaxCode({ companyId, id, model }: { companyId: number, id: number, model: Models.TaxCodeModel }): Promise { - var path = this.buildUrl({ - url: `/api/v2/companies/${companyId}/taxcodes/${id}`, - parameters: {} - }); - var strClientId = - this.appNM + - '; ' + - this.appVer + - '; JavascriptSdk; ' + this.apiVersion + '; ' + - this.machineNM; + * @param {Models.TaxCodeModel} model The tax code you wish to update. + * @return {Models.TaxCodeModel} + */ + + updateTaxCode({ companyId, id, model }: { companyId: number, id: number, model: Models.TaxCodeModel }): Promise { + var path = this.buildUrl({ + url: `/api/v2/companies/${companyId}/taxcodes/${id}`, + parameters: {} + }); + var strClientId = + this.appNM + + '; ' + + this.appVer + + '; JavascriptSdk; ' + this.apiVersion + '; ' + + this.machineNM; return this.restCall({ url: path, verb: 'put', payload: model, clientId: strClientId }, Models.TaxCodeModel); - } - - /** - * Build a multi-location tax content file + } + + /** + * 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 @@ -12632,30 +12893,30 @@ export default class AvaTaxClient { * ### Security Policies * * * This API requires one of the following user roles: AccountAdmin, AccountOperator, AccountUser, BatchServiceAdmin, CompanyAdmin, CompanyUser, Compliance Root User, ComplianceAdmin, ComplianceUser, CSPAdmin, CSPTester, ECMAccountUser, ECMCompanyUser, FirmAdmin, FirmUser, ProStoresOperator, Registrar, SiteAdmin, SSTAdmin, SystemAdmin, TechnicalSupportAdmin, TechnicalSupportUser, TreasuryAdmin, TreasuryUser. - * * This API depends on the following active services:*Required* (all): AvaTaxPro. - * Swagger Name: AvaTaxClient - * - * - * @param {Models.PointOfSaleDataRequestModel} model Parameters about the desired file format and report format, specifying which company, locations and TaxCodes to include. - * @return {object} - */ - - buildTaxContentFile({ model }: { model: Models.PointOfSaleDataRequestModel }): Promise { - var path = this.buildUrl({ - url: `/api/v2/pointofsaledata/build`, - parameters: {} - }); - var strClientId = - this.appNM + - '; ' + - this.appVer + - '; JavascriptSdk; ' + this.apiVersion + '; ' + - this.machineNM; + * * This API depends on the following active services:*Required* (all): AvaTaxPro. + * Swagger Name: AvaTaxClient + * + * + * @param {Models.PointOfSaleDataRequestModel} model Parameters about the desired file format and report format, specifying which company, locations and TaxCodes to include. + * @return {object} + */ + + buildTaxContentFile({ model }: { model: Models.PointOfSaleDataRequestModel }): Promise { + var path = this.buildUrl({ + url: `/api/v2/pointofsaledata/build`, + parameters: {} + }); + var strClientId = + this.appNM + + '; ' + + this.appVer + + '; JavascriptSdk; ' + this.apiVersion + '; ' + + this.machineNM; return this.restCall({ url: path, verb: 'post', payload: model, clientId: strClientId }, Object); - } - - /** - * Build a tax content file for a single location + } + + /** + * 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 @@ -12683,40 +12944,40 @@ export default class AvaTaxClient { * ### Security Policies * * * This API requires one of the following user roles: AccountAdmin, AccountOperator, AccountUser, BatchServiceAdmin, CompanyAdmin, CompanyUser, Compliance Root User, ComplianceAdmin, ComplianceUser, CSPAdmin, CSPTester, ECMAccountUser, ECMCompanyUser, FirmAdmin, FirmUser, ProStoresOperator, Registrar, SiteAdmin, SSTAdmin, SystemAdmin, TechnicalSupportAdmin, TechnicalSupportUser, TreasuryAdmin, TreasuryUser. - * * This API depends on the following active services:*Required* (all): AvaTaxPro. - * Swagger Name: AvaTaxClient - * + * * This API depends on the following active services:*Required* (all): AvaTaxPro. + * Swagger Name: AvaTaxClient + * * * @param {number} companyId The ID number of the company that owns this location. * @param {number} id The ID number of the location to retrieve point-of-sale data. * @param {Date} date The date for which point-of-sale data would be calculated (today by default) * @param {Enums.PointOfSaleFileType} format The format of the file (JSON by default) (See PointOfSaleFileType::* for a list of allowable values) * @param {Enums.PointOfSalePartnerId} 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 }: { companyId: number, id: number, date?: Date, format?: Enums.PointOfSaleFileType, partnerId?: Enums.PointOfSalePartnerId, includeJurisCodes?: boolean }): Promise { - 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 }: { companyId: number, id: number, date?: Date, format?: Enums.PointOfSaleFileType, partnerId?: Enums.PointOfSalePartnerId, includeJurisCodes?: boolean }): Promise { + var path = this.buildUrl({ + url: `/api/v2/companies/${companyId}/locations/${id}/pointofsaledata`, parameters: { date: date, format: format, partnerId: partnerId, includeJurisCodes: includeJurisCodes } - }); - var strClientId = - this.appNM + - '; ' + - this.appVer + - '; JavascriptSdk; ' + this.apiVersion + '; ' + - this.machineNM; + }); + var strClientId = + this.appNM + + '; ' + + this.appVer + + '; JavascriptSdk; ' + this.apiVersion + '; ' + + this.machineNM; return this.restCall({ url: path, verb: 'get', payload: null, clientId: strClientId }, Object); - } - - /** - * Download a file listing tax rates by postal code + } + + /** + * 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. * @@ -12760,33 +13021,33 @@ export default class AvaTaxClient { * * ### Security Policies * - * * This API requires one of the following user roles: AccountAdmin, AccountOperator, AccountUser, BatchServiceAdmin, CompanyAdmin, CompanyUser, Compliance Root User, ComplianceAdmin, ComplianceUser, CSPAdmin, CSPTester, ECMAccountUser, ECMCompanyUser, FirmAdmin, FirmUser, ProStoresOperator, Registrar, SiteAdmin, SSTAdmin, SystemAdmin, TechnicalSupportAdmin, TechnicalSupportUser, TreasuryAdmin, TreasuryUser. - * Swagger Name: AvaTaxClient - * + * * This API requires one of the following user roles: AccountAdmin, AccountOperator, AccountUser, BatchServiceAdmin, CompanyAdmin, CompanyUser, Compliance Root User, ComplianceAdmin, ComplianceUser, CSPAdmin, CSPTester, ECMAccountUser, ECMCompanyUser, FirmAdmin, FirmUser, ProStoresOperator, Registrar, SiteAdmin, SSTAdmin, SystemAdmin, TechnicalSupportAdmin, TechnicalSupportUser, TreasuryAdmin, TreasuryUser. + * Swagger Name: AvaTaxClient + * * * @param {Date} 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 }: { date: Date, region?: string }): Promise { - 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 }: { date: Date, region?: string }): Promise { + var path = this.buildUrl({ + url: `/api/v2/taxratesbyzipcode/download/${date}`, parameters: { region: region } - }); - var strClientId = - this.appNM + - '; ' + - this.appVer + - '; JavascriptSdk; ' + this.apiVersion + '; ' + - this.machineNM; + }); + var strClientId = + this.appNM + + '; ' + + this.appVer + + '; JavascriptSdk; ' + this.apiVersion + '; ' + + this.machineNM; return this.restCall({ url: path, verb: 'get', payload: null, clientId: strClientId }, Object); - } - - /** - * Sales tax rates for a specified address + } + + /** + * 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`. * @@ -12808,9 +13069,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. - * Swagger Name: AvaTaxClient - * + * 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. @@ -12818,13 +13079,13 @@ 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 {Models.TaxRateModel} - */ - - taxRatesByAddress({ line1, line2, line3, city, region, postalCode, country }: { line1: string, line2?: string, line3?: string, city?: string, region: string, postalCode: string, country: string }): Promise { - 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 {Models.TaxRateModel} + */ + + taxRatesByAddress({ line1, line2, line3, city, region, postalCode, country }: { line1: string, line2?: string, line3?: string, city?: string, region: string, postalCode: string, country: string }): Promise { + var path = this.buildUrl({ + url: `/api/v2/taxrates/byaddress`, parameters: { line1: line1, line2: line2, @@ -12834,18 +13095,18 @@ export default class AvaTaxClient { postalCode: postalCode, country: country } - }); - var strClientId = - this.appNM + - '; ' + - this.appVer + - '; JavascriptSdk; ' + this.apiVersion + '; ' + - this.machineNM; + }); + var strClientId = + this.appNM + + '; ' + + this.appVer + + '; JavascriptSdk; ' + this.apiVersion + '; ' + + this.machineNM; return this.restCall({ url: path, verb: 'get', payload: null, clientId: strClientId }, Models.TaxRateModel); - } - - /** - * Sales tax rates for a specified country and postal code. This API is only available for US postal codes. + } + + /** + * 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 @@ -12869,34 +13130,34 @@ 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. - * Swagger Name: AvaTaxClient - * + * 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 {Models.TaxRateModel} - */ - - taxRatesByPostalCode({ country, postalCode }: { country: string, postalCode: string }): Promise { - var path = this.buildUrl({ - url: `/api/v2/taxrates/bypostalcode`, + * @param {string} postalCode The postal code of the location. + * @return {Models.TaxRateModel} + */ + + taxRatesByPostalCode({ country, postalCode }: { country: string, postalCode: string }): Promise { + var path = this.buildUrl({ + url: `/api/v2/taxrates/bypostalcode`, parameters: { country: country, postalCode: postalCode } - }); - var strClientId = - this.appNM + - '; ' + - this.appVer + - '; JavascriptSdk; ' + this.apiVersion + '; ' + - this.machineNM; + }); + var strClientId = + this.appNM + + '; ' + + this.appVer + + '; JavascriptSdk; ' + this.apiVersion + '; ' + + this.machineNM; return this.restCall({ url: path, verb: 'get', payload: null, clientId: strClientId }, Models.TaxRateModel); - } - - /** - * Create new Country Coefficients. If already exist update them. + } + + /** + * Create new Country Coefficients. If already exist update them. * Create one or more Country Coefficients for particular country. * * We would like to use country coefficients during Cross-Border calculations to slightly increase or decrease @@ -12907,30 +13168,30 @@ export default class AvaTaxClient { * * Make sure to use the same API to update the country coefficients that is already present in the database. * This will make existing entry for specific country as ineffective for that date. And new entry created will get applicable - * to the newer transactions. - * Swagger Name: AvaTaxClient - * - * - * @param {Models.CountryCoefficientsRequestEntity} model The Country Coefficients for specific country you wish to create. - * @return {Models.CountryCoefficientsResponseModel[]} - */ - - createCountryCoefficients({ model }: { model?: Models.CountryCoefficientsRequestEntity }): Promise> { - var path = this.buildUrl({ - url: `/api/v2/countryCoefficients`, - parameters: {} - }); - var strClientId = - this.appNM + - '; ' + - this.appVer + - '; JavascriptSdk; ' + this.apiVersion + '; ' + - this.machineNM; + * to the newer transactions. + * Swagger Name: AvaTaxClient + * + * + * @param {Models.CountryCoefficientsRequestEntity} model The Country Coefficients for specific country you wish to create. + * @return {Models.CountryCoefficientsResponseModel[]} + */ + + createCountryCoefficients({ model }: { model?: Models.CountryCoefficientsRequestEntity }): Promise> { + var path = this.buildUrl({ + url: `/api/v2/countryCoefficients`, + parameters: {} + }); + var strClientId = + this.appNM + + '; ' + + this.appVer + + '; JavascriptSdk; ' + this.apiVersion + '; ' + + this.machineNM; return this.restCall({ url: path, verb: 'put', payload: model, clientId: strClientId }, Array); - } - - /** - * Create a new tax rule + } + + /** + * 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 @@ -12947,31 +13208,31 @@ export default class AvaTaxClient { * * ### Security Policies * - * * This API requires one of the following user roles: AccountAdmin, BatchServiceAdmin, CompanyAdmin, CSPTester, SSTAdmin, TechnicalSupportAdmin. - * Swagger Name: AvaTaxClient - * + * * This API requires one of the following user roles: AccountAdmin, BatchServiceAdmin, CompanyAdmin, CSPTester, SSTAdmin, TechnicalSupportAdmin. + * Swagger Name: AvaTaxClient + * * * @param {number} companyId The ID of the company that owns this tax rule. - * @param {Models.TaxRuleModel[]} model The tax rule you wish to create. - * @return {Models.TaxRuleModel[]} - */ - - createTaxRules({ companyId, model }: { companyId: number, model: Models.TaxRuleModel[] }): Promise> { - var path = this.buildUrl({ - url: `/api/v2/companies/${companyId}/taxrules`, - parameters: {} - }); - var strClientId = - this.appNM + - '; ' + - this.appVer + - '; JavascriptSdk; ' + this.apiVersion + '; ' + - this.machineNM; + * @param {Models.TaxRuleModel[]} model The tax rule you wish to create. + * @return {Models.TaxRuleModel[]} + */ + + createTaxRules({ companyId, model }: { companyId: number, model: Models.TaxRuleModel[] }): Promise> { + var path = this.buildUrl({ + url: `/api/v2/companies/${companyId}/taxrules`, + parameters: {} + }); + var strClientId = + this.appNM + + '; ' + + this.appVer + + '; JavascriptSdk; ' + this.apiVersion + '; ' + + this.machineNM; return this.restCall({ url: path, verb: 'post', payload: model, clientId: strClientId }, Array); - } - - /** - * Delete a single tax rule + } + + /** + * 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 @@ -12988,31 +13249,31 @@ export default class AvaTaxClient { * * ### Security Policies * - * * This API requires one of the following user roles: AccountAdmin, BatchServiceAdmin, CompanyAdmin, CSPTester, SSTAdmin, TechnicalSupportAdmin. - * Swagger Name: AvaTaxClient - * + * * This API requires one of the following user roles: AccountAdmin, BatchServiceAdmin, CompanyAdmin, CSPTester, SSTAdmin, TechnicalSupportAdmin. + * Swagger Name: AvaTaxClient + * * * @param {number} companyId The ID of the company that owns this tax rule. - * @param {number} id The ID of the tax rule you wish to delete. - * @return {Models.ErrorDetail[]} - */ - - deleteTaxRule({ companyId, id }: { companyId: number, id: number }): Promise> { - var path = this.buildUrl({ - url: `/api/v2/companies/${companyId}/taxrules/${id}`, - parameters: {} - }); - var strClientId = - this.appNM + - '; ' + - this.appVer + - '; JavascriptSdk; ' + this.apiVersion + '; ' + - this.machineNM; + * @param {number} id The ID of the tax rule you wish to delete. + * @return {Models.ErrorDetail[]} + */ + + deleteTaxRule({ companyId, id }: { companyId: number, id: number }): Promise> { + var path = this.buildUrl({ + url: `/api/v2/companies/${companyId}/taxrules/${id}`, + parameters: {} + }); + var strClientId = + this.appNM + + '; ' + + this.appVer + + '; JavascriptSdk; ' + this.apiVersion + '; ' + + this.machineNM; return this.restCall({ url: path, verb: 'delete', payload: null, clientId: strClientId }, Array); - } - - /** - * Retrieve a single tax rule + } + + /** + * 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 @@ -13029,50 +13290,50 @@ export default class AvaTaxClient { * * ### Security Policies * - * * This API requires one of the following user roles: AccountAdmin, AccountUser, BatchServiceAdmin, CompanyAdmin, CompanyUser, CSPAdmin, CSPTester, SiteAdmin, SSTAdmin, SystemAdmin, TechnicalSupportAdmin, TechnicalSupportUser. - * Swagger Name: AvaTaxClient - * + * * This API requires one of the following user roles: AccountAdmin, AccountUser, BatchServiceAdmin, CompanyAdmin, CompanyUser, CSPAdmin, CSPTester, SiteAdmin, SSTAdmin, SystemAdmin, TechnicalSupportAdmin, TechnicalSupportUser. + * Swagger Name: AvaTaxClient + * * * @param {number} companyId The ID of the company that owns this tax rule - * @param {number} id The primary key of this tax rule - * @return {Models.TaxRuleModel} - */ - - getTaxRule({ companyId, id }: { companyId: number, id: number }): Promise { - var path = this.buildUrl({ - url: `/api/v2/companies/${companyId}/taxrules/${id}`, - parameters: {} - }); - var strClientId = - this.appNM + - '; ' + - this.appVer + - '; JavascriptSdk; ' + this.apiVersion + '; ' + - this.machineNM; + * @param {number} id The primary key of this tax rule + * @return {Models.TaxRuleModel} + */ + + getTaxRule({ companyId, id }: { companyId: number, id: number }): Promise { + var path = this.buildUrl({ + url: `/api/v2/companies/${companyId}/taxrules/${id}`, + parameters: {} + }); + var strClientId = + this.appNM + + '; ' + + this.appVer + + '; JavascriptSdk; ' + this.apiVersion + '; ' + + this.machineNM; return this.restCall({ url: path, verb: 'get', payload: null, clientId: strClientId }, Models.TaxRuleModel); - } - - /** - * Retrieve country coefficients for specific country + } + + /** + * Retrieve country coefficients for specific country * Retrieve all or any specific records of Country Coefficients based on the filters(optional) for specific country. * * 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. - * Swagger Name: AvaTaxClient - * + * Paginate your results using the `$top`, `$skip`, and `$orderby` parameters. + * Swagger Name: AvaTaxClient + * * * @param {string} country Country for which data need to be pulled 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:* CoefficientsId, AccountId, ModifiedUserId, CreatedUserId * @param {string} include A comma separated list of additional data to retrieve. * @param {number} top If nonzero, return no more than this number of results. Used with `$skip` to provide pagination for large datasets. Unless otherwise specified, the maximum number of records that can be returned from an API call is 1,000 records. * @param {number} skip If nonzero, skip this number of results before returning data. Used with `$top` to provide pagination for large datasets. - * @param {string} orderBy A comma separated list of sort statements in the format `(fieldname) [ASC|DESC]`, for example `id ASC`. - * @return {FetchResult} - */ - - listCountryCoefficients({ country, filter, include, top, skip, orderBy }: { country: string, filter?: string, include?: string, top?: number, skip?: number, orderBy?: string }): Promise> { - var path = this.buildUrl({ - url: `/api/v2/${country}/CountryCoefficients`, + * @param {string} orderBy A comma separated list of sort statements in the format `(fieldname) [ASC|DESC]`, for example `id ASC`. + * @return {FetchResult} + */ + + listCountryCoefficients({ country, filter, include, top, skip, orderBy }: { country: string, filter?: string, include?: string, top?: number, skip?: number, orderBy?: string }): Promise> { + var path = this.buildUrl({ + url: `/api/v2/${country}/CountryCoefficients`, parameters: { $filter: filter, $include: include, @@ -13080,18 +13341,18 @@ export default class AvaTaxClient { $skip: skip, $orderBy: orderBy } - }); - var strClientId = - this.appNM + - '; ' + - this.appVer + - '; JavascriptSdk; ' + this.apiVersion + '; ' + - this.machineNM; + }); + var strClientId = + this.appNM + + '; ' + + this.appVer + + '; JavascriptSdk; ' + this.apiVersion + '; ' + + this.machineNM; return this.restCall({ url: path, verb: 'get', payload: null, clientId: strClientId }, FetchResult); - } - - /** - * Retrieve tax rules for this company + } + + /** + * 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 @@ -13111,22 +13372,22 @@ export default class AvaTaxClient { * * ### Security Policies * - * * This API requires one of the following user roles: AccountAdmin, AccountUser, BatchServiceAdmin, CompanyAdmin, CompanyUser, CSPAdmin, CSPTester, SiteAdmin, SSTAdmin, SystemAdmin, TechnicalSupportAdmin, TechnicalSupportUser. - * Swagger Name: AvaTaxClient - * + * * This API requires one of the following user roles: AccountAdmin, AccountUser, BatchServiceAdmin, CompanyAdmin, CompanyUser, CSPAdmin, CSPTester, SiteAdmin, SSTAdmin, SystemAdmin, TechnicalSupportAdmin, TechnicalSupportUser. + * Swagger Name: AvaTaxClient + * * * @param {number} companyId The ID of the company that 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 {number} top If nonzero, return no more than this number of results. Used with `$skip` to provide pagination for large datasets. Unless otherwise specified, the maximum number of records that can be returned from an API call is 1,000 records. * @param {number} skip If nonzero, skip this number of results before returning data. Used with `$top` to provide pagination for large datasets. - * @param {string} orderBy A comma separated list of sort statements in the format `(fieldname) [ASC|DESC]`, for example `id ASC`. - * @return {FetchResult} - */ - - listTaxRules({ companyId, filter, include, top, skip, orderBy }: { companyId: number, filter?: string, include?: string, top?: number, skip?: number, orderBy?: string }): Promise> { - var path = this.buildUrl({ - url: `/api/v2/companies/${companyId}/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 }: { companyId: number, filter?: string, include?: string, top?: number, skip?: number, orderBy?: string }): Promise> { + var path = this.buildUrl({ + url: `/api/v2/companies/${companyId}/taxrules`, parameters: { $filter: filter, $include: include, @@ -13134,18 +13395,18 @@ export default class AvaTaxClient { $skip: skip, $orderBy: orderBy } - }); - var strClientId = - this.appNM + - '; ' + - this.appVer + - '; JavascriptSdk; ' + this.apiVersion + '; ' + - this.machineNM; + }); + var strClientId = + this.appNM + + '; ' + + this.appVer + + '; JavascriptSdk; ' + this.apiVersion + '; ' + + this.machineNM; return this.restCall({ url: path, verb: 'get', payload: null, clientId: strClientId }, FetchResult); - } - - /** - * Retrieve all tax rules + } + + /** + * 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 @@ -13165,21 +13426,21 @@ export default class AvaTaxClient { * * ### Security Policies * - * * This API requires one of the following user roles: AccountAdmin, AccountUser, BatchServiceAdmin, CompanyAdmin, CompanyUser, CSPAdmin, CSPTester, SiteAdmin, SSTAdmin, SystemAdmin, TechnicalSupportAdmin, TechnicalSupportUser. - * Swagger Name: AvaTaxClient - * + * * This API requires one of the following user roles: AccountAdmin, AccountUser, BatchServiceAdmin, CompanyAdmin, CompanyUser, CSPAdmin, CSPTester, SiteAdmin, SSTAdmin, SystemAdmin, TechnicalSupportAdmin, TechnicalSupportUser. + * Swagger Name: AvaTaxClient + * * * @param {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 {number} top If nonzero, return no more than this number of results. Used with `$skip` to provide pagination for large datasets. Unless otherwise specified, the maximum number of records that can be returned from an API call is 1,000 records. * @param {number} skip If nonzero, skip this number of results before returning data. Used with `$top` to provide pagination for large datasets. - * @param {string} orderBy A comma separated list of sort statements in the format `(fieldname) [ASC|DESC]`, for example `id ASC`. - * @return {FetchResult} - */ - - queryTaxRules({ filter, include, top, skip, orderBy }: { filter?: string, include?: string, top?: number, skip?: number, orderBy?: string }): Promise> { - 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 }: { filter?: string, include?: string, top?: number, skip?: number, orderBy?: string }): Promise> { + var path = this.buildUrl({ + url: `/api/v2/taxrules`, parameters: { $filter: filter, $include: include, @@ -13187,18 +13448,18 @@ export default class AvaTaxClient { $skip: skip, $orderBy: orderBy } - }); - var strClientId = - this.appNM + - '; ' + - this.appVer + - '; JavascriptSdk; ' + this.apiVersion + '; ' + - this.machineNM; + }); + var strClientId = + this.appNM + + '; ' + + this.appVer + + '; JavascriptSdk; ' + this.apiVersion + '; ' + + this.machineNM; return this.restCall({ url: path, verb: 'get', payload: null, clientId: strClientId }, FetchResult); - } - - /** - * Update a single tax rule + } + + /** + * 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 @@ -13215,32 +13476,32 @@ export default class AvaTaxClient { * * ### Security Policies * - * * This API requires one of the following user roles: AccountAdmin, BatchServiceAdmin, CompanyAdmin, CSPTester, SSTAdmin, TechnicalSupportAdmin. - * Swagger Name: AvaTaxClient - * + * * This API requires one of the following user roles: AccountAdmin, BatchServiceAdmin, CompanyAdmin, CSPTester, SSTAdmin, TechnicalSupportAdmin. + * Swagger Name: AvaTaxClient + * * * @param {number} companyId The ID of the company that this tax rule belongs to. * @param {number} id The ID of the tax rule you wish to update - * @param {Models.TaxRuleModel} model The tax rule you wish to update. - * @return {Models.TaxRuleModel} - */ - - updateTaxRule({ companyId, id, model }: { companyId: number, id: number, model: Models.TaxRuleModel }): Promise { - var path = this.buildUrl({ - url: `/api/v2/companies/${companyId}/taxrules/${id}`, - parameters: {} - }); - var strClientId = - this.appNM + - '; ' + - this.appVer + - '; JavascriptSdk; ' + this.apiVersion + '; ' + - this.machineNM; + * @param {Models.TaxRuleModel} model The tax rule you wish to update. + * @return {Models.TaxRuleModel} + */ + + updateTaxRule({ companyId, id, model }: { companyId: number, id: number, model: Models.TaxRuleModel }): Promise { + var path = this.buildUrl({ + url: `/api/v2/companies/${companyId}/taxrules/${id}`, + parameters: {} + }); + var strClientId = + this.appNM + + '; ' + + this.appVer + + '; JavascriptSdk; ' + this.apiVersion + '; ' + + this.machineNM; return this.restCall({ url: path, verb: 'put', payload: model, clientId: strClientId }, Models.TaxRuleModel); - } - - /** - * Add lines to an existing unlocked transaction + } + + /** + * 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 @@ -13266,33 +13527,33 @@ export default class AvaTaxClient { * ### Security Policies * * * This API requires one of the following user roles: AccountAdmin, AccountOperator, BatchServiceAdmin, CompanyAdmin, CSPTester, SSTAdmin, TechnicalSupportAdmin, TechnicalSupportUser. - * * This API depends on the following active services:*Required* (all): AvaTaxPro, BasicReturns. - * Swagger Name: AvaTaxClient - * + * * 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 {Models.AddTransactionLineModel} model information about the transaction and lines to be added - * @return {Models.TransactionModel} - */ - - addLines({ include, model }: { include?: string, model: Models.AddTransactionLineModel }): Promise { - var path = this.buildUrl({ - url: `/api/v2/companies/transactions/lines/add`, + * @param {Models.AddTransactionLineModel} model information about the transaction and lines to be added + * @return {Models.TransactionModel} + */ + + addLines({ include, model }: { include?: string, model: Models.AddTransactionLineModel }): Promise { + var path = this.buildUrl({ + url: `/api/v2/companies/transactions/lines/add`, parameters: { $include: include } - }); - var strClientId = - this.appNM + - '; ' + - this.appVer + - '; JavascriptSdk; ' + this.apiVersion + '; ' + - this.machineNM; + }); + var strClientId = + this.appNM + + '; ' + + this.appVer + + '; JavascriptSdk; ' + this.apiVersion + '; ' + + this.machineNM; return this.restCall({ url: path, verb: 'post', payload: model, clientId: strClientId }, Models.TransactionModel); - } - - /** - * Correct a previously created transaction + } + + /** + * 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 @@ -13327,37 +13588,37 @@ export default class AvaTaxClient { * ### Security Policies * * * This API requires one of the following user roles: AccountAdmin, AccountOperator, BatchServiceAdmin, CompanyAdmin, CSPTester, SSTAdmin, TechnicalSupportAdmin, TechnicalSupportUser. - * * This API depends on the following active services:*Required* (all): AvaTaxPro, BasicReturns. - * Swagger Name: AvaTaxClient - * + * * 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 {Enums.DocumentType} 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 {Models.AdjustTransactionModel} model The adjustment you wish to make - * @return {Models.TransactionModel} - */ - - adjustTransaction({ companyCode, transactionCode, documentType, include, model }: { companyCode: string, transactionCode: string, documentType?: Enums.DocumentType, include?: string, model: Models.AdjustTransactionModel }): Promise { - var path = this.buildUrl({ - url: `/api/v2/companies/${companyCode}/transactions/${transactionCode}/adjust`, + * @param {Models.AdjustTransactionModel} model The adjustment you wish to make + * @return {Models.TransactionModel} + */ + + adjustTransaction({ companyCode, transactionCode, documentType, include, model }: { companyCode: string, transactionCode: string, documentType?: Enums.DocumentType, include?: string, model: Models.AdjustTransactionModel }): Promise { + var path = this.buildUrl({ + url: `/api/v2/companies/${companyCode}/transactions/${transactionCode}/adjust`, parameters: { documentType: documentType, $include: include } - }); - var strClientId = - this.appNM + - '; ' + - this.appVer + - '; JavascriptSdk; ' + this.apiVersion + '; ' + - this.machineNM; + }); + var strClientId = + this.appNM + + '; ' + + this.appVer + + '; JavascriptSdk; ' + this.apiVersion + '; ' + + this.machineNM; return this.restCall({ url: path, verb: 'post', payload: model, clientId: strClientId }, Models.TransactionModel); - } - - /** - * Get audit information about a transaction + } + + /** + * 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 @@ -13385,31 +13646,31 @@ export default class AvaTaxClient { * ### Security Policies * * * This API requires one of the following user roles: AccountAdmin, AccountUser, BatchServiceAdmin, CompanyAdmin, CompanyUser, CSPAdmin, CSPTester, ProStoresOperator, SiteAdmin, SSTAdmin, SystemAdmin, TechnicalSupportAdmin, TechnicalSupportUser. - * * This API depends on the following active services:*Required* (all): AvaTaxPro, BasicReturns. - * Swagger Name: AvaTaxClient - * + * * 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 {Models.AuditTransactionModel} - */ - - auditTransaction({ companyCode, transactionCode }: { companyCode: string, transactionCode: string }): Promise { - var path = this.buildUrl({ - url: `/api/v2/companies/${companyCode}/transactions/${transactionCode}/audit`, - parameters: {} - }); - var strClientId = - this.appNM + - '; ' + - this.appVer + - '; JavascriptSdk; ' + this.apiVersion + '; ' + - this.machineNM; + * @param {string} transactionCode The code identifying the transaction + * @return {Models.AuditTransactionModel} + */ + + auditTransaction({ companyCode, transactionCode }: { companyCode: string, transactionCode: string }): Promise { + var path = this.buildUrl({ + url: `/api/v2/companies/${companyCode}/transactions/${transactionCode}/audit`, + parameters: {} + }); + var strClientId = + this.appNM + + '; ' + + this.appVer + + '; JavascriptSdk; ' + this.apiVersion + '; ' + + this.machineNM; return this.restCall({ url: path, verb: 'get', payload: null, clientId: strClientId }, Models.AuditTransactionModel); - } - - /** - * Get audit information about a transaction + } + + /** + * 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 @@ -13437,32 +13698,32 @@ export default class AvaTaxClient { * ### Security Policies * * * This API requires one of the following user roles: AccountAdmin, AccountUser, BatchServiceAdmin, CompanyAdmin, CompanyUser, CSPAdmin, CSPTester, ProStoresOperator, SiteAdmin, SSTAdmin, SystemAdmin, TechnicalSupportAdmin, TechnicalSupportUser. - * * This API depends on the following active services:*Required* (all): AvaTaxPro, BasicReturns. - * Swagger Name: AvaTaxClient - * + * * 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 {Enums.DocumentType} documentType The document type of the original transaction (See DocumentType::* for a list of allowable values) - * @return {Models.AuditTransactionModel} - */ - - auditTransactionWithType({ companyCode, transactionCode, documentType }: { companyCode: string, transactionCode: string, documentType: Enums.DocumentType }): Promise { - var path = this.buildUrl({ - url: `/api/v2/companies/${companyCode}/transactions/${transactionCode}/types/${documentType}/audit`, - parameters: {} - }); - var strClientId = - this.appNM + - '; ' + - this.appVer + - '; JavascriptSdk; ' + this.apiVersion + '; ' + - this.machineNM; + * @param {Enums.DocumentType} documentType The document type of the original transaction (See DocumentType::* for a list of allowable values) + * @return {Models.AuditTransactionModel} + */ + + auditTransactionWithType({ companyCode, transactionCode, documentType }: { companyCode: string, transactionCode: string, documentType: Enums.DocumentType }): Promise { + var path = this.buildUrl({ + url: `/api/v2/companies/${companyCode}/transactions/${transactionCode}/types/${documentType}/audit`, + parameters: {} + }); + var strClientId = + this.appNM + + '; ' + + this.appVer + + '; JavascriptSdk; ' + this.apiVersion + '; ' + + this.machineNM; return this.restCall({ url: path, verb: 'get', payload: null, clientId: strClientId }, Models.AuditTransactionModel); - } - - /** - * Lock a set of documents + } + + /** + * 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. @@ -13474,30 +13735,30 @@ 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. - * Swagger Name: AvaTaxClient - * - * - * @param {Models.BulkLockTransactionModel} model bulk lock request - * @return {Models.BulkLockTransactionResult} - */ - - bulkLockTransaction({ model }: { model: Models.BulkLockTransactionModel }): Promise { - var path = this.buildUrl({ - url: `/api/v2/transactions/lock`, - parameters: {} - }); - var strClientId = - this.appNM + - '; ' + - this.appVer + - '; JavascriptSdk; ' + this.apiVersion + '; ' + - this.machineNM; + * * 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 {Models.BulkLockTransactionModel} model bulk lock request + * @return {Models.BulkLockTransactionResult} + */ + + bulkLockTransaction({ model }: { model: Models.BulkLockTransactionModel }): Promise { + var path = this.buildUrl({ + url: `/api/v2/transactions/lock`, + parameters: {} + }); + var strClientId = + this.appNM + + '; ' + + this.appVer + + '; JavascriptSdk; ' + this.apiVersion + '; ' + + this.machineNM; return this.restCall({ url: path, verb: 'post', payload: model, clientId: strClientId }, Models.BulkLockTransactionResult); - } - - /** - * Change a transaction's code + } + + /** + * 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 @@ -13532,37 +13793,37 @@ export default class AvaTaxClient { * ### Security Policies * * * This API requires one of the following user roles: AccountAdmin, AccountOperator, AccountUser, BatchServiceAdmin, CompanyAdmin, CompanyUser, CSPTester, ProStoresOperator, SSTAdmin, TechnicalSupportAdmin. - * * This API depends on the following active services:*Required* (all): AvaTaxPro, BasicReturns. - * Swagger Name: AvaTaxClient - * + * * 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 {Enums.DocumentType} 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 {Models.ChangeTransactionCodeModel} model The code change request you wish to execute - * @return {Models.TransactionModel} - */ - - changeTransactionCode({ companyCode, transactionCode, documentType, include, model }: { companyCode: string, transactionCode: string, documentType?: Enums.DocumentType, include?: string, model: Models.ChangeTransactionCodeModel }): Promise { - var path = this.buildUrl({ - url: `/api/v2/companies/${companyCode}/transactions/${transactionCode}/changecode`, + * @param {Models.ChangeTransactionCodeModel} model The code change request you wish to execute + * @return {Models.TransactionModel} + */ + + changeTransactionCode({ companyCode, transactionCode, documentType, include, model }: { companyCode: string, transactionCode: string, documentType?: Enums.DocumentType, include?: string, model: Models.ChangeTransactionCodeModel }): Promise { + var path = this.buildUrl({ + url: `/api/v2/companies/${companyCode}/transactions/${transactionCode}/changecode`, parameters: { documentType: documentType, $include: include } - }); - var strClientId = - this.appNM + - '; ' + - this.appVer + - '; JavascriptSdk; ' + this.apiVersion + '; ' + - this.machineNM; + }); + var strClientId = + this.appNM + + '; ' + + this.appVer + + '; JavascriptSdk; ' + this.apiVersion + '; ' + + this.machineNM; return this.restCall({ url: path, verb: 'post', payload: model, clientId: strClientId }, Models.TransactionModel); - } - - /** - * Commit a transaction for reporting + } + + /** + * 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. @@ -13595,37 +13856,37 @@ export default class AvaTaxClient { * * ### Security Policies * - * * This API requires one of the following user roles: AccountAdmin, AccountOperator, AccountUser, BatchServiceAdmin, CompanyAdmin, CompanyUser, CSPTester, ProStoresOperator, SSTAdmin, TechnicalSupportAdmin. - * Swagger Name: AvaTaxClient - * + * * This API requires one of the following user roles: AccountAdmin, AccountOperator, AccountUser, BatchServiceAdmin, 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 {Enums.DocumentType} 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 {Models.CommitTransactionModel} model The commit request you wish to execute - * @return {Models.TransactionModel} - */ - - commitTransaction({ companyCode, transactionCode, documentType, include, model }: { companyCode: string, transactionCode: string, documentType?: Enums.DocumentType, include?: string, model: Models.CommitTransactionModel }): Promise { - var path = this.buildUrl({ - url: `/api/v2/companies/${companyCode}/transactions/${transactionCode}/commit`, + * @param {Models.CommitTransactionModel} model The commit request you wish to execute + * @return {Models.TransactionModel} + */ + + commitTransaction({ companyCode, transactionCode, documentType, include, model }: { companyCode: string, transactionCode: string, documentType?: Enums.DocumentType, include?: string, model: Models.CommitTransactionModel }): Promise { + var path = this.buildUrl({ + url: `/api/v2/companies/${companyCode}/transactions/${transactionCode}/commit`, parameters: { documentType: documentType, $include: include } - }); - var strClientId = - this.appNM + - '; ' + - this.appVer + - '; JavascriptSdk; ' + this.apiVersion + '; ' + - this.machineNM; + }); + var strClientId = + this.appNM + + '; ' + + this.appVer + + '; JavascriptSdk; ' + this.apiVersion + '; ' + + this.machineNM; return this.restCall({ url: path, verb: 'post', payload: model, clientId: strClientId }, Models.TransactionModel); - } - - /** - * Create or adjust a transaction + } + + /** + * 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 @@ -13666,33 +13927,33 @@ export default class AvaTaxClient { * ### Security Policies * * * This API requires one of the following user roles: AccountAdmin, AccountOperator, AccountUser, BatchServiceAdmin, CompanyAdmin, CompanyUser, CSPTester, SSTAdmin, TechnicalSupportAdmin, TechnicalSupportUser. - * * This API depends on the following active services:*Required* (all): AvaTaxPro, BasicReturns. - * Swagger Name: AvaTaxClient - * + * * 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 {Models.CreateOrAdjustTransactionModel} model The transaction you wish to create or adjust - * @return {Models.TransactionModel} - */ - - createOrAdjustTransaction({ include, model }: { include?: string, model: Models.CreateOrAdjustTransactionModel }): Promise { - var path = this.buildUrl({ - url: `/api/v2/transactions/createoradjust`, + * @param {Models.CreateOrAdjustTransactionModel} model The transaction you wish to create or adjust + * @return {Models.TransactionModel} + */ + + createOrAdjustTransaction({ include, model }: { include?: string, model: Models.CreateOrAdjustTransactionModel }): Promise { + var path = this.buildUrl({ + url: `/api/v2/transactions/createoradjust`, parameters: { $include: include } - }); - var strClientId = - this.appNM + - '; ' + - this.appVer + - '; JavascriptSdk; ' + this.apiVersion + '; ' + - this.machineNM; + }); + var strClientId = + this.appNM + + '; ' + + this.appVer + + '; JavascriptSdk; ' + this.apiVersion + '; ' + + this.machineNM; return this.restCall({ url: path, verb: 'post', payload: model, clientId: strClientId }, Models.TransactionModel); - } - - /** - * Create a new transaction + } + + /** + * 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 @@ -13740,33 +14001,33 @@ export default class AvaTaxClient { * ### Security Policies * * * This API requires one of the following user roles: AccountAdmin, AccountOperator, AccountUser, BatchServiceAdmin, CompanyAdmin, CompanyUser, CSPTester, SSTAdmin, TechnicalSupportAdmin, TechnicalSupportUser. - * * This API depends on the following active services:*Required* (all): AvaTaxPro, BasicReturns. - * Swagger Name: AvaTaxClient - * + * * 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 {Models.CreateTransactionModel} model The transaction you wish to create - * @return {Models.TransactionModel} - */ - - createTransaction({ include, model }: { include?: string, model: Models.CreateTransactionModel }): Promise { - var path = this.buildUrl({ - url: `/api/v2/transactions/create`, + * @param {Models.CreateTransactionModel} model The transaction you wish to create + * @return {Models.TransactionModel} + */ + + createTransaction({ include, model }: { include?: string, model: Models.CreateTransactionModel }): Promise { + var path = this.buildUrl({ + url: `/api/v2/transactions/create`, parameters: { $include: include } - }); - var strClientId = - this.appNM + - '; ' + - this.appVer + - '; JavascriptSdk; ' + this.apiVersion + '; ' + - this.machineNM; + }); + var strClientId = + this.appNM + + '; ' + + this.appVer + + '; JavascriptSdk; ' + this.apiVersion + '; ' + + this.machineNM; return this.restCall({ url: path, verb: 'post', payload: model, clientId: strClientId }, Models.TransactionModel); - } - - /** - * Remove lines from an existing unlocked transaction + } + + /** + * 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 @@ -13789,60 +14050,60 @@ export default class AvaTaxClient { * ### Security Policies * * * This API requires one of the following user roles: AccountAdmin, AccountOperator, BatchServiceAdmin, CompanyAdmin, CSPTester, SSTAdmin, TechnicalSupportAdmin, TechnicalSupportUser. - * * This API depends on the following active services:*Required* (all): AvaTaxPro, BasicReturns. - * Swagger Name: AvaTaxClient - * + * * 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 {Models.RemoveTransactionLineModel} model information about the transaction and lines to be removed - * @return {Models.TransactionModel} - */ - - deleteLines({ include, model }: { include?: string, model: Models.RemoveTransactionLineModel }): Promise { - var path = this.buildUrl({ - url: `/api/v2/companies/transactions/lines/delete`, + * @param {Models.RemoveTransactionLineModel} model information about the transaction and lines to be removed + * @return {Models.TransactionModel} + */ + + deleteLines({ include, model }: { include?: string, model: Models.RemoveTransactionLineModel }): Promise { + var path = this.buildUrl({ + url: `/api/v2/companies/transactions/lines/delete`, parameters: { $include: include } - }); - var strClientId = - this.appNM + - '; ' + - this.appVer + - '; JavascriptSdk; ' + this.apiVersion + '; ' + - this.machineNM; + }); + var strClientId = + this.appNM + + '; ' + + this.appVer + + '; JavascriptSdk; ' + this.apiVersion + '; ' + + this.machineNM; return this.restCall({ url: path, verb: 'post', payload: model, clientId: strClientId }, Models.TransactionModel); - } - - /** - * Fetches the Variance data generated for all the transactions done by Company. + } + + /** + * Fetches the Variance data generated for all the transactions done by Company. * ### Security Policies * * * This API requires one of the following user roles: AccountAdmin, AccountUser, BatchServiceAdmin, CompanyAdmin, CompanyUser, CSPAdmin, CSPTester, ProStoresOperator, SiteAdmin, SSTAdmin, SystemAdmin, TechnicalSupportAdmin, TechnicalSupportUser. - * * This API depends on the following active services:*Required* (all): AvaTaxPro, BasicReturns. - * Swagger Name: AvaTaxClient - * - * - * @param {string} companyCode - * @return {Models.VarianceResponseModel} - */ - - getAllVarianceReportByCompanyCode({ companyCode }: { companyCode: string }): Promise { - var path = this.buildUrl({ - url: `/api/v2/companies/${companyCode}/AllVariance`, - parameters: {} - }); - var strClientId = - this.appNM + - '; ' + - this.appVer + - '; JavascriptSdk; ' + this.apiVersion + '; ' + - this.machineNM; + * * This API depends on the following active services:*Required* (all): AvaTaxPro, BasicReturns. + * Swagger Name: AvaTaxClient + * + * + * @param {string} companyCode + * @return {Models.VarianceResponseModel} + */ + + getAllVarianceReportByCompanyCode({ companyCode }: { companyCode: string }): Promise { + var path = this.buildUrl({ + url: `/api/v2/companies/${companyCode}/AllVariance`, + parameters: {} + }); + var strClientId = + this.appNM + + '; ' + + this.appVer + + '; JavascriptSdk; ' + this.apiVersion + '; ' + + this.machineNM; return this.restCall({ url: path, verb: 'get', payload: null, clientId: strClientId }, Models.VarianceResponseModel); - } - - /** - * Retrieve a single transaction by code + } + + /** + * 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`. @@ -13874,36 +14135,36 @@ export default class AvaTaxClient { * ### Security Policies * * * This API requires one of the following user roles: AccountAdmin, AccountUser, BatchServiceAdmin, CompanyAdmin, CompanyUser, CSPAdmin, CSPTester, ProStoresOperator, SiteAdmin, SSTAdmin, SystemAdmin, TechnicalSupportAdmin, TechnicalSupportUser. - * * This API depends on the following active services:*Required* (all): AvaTaxPro, BasicReturns. - * Swagger Name: AvaTaxClient - * + * * 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 {Enums.DocumentType} 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 {Models.TransactionModel} - */ - - getTransactionByCode({ companyCode, transactionCode, documentType, include }: { companyCode: string, transactionCode: string, documentType?: Enums.DocumentType, include?: string }): Promise { - var path = this.buildUrl({ - url: `/api/v2/companies/${companyCode}/transactions/${transactionCode}`, + * @param {string} include Specifies objects to include in this fetch call + * @return {Models.TransactionModel} + */ + + getTransactionByCode({ companyCode, transactionCode, documentType, include }: { companyCode: string, transactionCode: string, documentType?: Enums.DocumentType, include?: string }): Promise { + var path = this.buildUrl({ + url: `/api/v2/companies/${companyCode}/transactions/${transactionCode}`, parameters: { documentType: documentType, $include: include } - }); - var strClientId = - this.appNM + - '; ' + - this.appVer + - '; JavascriptSdk; ' + this.apiVersion + '; ' + - this.machineNM; + }); + var strClientId = + this.appNM + + '; ' + + this.appVer + + '; JavascriptSdk; ' + this.apiVersion + '; ' + + this.machineNM; return this.restCall({ url: path, verb: 'get', payload: null, clientId: strClientId }, Models.TransactionModel); - } - - /** - * Retrieve a single transaction by code + } + + /** + * 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: @@ -13917,35 +14178,35 @@ export default class AvaTaxClient { * ### Security Policies * * * This API requires one of the following user roles: AccountAdmin, AccountUser, BatchServiceAdmin, CompanyAdmin, CompanyUser, CSPAdmin, CSPTester, ProStoresOperator, SiteAdmin, SSTAdmin, SystemAdmin, TechnicalSupportAdmin, TechnicalSupportUser. - * * This API depends on the following active services:*Required* (all): AvaTaxPro, BasicReturns. - * Swagger Name: AvaTaxClient - * + * * 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 {Enums.DocumentType} 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 {Models.TransactionModel} - */ - - getTransactionByCodeAndType({ companyCode, transactionCode, documentType, include }: { companyCode: string, transactionCode: string, documentType: Enums.DocumentType, include?: string }): Promise { - 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 {Models.TransactionModel} + */ + + getTransactionByCodeAndType({ companyCode, transactionCode, documentType, include }: { companyCode: string, transactionCode: string, documentType: Enums.DocumentType, include?: string }): Promise { + var path = this.buildUrl({ + url: `/api/v2/companies/${companyCode}/transactions/${transactionCode}/types/${documentType}`, parameters: { $include: include } - }); - var strClientId = - this.appNM + - '; ' + - this.appVer + - '; JavascriptSdk; ' + this.apiVersion + '; ' + - this.machineNM; + }); + var strClientId = + this.appNM + + '; ' + + this.appVer + + '; JavascriptSdk; ' + this.apiVersion + '; ' + + this.machineNM; return this.restCall({ url: path, verb: 'get', payload: null, clientId: strClientId }, Models.TransactionModel); - } - - /** - * Retrieve a single transaction by ID + } + + /** + * 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, as long as it is the most version of the transaction. @@ -13967,61 +14228,61 @@ export default class AvaTaxClient { * ### Security Policies * * * This API requires one of the following user roles: AccountAdmin, AccountUser, BatchServiceAdmin, CompanyAdmin, CompanyUser, CSPAdmin, CSPTester, ProStoresOperator, SiteAdmin, SSTAdmin, SystemAdmin, TechnicalSupportAdmin, TechnicalSupportUser. - * * This API depends on the following active services:*Required* (all): AvaTaxPro, BasicReturns. - * Swagger Name: AvaTaxClient - * + * * This API depends on the following active services:*Required* (all): AvaTaxPro, BasicReturns. + * Swagger Name: AvaTaxClient + * * * @param {number} id The unique ID number of the transaction to retrieve - * @param {string} include Specifies objects to include in this fetch call - * @return {Models.TransactionModel} - */ - - getTransactionById({ id, include }: { id: number, include?: string }): Promise { - var path = this.buildUrl({ - url: `/api/v2/transactions/${id}`, + * @param {string} include Specifies objects to include in this fetch call + * @return {Models.TransactionModel} + */ + + getTransactionById({ id, include }: { id: number, include?: string }): Promise { + var path = this.buildUrl({ + url: `/api/v2/transactions/${id}`, parameters: { $include: include } - }); - var strClientId = - this.appNM + - '; ' + - this.appVer + - '; JavascriptSdk; ' + this.apiVersion + '; ' + - this.machineNM; + }); + var strClientId = + this.appNM + + '; ' + + this.appVer + + '; JavascriptSdk; ' + this.apiVersion + '; ' + + this.machineNM; return this.restCall({ url: path, verb: 'get', payload: null, clientId: strClientId }, Models.TransactionModel); - } - - /** - * Fetches the Variance data generated for particular Company by transaction ID + } + + /** + * Fetches the Variance data generated for particular Company by transaction ID * ### Security Policies * * * This API requires one of the following user roles: AccountAdmin, AccountUser, BatchServiceAdmin, CompanyAdmin, CompanyUser, CSPAdmin, CSPTester, ProStoresOperator, SiteAdmin, SSTAdmin, SystemAdmin, TechnicalSupportAdmin, TechnicalSupportUser. - * * This API depends on the following active services:*Required* (all): AvaTaxPro, BasicReturns. - * Swagger Name: AvaTaxClient - * + * * This API depends on the following active services:*Required* (all): AvaTaxPro, BasicReturns. + * Swagger Name: AvaTaxClient + * * * @param {string} companyCode - * @param {string} transactionId - * @return {Models.VarianceResponseModel} - */ - - getVarianceReportByCompanyCodeByTransactionId({ companyCode, transactionId }: { companyCode: string, transactionId: string }): Promise { - var path = this.buildUrl({ - url: `/api/v2/companies/${companyCode}/transactions/${transactionId}/variance`, - parameters: {} - }); - var strClientId = - this.appNM + - '; ' + - this.appVer + - '; JavascriptSdk; ' + this.apiVersion + '; ' + - this.machineNM; + * @param {string} transactionId + * @return {Models.VarianceResponseModel} + */ + + getVarianceReportByCompanyCodeByTransactionId({ companyCode, transactionId }: { companyCode: string, transactionId: string }): Promise { + var path = this.buildUrl({ + url: `/api/v2/companies/${companyCode}/transactions/${transactionId}/variance`, + parameters: {} + }); + var strClientId = + this.appNM + + '; ' + + this.appVer + + '; JavascriptSdk; ' + this.apiVersion + '; ' + + this.machineNM; return this.restCall({ url: path, verb: 'get', payload: null, clientId: strClientId }, Models.VarianceResponseModel); - } - - /** - * Retrieve all transactions + } + + /** + * Retrieve all transactions * List all transactions attached to this company. * * This endpoint is limited to returning 1,000 transactions at a time maximum. @@ -14056,9 +14317,9 @@ export default class AvaTaxClient { * ### Security Policies * * * This API requires one of the following user roles: AccountAdmin, AccountUser, BatchServiceAdmin, CompanyAdmin, CompanyUser, CSPAdmin, CSPTester, ProStoresOperator, SiteAdmin, SSTAdmin, SystemAdmin, TechnicalSupportAdmin, TechnicalSupportUser. - * * This API depends on the following active services:*Required* (all): AvaTaxPro, BasicReturns. - * Swagger Name: AvaTaxClient - * + * * 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 {number} dataSourceId Optionally filter transactions to those from a specific data source. @@ -14066,13 +14327,13 @@ 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, apStatusCode, apStatus * @param {number} top If nonzero, return no more than this number of results. Used with `$skip` to provide pagination for large datasets. Unless otherwise specified, the maximum number of records that can be returned from an API call is 1,000 records. * @param {number} skip If nonzero, skip this number of results before returning data. Used with `$top` to provide pagination for large datasets. - * @param {string} orderBy A comma separated list of sort statements in the format `(fieldname) [ASC|DESC]`, for example `id ASC`. - * @return {FetchResult} - */ - - listTransactionsByCompany({ companyCode, dataSourceId, include, filter, top, skip, orderBy }: { companyCode: string, dataSourceId?: number, include?: string, filter?: string, top?: number, skip?: number, orderBy?: string }): Promise> { - 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 }: { companyCode: string, dataSourceId?: number, include?: string, filter?: string, top?: number, skip?: number, orderBy?: string }): Promise> { + var path = this.buildUrl({ + url: `/api/v2/companies/${companyCode}/transactions`, parameters: { dataSourceId: dataSourceId, $include: include, @@ -14081,18 +14342,18 @@ export default class AvaTaxClient { $skip: skip, $orderBy: orderBy } - }); - var strClientId = - this.appNM + - '; ' + - this.appVer + - '; JavascriptSdk; ' + this.apiVersion + '; ' + - this.machineNM; + }); + var strClientId = + this.appNM + + '; ' + + this.appVer + + '; JavascriptSdk; ' + this.apiVersion + '; ' + + this.machineNM; return this.restCall({ url: path, verb: 'get', payload: null, clientId: strClientId }, FetchResult); - } - - /** - * Lock a single transaction + } + + /** + * 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. @@ -14127,37 +14388,37 @@ export default class AvaTaxClient { * ### Security Policies * * * This API requires one of the following user roles: AccountAdmin, AccountOperator, AccountUser, BatchServiceAdmin, 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. - * Swagger Name: AvaTaxClient - * + * * 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 {Enums.DocumentType} 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 {Models.LockTransactionModel} model The lock request you wish to execute - * @return {Models.TransactionModel} - */ - - lockTransaction({ companyCode, transactionCode, documentType, include, model }: { companyCode: string, transactionCode: string, documentType?: Enums.DocumentType, include?: string, model: Models.LockTransactionModel }): Promise { - var path = this.buildUrl({ - url: `/api/v2/companies/${companyCode}/transactions/${transactionCode}/lock`, + * @param {Models.LockTransactionModel} model The lock request you wish to execute + * @return {Models.TransactionModel} + */ + + lockTransaction({ companyCode, transactionCode, documentType, include, model }: { companyCode: string, transactionCode: string, documentType?: Enums.DocumentType, include?: string, model: Models.LockTransactionModel }): Promise { + var path = this.buildUrl({ + url: `/api/v2/companies/${companyCode}/transactions/${transactionCode}/lock`, parameters: { documentType: documentType, $include: include } - }); - var strClientId = - this.appNM + - '; ' + - this.appVer + - '; JavascriptSdk; ' + this.apiVersion + '; ' + - this.machineNM; + }); + var strClientId = + this.appNM + + '; ' + + this.appVer + + '; JavascriptSdk; ' + this.apiVersion + '; ' + + this.machineNM; return this.restCall({ url: path, verb: 'post', payload: model, clientId: strClientId }, Models.TransactionModel); - } - - /** - * Create a refund for a transaction + } + + /** + * 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 @@ -14202,39 +14463,39 @@ export default class AvaTaxClient { * ### Security Policies * * * This API requires one of the following user roles: AccountAdmin, AccountOperator, AccountUser, BatchServiceAdmin, CompanyAdmin, CompanyUser, CSPTester, SSTAdmin, TechnicalSupportAdmin, TechnicalSupportUser. - * * This API depends on the following active services:*Required* (all): AvaTaxPro, BasicReturns. - * Swagger Name: AvaTaxClient - * + * * 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 {Enums.DocumentType} 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 {Models.RefundTransactionModel} model Information about the refund to create - * @return {Models.TransactionModel} - */ - - refundTransaction({ companyCode, transactionCode, include, documentType, useTaxDateOverride, model }: { companyCode: string, transactionCode: string, include?: string, documentType?: Enums.DocumentType, useTaxDateOverride?: boolean, model: Models.RefundTransactionModel }): Promise { - var path = this.buildUrl({ - url: `/api/v2/companies/${companyCode}/transactions/${transactionCode}/refund`, + * @param {Models.RefundTransactionModel} model Information about the refund to create + * @return {Models.TransactionModel} + */ + + refundTransaction({ companyCode, transactionCode, include, documentType, useTaxDateOverride, model }: { companyCode: string, transactionCode: string, include?: string, documentType?: Enums.DocumentType, useTaxDateOverride?: boolean, model: Models.RefundTransactionModel }): Promise { + var path = this.buildUrl({ + url: `/api/v2/companies/${companyCode}/transactions/${transactionCode}/refund`, parameters: { $include: include, documentType: documentType, useTaxDateOverride: useTaxDateOverride } - }); - var strClientId = - this.appNM + - '; ' + - this.appVer + - '; JavascriptSdk; ' + this.apiVersion + '; ' + - this.machineNM; + }); + var strClientId = + this.appNM + + '; ' + + this.appVer + + '; JavascriptSdk; ' + this.apiVersion + '; ' + + this.machineNM; return this.restCall({ url: path, verb: 'post', payload: model, clientId: strClientId }, Models.TransactionModel); - } - - /** - * Perform multiple actions on a transaction + } + + /** + * 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`. @@ -14267,37 +14528,37 @@ export default class AvaTaxClient { * * ### Security Policies * - * * This API requires one of the following user roles: AccountAdmin, AccountOperator, AccountUser, BatchServiceAdmin, CompanyAdmin, CompanyUser, CSPTester, ProStoresOperator, SSTAdmin, TechnicalSupportAdmin. - * Swagger Name: AvaTaxClient - * + * * This API requires one of the following user roles: AccountAdmin, AccountOperator, AccountUser, BatchServiceAdmin, 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 {Enums.DocumentType} 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 {Models.SettleTransactionModel} model The data from an external system to reconcile against AvaTax - * @return {Models.TransactionModel} - */ - - settleTransaction({ companyCode, transactionCode, documentType, include, model }: { companyCode: string, transactionCode: string, documentType?: Enums.DocumentType, include?: string, model: Models.SettleTransactionModel }): Promise { - var path = this.buildUrl({ - url: `/api/v2/companies/${companyCode}/transactions/${transactionCode}/settle`, + * @param {Models.SettleTransactionModel} model The data from an external system to reconcile against AvaTax + * @return {Models.TransactionModel} + */ + + settleTransaction({ companyCode, transactionCode, documentType, include, model }: { companyCode: string, transactionCode: string, documentType?: Enums.DocumentType, include?: string, model: Models.SettleTransactionModel }): Promise { + var path = this.buildUrl({ + url: `/api/v2/companies/${companyCode}/transactions/${transactionCode}/settle`, parameters: { documentType: documentType, $include: include } - }); - var strClientId = - this.appNM + - '; ' + - this.appVer + - '; JavascriptSdk; ' + this.apiVersion + '; ' + - this.machineNM; + }); + var strClientId = + this.appNM + + '; ' + + this.appVer + + '; JavascriptSdk; ' + this.apiVersion + '; ' + + this.machineNM; return this.restCall({ url: path, verb: 'post', payload: model, clientId: strClientId }, Models.TransactionModel); - } - - /** - * Uncommit a transaction for reporting + } + + /** + * 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 @@ -14325,36 +14586,36 @@ export default class AvaTaxClient { * ### Security Policies * * * This API requires one of the following user roles: AccountAdmin, AccountOperator, BatchServiceAdmin, CompanyAdmin, CSPTester, SSTAdmin, TechnicalSupportAdmin, TechnicalSupportUser. - * * This API depends on the following active services:*Required* (all): AvaTaxPro, BasicReturns. - * Swagger Name: AvaTaxClient - * + * * 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 {Enums.DocumentType} 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 {Models.TransactionModel} - */ - - uncommitTransaction({ companyCode, transactionCode, documentType, include }: { companyCode: string, transactionCode: string, documentType?: Enums.DocumentType, include?: string }): Promise { - var path = this.buildUrl({ - url: `/api/v2/companies/${companyCode}/transactions/${transactionCode}/uncommit`, + * @param {string} include Specifies objects to include in this fetch call + * @return {Models.TransactionModel} + */ + + uncommitTransaction({ companyCode, transactionCode, documentType, include }: { companyCode: string, transactionCode: string, documentType?: Enums.DocumentType, include?: string }): Promise { + var path = this.buildUrl({ + url: `/api/v2/companies/${companyCode}/transactions/${transactionCode}/uncommit`, parameters: { documentType: documentType, $include: include } - }); - var strClientId = - this.appNM + - '; ' + - this.appVer + - '; JavascriptSdk; ' + this.apiVersion + '; ' + - this.machineNM; + }); + var strClientId = + this.appNM + + '; ' + + this.appVer + + '; JavascriptSdk; ' + this.apiVersion + '; ' + + this.machineNM; return this.restCall({ url: path, verb: 'post', payload: null, clientId: strClientId }, Models.TransactionModel); - } - - /** - * Unvoids a transaction + } + + /** + * 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: @@ -14379,64 +14640,64 @@ export default class AvaTaxClient { * ### Security Policies * * * This API requires one of the following user roles: AccountAdmin, AccountOperator, BatchServiceAdmin, CompanyAdmin, CSPTester, SSTAdmin, TechnicalSupportAdmin, TechnicalSupportUser. - * * This API depends on the following active services:*Required* (all): AvaTaxPro, BasicReturns. - * Swagger Name: AvaTaxClient - * + * * 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 {Enums.DocumentType} 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 {Models.TransactionModel} - */ - - unvoidTransaction({ companyCode, transactionCode, documentType, include }: { companyCode: string, transactionCode: string, documentType?: Enums.DocumentType, include?: string }): Promise { - var path = this.buildUrl({ - url: `/api/v2/companies/${companyCode}/transactions/${transactionCode}/unvoid`, + * @param {string} include Specifies objects to include in this fetch call + * @return {Models.TransactionModel} + */ + + unvoidTransaction({ companyCode, transactionCode, documentType, include }: { companyCode: string, transactionCode: string, documentType?: Enums.DocumentType, include?: string }): Promise { + var path = this.buildUrl({ + url: `/api/v2/companies/${companyCode}/transactions/${transactionCode}/unvoid`, parameters: { documentType: documentType, $include: include } - }); - var strClientId = - this.appNM + - '; ' + - this.appVer + - '; JavascriptSdk; ' + this.apiVersion + '; ' + - this.machineNM; + }); + var strClientId = + this.appNM + + '; ' + + this.appVer + + '; JavascriptSdk; ' + this.apiVersion + '; ' + + this.machineNM; return this.restCall({ url: path, verb: 'post', payload: null, clientId: strClientId }, Models.TransactionModel); - } - - /** - * Generates the Variance report which will capture the difference between "Tax Calculated by Avalara" Vs "Actual Tax" paid at custom clearance at line / header level. + } + + /** + * Generates the Variance report which will capture the difference between "Tax Calculated by Avalara" Vs "Actual Tax" paid at custom clearance at line / header level. * ### Security Policies * * * This API requires one of the following user roles: AccountAdmin, AccountUser, BatchServiceAdmin, CompanyAdmin, CompanyUser, CSPAdmin, CSPTester, ProStoresOperator, SiteAdmin, SSTAdmin, SystemAdmin, TechnicalSupportAdmin, TechnicalSupportUser. - * * This API depends on the following active services:*Required* (all): AvaTaxPro, BasicReturns. - * Swagger Name: AvaTaxClient - * + * * This API depends on the following active services:*Required* (all): AvaTaxPro, BasicReturns. + * Swagger Name: AvaTaxClient + * * * @param {string} companyCode - * @param {Models.VarianceRequestModel[]} model - * @return {Models.VarianceResponseModel} - */ - - varianceReport({ companyCode, model }: { companyCode: string, model: Models.VarianceRequestModel[] }): Promise { - var path = this.buildUrl({ - url: `/api/v2/companies/${companyCode}/variance`, - parameters: {} - }); - var strClientId = - this.appNM + - '; ' + - this.appVer + - '; JavascriptSdk; ' + this.apiVersion + '; ' + - this.machineNM; + * @param {Models.VarianceRequestModel[]} model + * @return {Models.VarianceResponseModel} + */ + + varianceReport({ companyCode, model }: { companyCode: string, model: Models.VarianceRequestModel[] }): Promise { + var path = this.buildUrl({ + url: `/api/v2/companies/${companyCode}/variance`, + parameters: {} + }); + var strClientId = + this.appNM + + '; ' + + this.appVer + + '; JavascriptSdk; ' + this.apiVersion + '; ' + + this.machineNM; return this.restCall({ url: path, verb: 'post', payload: model, clientId: strClientId }, Models.VarianceResponseModel); - } - - /** - * Verify a transaction + } + + /** + * 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. @@ -14468,37 +14729,37 @@ export default class AvaTaxClient { * ### Security Policies * * * This API requires one of the following user roles: AccountAdmin, AccountOperator, AccountUser, BatchServiceAdmin, CompanyAdmin, CompanyUser, CSPTester, ProStoresOperator, SSTAdmin, TechnicalSupportAdmin. - * * This API depends on the following active services:*Required* (all): AvaTaxPro, BasicReturns. - * Swagger Name: AvaTaxClient - * + * * 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 {Enums.DocumentType} 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 {Models.VerifyTransactionModel} model The data from an external system to reconcile against AvaTax - * @return {Models.TransactionModel} - */ - - verifyTransaction({ companyCode, transactionCode, documentType, include, model }: { companyCode: string, transactionCode: string, documentType?: Enums.DocumentType, include?: string, model: Models.VerifyTransactionModel }): Promise { - var path = this.buildUrl({ - url: `/api/v2/companies/${companyCode}/transactions/${transactionCode}/verify`, + * @param {Models.VerifyTransactionModel} model The data from an external system to reconcile against AvaTax + * @return {Models.TransactionModel} + */ + + verifyTransaction({ companyCode, transactionCode, documentType, include, model }: { companyCode: string, transactionCode: string, documentType?: Enums.DocumentType, include?: string, model: Models.VerifyTransactionModel }): Promise { + var path = this.buildUrl({ + url: `/api/v2/companies/${companyCode}/transactions/${transactionCode}/verify`, parameters: { documentType: documentType, $include: include } - }); - var strClientId = - this.appNM + - '; ' + - this.appVer + - '; JavascriptSdk; ' + this.apiVersion + '; ' + - this.machineNM; + }); + var strClientId = + this.appNM + + '; ' + + this.appVer + + '; JavascriptSdk; ' + this.apiVersion + '; ' + + this.machineNM; return this.restCall({ url: path, verb: 'post', payload: model, clientId: strClientId }, Models.TransactionModel); - } - - /** - * Void a transaction + } + + /** + * 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 @@ -14532,129 +14793,129 @@ export default class AvaTaxClient { * ### Security Policies * * * This API requires one of the following user roles: AccountAdmin, AccountOperator, BatchServiceAdmin, CompanyAdmin, CSPTester, ProStoresOperator, SSTAdmin, TechnicalSupportAdmin. - * * This API depends on the following active services:*Required* (all): AvaTaxPro, BasicReturns. - * Swagger Name: AvaTaxClient - * + * * 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 {Enums.DocumentType} 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 {Models.VoidTransactionModel} model The void request you wish to execute. To void a transaction the code must be set to 'DocVoided' - * @return {Models.TransactionModel} - */ - - voidTransaction({ companyCode, transactionCode, documentType, include, model }: { companyCode: string, transactionCode: string, documentType?: Enums.DocumentType, include?: string, model: Models.VoidTransactionModel }): Promise { - var path = this.buildUrl({ - url: `/api/v2/companies/${companyCode}/transactions/${transactionCode}/void`, + * @param {Models.VoidTransactionModel} model The void request you wish to execute. To void a transaction the code must be set to 'DocVoided' + * @return {Models.TransactionModel} + */ + + voidTransaction({ companyCode, transactionCode, documentType, include, model }: { companyCode: string, transactionCode: string, documentType?: Enums.DocumentType, include?: string, model: Models.VoidTransactionModel }): Promise { + var path = this.buildUrl({ + url: `/api/v2/companies/${companyCode}/transactions/${transactionCode}/void`, parameters: { documentType: documentType, $include: include } - }); - var strClientId = - this.appNM + - '; ' + - this.appVer + - '; JavascriptSdk; ' + this.apiVersion + '; ' + - this.machineNM; + }); + var strClientId = + this.appNM + + '; ' + + this.appVer + + '; JavascriptSdk; ' + this.apiVersion + '; ' + + this.machineNM; return this.restCall({ url: path, verb: 'post', payload: model, clientId: strClientId }, Models.TransactionModel); - } - - /** - * Create a new UPC + } + + /** + * 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, BatchServiceAdmin, CompanyAdmin, CSPTester, SSTAdmin, TechnicalSupportAdmin. - * * This API depends on the following active services:*Required* (all): AvaUpc. - * Swagger Name: AvaTaxClient - * + * * This API depends on the following active services:*Required* (all): AvaUpc. + * Swagger Name: AvaTaxClient + * * * @param {number} companyId The ID of the company that owns this UPC. - * @param {Models.UPCModel[]} model The UPC you wish to create. - * @return {Models.UPCModel[]} - */ - - createUPCs({ companyId, model }: { companyId: number, model: Models.UPCModel[] }): Promise> { - var path = this.buildUrl({ - url: `/api/v2/companies/${companyId}/upcs`, - parameters: {} - }); - var strClientId = - this.appNM + - '; ' + - this.appVer + - '; JavascriptSdk; ' + this.apiVersion + '; ' + - this.machineNM; + * @param {Models.UPCModel[]} model The UPC you wish to create. + * @return {Models.UPCModel[]} + */ + + createUPCs({ companyId, model }: { companyId: number, model: Models.UPCModel[] }): Promise> { + var path = this.buildUrl({ + url: `/api/v2/companies/${companyId}/upcs`, + parameters: {} + }); + var strClientId = + this.appNM + + '; ' + + this.appVer + + '; JavascriptSdk; ' + this.apiVersion + '; ' + + this.machineNM; return this.restCall({ url: path, verb: 'post', payload: model, clientId: strClientId }, Array); - } - - /** - * Delete a single UPC + } + + /** + * 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, BatchServiceAdmin, CompanyAdmin, CSPTester, SSTAdmin, TechnicalSupportAdmin. - * * This API depends on the following active services:*Required* (all): AvaUpc. - * Swagger Name: AvaTaxClient - * + * * This API depends on the following active services:*Required* (all): AvaUpc. + * Swagger Name: AvaTaxClient + * * * @param {number} companyId The ID of the company that owns this UPC. - * @param {number} id The ID of the UPC you wish to delete. - * @return {Models.ErrorDetail[]} - */ - - deleteUPC({ companyId, id }: { companyId: number, id: number }): Promise> { - var path = this.buildUrl({ - url: `/api/v2/companies/${companyId}/upcs/${id}`, - parameters: {} - }); - var strClientId = - this.appNM + - '; ' + - this.appVer + - '; JavascriptSdk; ' + this.apiVersion + '; ' + - this.machineNM; + * @param {number} id The ID of the UPC you wish to delete. + * @return {Models.ErrorDetail[]} + */ + + deleteUPC({ companyId, id }: { companyId: number, id: number }): Promise> { + var path = this.buildUrl({ + url: `/api/v2/companies/${companyId}/upcs/${id}`, + parameters: {} + }); + var strClientId = + this.appNM + + '; ' + + this.appVer + + '; JavascriptSdk; ' + this.apiVersion + '; ' + + this.machineNM; return this.restCall({ url: path, verb: 'delete', payload: null, clientId: strClientId }, Array); - } - - /** - * Retrieve a single UPC + } + + /** + * 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, BatchServiceAdmin, CompanyAdmin, CompanyUser, CSPAdmin, CSPTester, SiteAdmin, SSTAdmin, SystemAdmin, TechnicalSupportAdmin, TechnicalSupportUser. - * * This API depends on the following active services:*Required* (all): AvaUpc. - * Swagger Name: AvaTaxClient - * + * * This API depends on the following active services:*Required* (all): AvaUpc. + * Swagger Name: AvaTaxClient + * * * @param {number} companyId The ID of the company that owns this UPC - * @param {number} id The primary key of this UPC - * @return {Models.UPCModel} - */ - - getUPC({ companyId, id }: { companyId: number, id: number }): Promise { - var path = this.buildUrl({ - url: `/api/v2/companies/${companyId}/upcs/${id}`, - parameters: {} - }); - var strClientId = - this.appNM + - '; ' + - this.appVer + - '; JavascriptSdk; ' + this.apiVersion + '; ' + - this.machineNM; + * @param {number} id The primary key of this UPC + * @return {Models.UPCModel} + */ + + getUPC({ companyId, id }: { companyId: number, id: number }): Promise { + var path = this.buildUrl({ + url: `/api/v2/companies/${companyId}/upcs/${id}`, + parameters: {} + }); + var strClientId = + this.appNM + + '; ' + + this.appVer + + '; JavascriptSdk; ' + this.apiVersion + '; ' + + this.machineNM; return this.restCall({ url: path, verb: 'get', payload: null, clientId: strClientId }, Models.UPCModel); - } - - /** - * Retrieve UPCs for this company + } + + /** + * 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. * @@ -14664,22 +14925,22 @@ export default class AvaTaxClient { * ### Security Policies * * * This API requires one of the following user roles: AccountAdmin, AccountUser, BatchServiceAdmin, CompanyAdmin, CompanyUser, CSPAdmin, CSPTester, SiteAdmin, SSTAdmin, SystemAdmin, TechnicalSupportAdmin, TechnicalSupportUser. - * * This API depends on the following active services:*Required* (all): AvaUpc. - * Swagger Name: AvaTaxClient - * + * * This API depends on the following active services:*Required* (all): AvaUpc. + * Swagger Name: AvaTaxClient + * * * @param {number} 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 {number} top If nonzero, return no more than this number of results. Used with `$skip` to provide pagination for large datasets. Unless otherwise specified, the maximum number of records that can be returned from an API call is 1,000 records. * @param {number} skip If nonzero, skip this number of results before returning data. Used with `$top` to provide pagination for large datasets. - * @param {string} orderBy A comma separated list of sort statements in the format `(fieldname) [ASC|DESC]`, for example `id ASC`. - * @return {FetchResult} - */ - - listUPCsByCompany({ companyId, filter, include, top, skip, orderBy }: { companyId: number, filter?: string, include?: string, top?: number, skip?: number, orderBy?: string }): Promise> { - var path = this.buildUrl({ - url: `/api/v2/companies/${companyId}/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 }: { companyId: number, filter?: string, include?: string, top?: number, skip?: number, orderBy?: string }): Promise> { + var path = this.buildUrl({ + url: `/api/v2/companies/${companyId}/upcs`, parameters: { $filter: filter, $include: include, @@ -14687,18 +14948,18 @@ export default class AvaTaxClient { $skip: skip, $orderBy: orderBy } - }); - var strClientId = - this.appNM + - '; ' + - this.appVer + - '; JavascriptSdk; ' + this.apiVersion + '; ' + - this.machineNM; + }); + var strClientId = + this.appNM + + '; ' + + this.appVer + + '; JavascriptSdk; ' + this.apiVersion + '; ' + + this.machineNM; return this.restCall({ url: path, verb: 'get', payload: null, clientId: strClientId }, FetchResult); - } - - /** - * Retrieve all UPCs + } + + /** + * 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. * @@ -14708,21 +14969,21 @@ export default class AvaTaxClient { * ### Security Policies * * * This API requires one of the following user roles: AccountAdmin, AccountUser, BatchServiceAdmin, CompanyAdmin, CompanyUser, CSPAdmin, CSPTester, SiteAdmin, SSTAdmin, SystemAdmin, TechnicalSupportAdmin, TechnicalSupportUser. - * * This API depends on the following active services:*Required* (all): AvaUpc. - * Swagger Name: AvaTaxClient - * + * * 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 {number} top If nonzero, return no more than this number of results. Used with `$skip` to provide pagination for large datasets. Unless otherwise specified, the maximum number of records that can be returned from an API call is 1,000 records. * @param {number} skip If nonzero, skip this number of results before returning data. Used with `$top` to provide pagination for large datasets. - * @param {string} orderBy A comma separated list of sort statements in the format `(fieldname) [ASC|DESC]`, for example `id ASC`. - * @return {FetchResult} - */ - - queryUPCs({ filter, include, top, skip, orderBy }: { filter?: string, include?: string, top?: number, skip?: number, orderBy?: string }): Promise> { - 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 }: { filter?: string, include?: string, top?: number, skip?: number, orderBy?: string }): Promise> { + var path = this.buildUrl({ + url: `/api/v2/upcs`, parameters: { $filter: filter, $include: include, @@ -14730,18 +14991,18 @@ export default class AvaTaxClient { $skip: skip, $orderBy: orderBy } - }); - var strClientId = - this.appNM + - '; ' + - this.appVer + - '; JavascriptSdk; ' + this.apiVersion + '; ' + - this.machineNM; + }); + var strClientId = + this.appNM + + '; ' + + this.appVer + + '; JavascriptSdk; ' + this.apiVersion + '; ' + + this.machineNM; return this.restCall({ url: path, verb: 'get', payload: null, clientId: strClientId }, FetchResult); - } - - /** - * Update a single UPC + } + + /** + * 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. @@ -14750,127 +15011,127 @@ export default class AvaTaxClient { * ### Security Policies * * * This API requires one of the following user roles: AccountAdmin, BatchServiceAdmin, CompanyAdmin, CSPTester, SSTAdmin, TechnicalSupportAdmin. - * * This API depends on the following active services:*Required* (all): AvaUpc. - * Swagger Name: AvaTaxClient - * + * * This API depends on the following active services:*Required* (all): AvaUpc. + * Swagger Name: AvaTaxClient + * * * @param {number} companyId The ID of the company that this UPC belongs to. * @param {number} id The ID of the UPC you wish to update - * @param {Models.UPCModel} model The UPC you wish to update. - * @return {Models.UPCModel} - */ - - updateUPC({ companyId, id, model }: { companyId: number, id: number, model: Models.UPCModel }): Promise { - var path = this.buildUrl({ - url: `/api/v2/companies/${companyId}/upcs/${id}`, - parameters: {} - }); - var strClientId = - this.appNM + - '; ' + - this.appVer + - '; JavascriptSdk; ' + this.apiVersion + '; ' + - this.machineNM; + * @param {Models.UPCModel} model The UPC you wish to update. + * @return {Models.UPCModel} + */ + + updateUPC({ companyId, id, model }: { companyId: number, id: number, model: Models.UPCModel }): Promise { + var path = this.buildUrl({ + url: `/api/v2/companies/${companyId}/upcs/${id}`, + parameters: {} + }); + var strClientId = + this.appNM + + '; ' + + this.appVer + + '; JavascriptSdk; ' + this.apiVersion + '; ' + + this.machineNM; return this.restCall({ url: path, verb: 'put', payload: model, clientId: strClientId }, Models.UPCModel); - } - - /** - * Delete a User Defined Field by User Defined Field id for a company. + } + + /** + * 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, BatchServiceAdmin, CompanyAdmin, CSPTester, FirmAdmin, Registrar, SiteAdmin, SSTAdmin, SystemAdmin, TechnicalSupportAdmin. - * * This API depends on the following active services:*Required* (all): AvaTaxPro, BasicReturns. - * Swagger Name: AvaTaxClient - * + * * This API depends on the following active services:*Required* (all): AvaTaxPro, BasicReturns. + * Swagger Name: AvaTaxClient + * * * @param {number} companyId The id of the company the User Defined Field belongs to. - * @param {number} id The id of the User Defined Field you wish to delete. - * @return {Models.ErrorDetail[]} - */ - - deleteUserDefinedField({ companyId, id }: { companyId: number, id: number }): Promise> { - var path = this.buildUrl({ - url: `/api/v2/companies/${companyId}/userdefinedfields/${id}`, - parameters: {} - }); - var strClientId = - this.appNM + - '; ' + - this.appVer + - '; JavascriptSdk; ' + this.apiVersion + '; ' + - this.machineNM; + * @param {number} id The id of the User Defined Field you wish to delete. + * @return {Models.ErrorDetail[]} + */ + + deleteUserDefinedField({ companyId, id }: { companyId: number, id: number }): Promise> { + var path = this.buildUrl({ + url: `/api/v2/companies/${companyId}/userdefinedfields/${id}`, + parameters: {} + }); + var strClientId = + this.appNM + + '; ' + + this.appVer + + '; JavascriptSdk; ' + this.apiVersion + '; ' + + this.machineNM; return this.restCall({ url: path, verb: 'delete', payload: null, clientId: strClientId }, Array); - } - - /** - * + } + + /** + * * ### Security Policies * * * This API requires one of the following user roles: AccountAdmin, AccountOperator, AccountUser, BatchServiceAdmin, CompanyAdmin, CompanyUser, Compliance Root User, ComplianceAdmin, ComplianceUser, CSPAdmin, CSPTester, ECMAccountUser, ECMCompanyUser, 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 - * + * * This API depends on the following active services:*Required* (all): AvaTaxPro, BasicReturns. + * Swagger Name: AvaTaxClient + * * * @param {number} companyId * @param {Enums.UserDefinedFieldType} 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 }: { companyId: number, udfType?: Enums.UserDefinedFieldType, allowDefaults?: boolean }): Promise> { - var path = this.buildUrl({ - url: `/api/v2/companies/${companyId}/userdefinedfields`, + * @param {boolean} allowDefaults If true this will add defaulted UDFs to the list that are not named yet + * @return {FetchResult} + */ + + listUserDefinedFieldsByCompanyId({ companyId, udfType, allowDefaults }: { companyId: number, udfType?: Enums.UserDefinedFieldType, allowDefaults?: boolean }): Promise> { + var path = this.buildUrl({ + url: `/api/v2/companies/${companyId}/userdefinedfields`, parameters: { udfType: udfType, allowDefaults: allowDefaults } - }); - var strClientId = - this.appNM + - '; ' + - this.appVer + - '; JavascriptSdk; ' + this.apiVersion + '; ' + - this.machineNM; + }); + var strClientId = + this.appNM + + '; ' + + this.appVer + + '; JavascriptSdk; ' + this.apiVersion + '; ' + + this.machineNM; return this.restCall({ url: path, verb: 'get', payload: null, clientId: strClientId }, FetchResult); - } - - /** - * Update a User Defined Field identified by id for a company + } + + /** + * 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, BatchServiceAdmin, CompanyAdmin, CSPTester, FirmAdmin, Registrar, SiteAdmin, SSTAdmin, SystemAdmin, TechnicalSupportAdmin. - * * This API depends on the following active services:*Required* (all): AvaTaxPro, BasicReturns. - * Swagger Name: AvaTaxClient - * + * * This API depends on the following active services:*Required* (all): AvaTaxPro, BasicReturns. + * Swagger Name: AvaTaxClient + * * * @param {number} companyId The id of the company the user defined field belongs to. * @param {number} id - * @param {Models.CompanyUserDefinedFieldModel} model - * @return {Models.CompanyUserDefinedFieldModel} - */ - - updateUserDefinedField({ companyId, id, model }: { companyId: number, id?: number, model: Models.CompanyUserDefinedFieldModel }): Promise { - var path = this.buildUrl({ - url: `/api/v2/companies/${companyId}/userdefinedfields`, + * @param {Models.CompanyUserDefinedFieldModel} model + * @return {Models.CompanyUserDefinedFieldModel} + */ + + updateUserDefinedField({ companyId, id, model }: { companyId: number, id?: number, model: Models.CompanyUserDefinedFieldModel }): Promise { + var path = this.buildUrl({ + url: `/api/v2/companies/${companyId}/userdefinedfields`, parameters: { id: id } - }); - var strClientId = - this.appNM + - '; ' + - this.appVer + - '; JavascriptSdk; ' + this.apiVersion + '; ' + - this.machineNM; + }); + var strClientId = + this.appNM + + '; ' + + this.appVer + + '; JavascriptSdk; ' + this.apiVersion + '; ' + + this.machineNM; return this.restCall({ url: path, verb: 'post', payload: model, clientId: strClientId }, Models.CompanyUserDefinedFieldModel); - } - - /** - * Change Password + } + + /** + * 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 @@ -14881,30 +15142,30 @@ export default class AvaTaxClient { * * ### Security Policies * - * * This API requires one of the following user roles: AccountAdmin, AccountUser, BatchServiceAdmin, CompanyAdmin, CompanyUser, Compliance Root User, ComplianceAdmin, ComplianceUser, CSPTester, FirmAdmin, FirmUser, Registrar, SiteAdmin, SSTAdmin, SystemAdmin, TechnicalSupportAdmin, TechnicalSupportUser, TreasuryAdmin, TreasuryUser. - * Swagger Name: AvaTaxClient - * - * - * @param {Models.PasswordChangeModel} model An object containing your current password and the new password. - * @return {string} - */ - - changePassword({ model }: { model: Models.PasswordChangeModel }): Promise { - var path = this.buildUrl({ - url: `/api/v2/passwords`, - parameters: {} - }); - var strClientId = - this.appNM + - '; ' + - this.appVer + - '; JavascriptSdk; ' + this.apiVersion + '; ' + - this.machineNM; + * * This API requires one of the following user roles: AccountAdmin, AccountUser, BatchServiceAdmin, CompanyAdmin, CompanyUser, Compliance Root User, ComplianceAdmin, ComplianceUser, CSPTester, FirmAdmin, FirmUser, Registrar, SiteAdmin, SSTAdmin, SystemAdmin, TechnicalSupportAdmin, TechnicalSupportUser, TreasuryAdmin, TreasuryUser. + * Swagger Name: AvaTaxClient + * + * + * @param {Models.PasswordChangeModel} model An object containing your current password and the new password. + * @return {string} + */ + + changePassword({ model }: { model: Models.PasswordChangeModel }): Promise { + var path = this.buildUrl({ + url: `/api/v2/passwords`, + parameters: {} + }); + var strClientId = + this.appNM + + '; ' + + this.appVer + + '; JavascriptSdk; ' + this.apiVersion + '; ' + + this.machineNM; return this.restCall({ url: path, verb: 'put', payload: model, clientId: strClientId }, String); - } - - /** - * Create new users + } + + /** + * 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. @@ -14917,31 +15178,31 @@ export default class AvaTaxClient { * * ### Security Policies * - * * This API requires one of the following user roles: AccountAdmin, AccountUser, BatchServiceAdmin, CompanyAdmin, CompanyUser, Compliance Root User, ComplianceAdmin, ComplianceUser, CSPTester, FirmAdmin, FirmUser, Registrar, SiteAdmin, SSTAdmin, SystemAdmin, TechnicalSupportAdmin, TechnicalSupportUser, TreasuryAdmin, TreasuryUser. - * Swagger Name: AvaTaxClient - * + * * This API requires one of the following user roles: AccountAdmin, AccountUser, BatchServiceAdmin, CompanyAdmin, CompanyUser, Compliance Root User, ComplianceAdmin, ComplianceUser, CSPTester, FirmAdmin, FirmUser, Registrar, SiteAdmin, SSTAdmin, SystemAdmin, TechnicalSupportAdmin, TechnicalSupportUser, TreasuryAdmin, TreasuryUser. + * Swagger Name: AvaTaxClient + * * * @param {number} accountId The unique ID number of the account where these users will be created. - * @param {Models.UserModel[]} model The user or array of users you wish to create. - * @return {Models.UserModel[]} - */ - - createUsers({ accountId, model }: { accountId: number, model: Models.UserModel[] }): Promise> { - var path = this.buildUrl({ - url: `/api/v2/accounts/${accountId}/users`, - parameters: {} - }); - var strClientId = - this.appNM + - '; ' + - this.appVer + - '; JavascriptSdk; ' + this.apiVersion + '; ' + - this.machineNM; + * @param {Models.UserModel[]} model The user or array of users you wish to create. + * @return {Models.UserModel[]} + */ + + createUsers({ accountId, model }: { accountId: number, model: Models.UserModel[] }): Promise> { + var path = this.buildUrl({ + url: `/api/v2/accounts/${accountId}/users`, + parameters: {} + }); + var strClientId = + this.appNM + + '; ' + + this.appVer + + '; JavascriptSdk; ' + this.apiVersion + '; ' + + this.machineNM; return this.restCall({ url: path, verb: 'post', payload: model, clientId: strClientId }, Array); - } - - /** - * Delete a single user + } + + /** + * 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. @@ -14951,31 +15212,31 @@ export default class AvaTaxClient { * * ### Security Policies * - * * This API requires one of the following user roles: AccountAdmin, BatchServiceAdmin, CompanyAdmin, Compliance Root User, CSPTester, Registrar, SiteAdmin, SSTAdmin, SystemAdmin, TechnicalSupportAdmin, TreasuryAdmin. - * Swagger Name: AvaTaxClient - * + * * This API requires one of the following user roles: AccountAdmin, BatchServiceAdmin, CompanyAdmin, Compliance Root User, CSPTester, Registrar, SiteAdmin, SSTAdmin, SystemAdmin, TechnicalSupportAdmin, TreasuryAdmin. + * Swagger Name: AvaTaxClient + * * * @param {number} id The ID of the user you wish to delete. - * @param {number} accountId The accountID of the user you wish to delete. - * @return {Models.ErrorDetail[]} - */ - - deleteUser({ id, accountId }: { id: number, accountId: number }): Promise> { - var path = this.buildUrl({ - url: `/api/v2/accounts/${accountId}/users/${id}`, - parameters: {} - }); - var strClientId = - this.appNM + - '; ' + - this.appVer + - '; JavascriptSdk; ' + this.apiVersion + '; ' + - this.machineNM; + * @param {number} accountId The accountID of the user you wish to delete. + * @return {Models.ErrorDetail[]} + */ + + deleteUser({ id, accountId }: { id: number, accountId: number }): Promise> { + var path = this.buildUrl({ + url: `/api/v2/accounts/${accountId}/users/${id}`, + parameters: {} + }); + var strClientId = + this.appNM + + '; ' + + this.appVer + + '; JavascriptSdk; ' + this.apiVersion + '; ' + + this.machineNM; return this.restCall({ url: path, verb: 'delete', payload: null, clientId: strClientId }, Array); - } - - /** - * Retrieve a single user + } + + /** + * 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. * @@ -14985,34 +15246,34 @@ export default class AvaTaxClient { * * ### Security Policies * - * * This API requires one of the following user roles: AccountAdmin, AccountOperator, AccountUser, BatchServiceAdmin, CompanyAdmin, CompanyUser, Compliance Root User, ComplianceAdmin, ComplianceUser, CSPAdmin, CSPTester, ECMAccountUser, ECMCompanyUser, FirmAdmin, FirmUser, ProStoresOperator, Registrar, SiteAdmin, SSTAdmin, SystemAdmin, SystemOperator, TechnicalSupportAdmin, TechnicalSupportUser, TreasuryAdmin, TreasuryUser. - * Swagger Name: AvaTaxClient - * + * * This API requires one of the following user roles: AccountAdmin, AccountOperator, AccountUser, BatchServiceAdmin, CompanyAdmin, CompanyUser, Compliance Root User, ComplianceAdmin, ComplianceUser, CSPAdmin, CSPTester, ECMAccountUser, ECMCompanyUser, FirmAdmin, FirmUser, ProStoresOperator, Registrar, SiteAdmin, SSTAdmin, SystemAdmin, SystemOperator, TechnicalSupportAdmin, TechnicalSupportUser, TreasuryAdmin, TreasuryUser. + * Swagger Name: AvaTaxClient + * * * @param {number} id The ID of the user to retrieve. * @param {number} accountId The accountID of the user you wish to get. - * @param {string} include Optional fetch commands. - * @return {Models.UserModel} - */ - - getUser({ id, accountId, include }: { id: number, accountId: number, include?: string }): Promise { - var path = this.buildUrl({ - url: `/api/v2/accounts/${accountId}/users/${id}`, + * @param {string} include Optional fetch commands. + * @return {Models.UserModel} + */ + + getUser({ id, accountId, include }: { id: number, accountId: number, include?: string }): Promise { + var path = this.buildUrl({ + url: `/api/v2/accounts/${accountId}/users/${id}`, parameters: { $include: include } - }); - var strClientId = - this.appNM + - '; ' + - this.appVer + - '; JavascriptSdk; ' + this.apiVersion + '; ' + - this.machineNM; + }); + var strClientId = + this.appNM + + '; ' + + this.appVer + + '; JavascriptSdk; ' + this.apiVersion + '; ' + + this.machineNM; return this.restCall({ url: path, verb: 'get', payload: null, clientId: strClientId }, Models.UserModel); - } - - /** - * Retrieve all entitlements for a single user + } + + /** + * 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. @@ -15031,31 +15292,31 @@ export default class AvaTaxClient { * * ### Security Policies * - * * This API requires one of the following user roles: AccountAdmin, AccountOperator, AccountUser, BatchServiceAdmin, CompanyAdmin, CompanyUser, Compliance Root User, ComplianceAdmin, ComplianceUser, CSPAdmin, CSPTester, ECMAccountUser, ECMCompanyUser, FirmAdmin, FirmUser, ProStoresOperator, Registrar, SiteAdmin, SSTAdmin, SystemAdmin, SystemOperator, TechnicalSupportAdmin, TechnicalSupportUser, TreasuryAdmin, TreasuryUser. - * Swagger Name: AvaTaxClient - * + * * This API requires one of the following user roles: AccountAdmin, AccountOperator, AccountUser, BatchServiceAdmin, CompanyAdmin, CompanyUser, Compliance Root User, ComplianceAdmin, ComplianceUser, CSPAdmin, CSPTester, ECMAccountUser, ECMCompanyUser, FirmAdmin, FirmUser, ProStoresOperator, Registrar, SiteAdmin, SSTAdmin, SystemAdmin, SystemOperator, TechnicalSupportAdmin, TechnicalSupportUser, TreasuryAdmin, TreasuryUser. + * Swagger Name: AvaTaxClient + * * * @param {number} id The ID of the user to retrieve. - * @param {number} accountId The accountID of the user you wish to get. - * @return {Models.UserEntitlementModel} - */ - - getUserEntitlements({ id, accountId }: { id: number, accountId: number }): Promise { - var path = this.buildUrl({ - url: `/api/v2/accounts/${accountId}/users/${id}/entitlements`, - parameters: {} - }); - var strClientId = - this.appNM + - '; ' + - this.appVer + - '; JavascriptSdk; ' + this.apiVersion + '; ' + - this.machineNM; + * @param {number} accountId The accountID of the user you wish to get. + * @return {Models.UserEntitlementModel} + */ + + getUserEntitlements({ id, accountId }: { id: number, accountId: number }): Promise { + var path = this.buildUrl({ + url: `/api/v2/accounts/${accountId}/users/${id}/entitlements`, + parameters: {} + }); + var strClientId = + this.appNM + + '; ' + + this.appVer + + '; JavascriptSdk; ' + this.apiVersion + '; ' + + this.machineNM; return this.restCall({ url: path, verb: 'get', payload: null, clientId: strClientId }, Models.UserEntitlementModel); - } - - /** - * Retrieve users for this account + } + + /** + * 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. * @@ -15071,22 +15332,22 @@ export default class AvaTaxClient { * * ### Security Policies * - * * This API requires one of the following user roles: AccountAdmin, AccountOperator, AccountUser, BatchServiceAdmin, CompanyAdmin, CompanyUser, Compliance Root User, ComplianceAdmin, ComplianceUser, CSPAdmin, CSPTester, ECMAccountUser, ECMCompanyUser, FirmAdmin, FirmUser, ProStoresOperator, Registrar, SiteAdmin, SSTAdmin, SystemAdmin, SystemOperator, TechnicalSupportAdmin, TechnicalSupportUser, TreasuryAdmin, TreasuryUser. - * Swagger Name: AvaTaxClient - * + * * This API requires one of the following user roles: AccountAdmin, AccountOperator, AccountUser, BatchServiceAdmin, CompanyAdmin, CompanyUser, Compliance Root User, ComplianceAdmin, ComplianceUser, CSPAdmin, CSPTester, ECMAccountUser, ECMCompanyUser, FirmAdmin, FirmUser, ProStoresOperator, Registrar, SiteAdmin, SSTAdmin, SystemAdmin, SystemOperator, TechnicalSupportAdmin, TechnicalSupportUser, TreasuryAdmin, TreasuryUser. + * Swagger Name: AvaTaxClient + * * * @param {number} 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 {number} top If nonzero, return no more than this number of results. Used with `$skip` to provide pagination for large datasets. Unless otherwise specified, the maximum number of records that can be returned from an API call is 1,000 records. * @param {number} skip If nonzero, skip this number of results before returning data. Used with `$top` to provide pagination for large datasets. - * @param {string} orderBy A comma separated list of sort statements in the format `(fieldname) [ASC|DESC]`, for example `id ASC`. - * @return {FetchResult} - */ - - listUsersByAccount({ accountId, include, filter, top, skip, orderBy }: { accountId: number, include?: string, filter?: string, top?: number, skip?: number, orderBy?: string }): Promise> { - 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 }: { accountId: number, include?: string, filter?: string, top?: number, skip?: number, orderBy?: string }): Promise> { + var path = this.buildUrl({ + url: `/api/v2/accounts/${accountId}/users`, parameters: { $include: include, $filter: filter, @@ -15094,18 +15355,18 @@ export default class AvaTaxClient { $skip: skip, $orderBy: orderBy } - }); - var strClientId = - this.appNM + - '; ' + - this.appVer + - '; JavascriptSdk; ' + this.apiVersion + '; ' + - this.machineNM; + }); + var strClientId = + this.appNM + + '; ' + + this.appVer + + '; JavascriptSdk; ' + this.apiVersion + '; ' + + this.machineNM; return this.restCall({ url: path, verb: 'get', payload: null, clientId: strClientId }, FetchResult); - } - - /** - * Retrieve all users + } + + /** + * 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 @@ -15123,21 +15384,21 @@ export default class AvaTaxClient { * * ### Security Policies * - * * This API requires one of the following user roles: AccountAdmin, AccountOperator, AccountUser, BatchServiceAdmin, CompanyAdmin, CompanyUser, Compliance Root User, ComplianceAdmin, ComplianceUser, CSPAdmin, CSPTester, ECMAccountUser, ECMCompanyUser, FirmAdmin, FirmUser, ProStoresOperator, Registrar, SiteAdmin, SSTAdmin, SystemAdmin, SystemOperator, TechnicalSupportAdmin, TechnicalSupportUser, TreasuryAdmin, TreasuryUser. - * Swagger Name: AvaTaxClient - * + * * This API requires one of the following user roles: AccountAdmin, AccountOperator, AccountUser, BatchServiceAdmin, CompanyAdmin, CompanyUser, Compliance Root User, ComplianceAdmin, ComplianceUser, CSPAdmin, CSPTester, ECMAccountUser, ECMCompanyUser, 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 {number} top If nonzero, return no more than this number of results. Used with `$skip` to provide pagination for large datasets. Unless otherwise specified, the maximum number of records that can be returned from an API call is 1,000 records. * @param {number} skip If nonzero, skip this number of results before returning data. Used with `$top` to provide pagination for large datasets. - * @param {string} orderBy A comma separated list of sort statements in the format `(fieldname) [ASC|DESC]`, for example `id ASC`. - * @return {FetchResult} - */ - - queryUsers({ include, filter, top, skip, orderBy }: { include?: string, filter?: string, top?: number, skip?: number, orderBy?: string }): Promise> { - 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 }: { include?: string, filter?: string, top?: number, skip?: number, orderBy?: string }): Promise> { + var path = this.buildUrl({ + url: `/api/v2/users`, parameters: { $include: include, $filter: filter, @@ -15145,18 +15406,18 @@ export default class AvaTaxClient { $skip: skip, $orderBy: orderBy } - }); - var strClientId = - this.appNM + - '; ' + - this.appVer + - '; JavascriptSdk; ' + this.apiVersion + '; ' + - this.machineNM; + }); + var strClientId = + this.appNM + + '; ' + + this.appVer + + '; JavascriptSdk; ' + this.apiVersion + '; ' + + this.machineNM; return this.restCall({ url: path, verb: 'get', payload: null, clientId: strClientId }, FetchResult); - } - - /** - * Update a single user + } + + /** + * 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. @@ -15164,32 +15425,32 @@ export default class AvaTaxClient { * * ### Security Policies * - * * This API requires one of the following user roles: AccountAdmin, AccountUser, BatchServiceAdmin, CompanyAdmin, CompanyUser, Compliance Root User, ComplianceAdmin, ComplianceUser, CSPTester, FirmAdmin, FirmUser, Registrar, SiteAdmin, SSTAdmin, SystemAdmin, TechnicalSupportAdmin, TechnicalSupportUser, TreasuryAdmin, TreasuryUser. - * Swagger Name: AvaTaxClient - * + * * This API requires one of the following user roles: AccountAdmin, AccountUser, BatchServiceAdmin, CompanyAdmin, CompanyUser, Compliance Root User, ComplianceAdmin, ComplianceUser, CSPTester, FirmAdmin, FirmUser, Registrar, SiteAdmin, SSTAdmin, SystemAdmin, TechnicalSupportAdmin, TechnicalSupportUser, TreasuryAdmin, TreasuryUser. + * Swagger Name: AvaTaxClient + * * * @param {number} id The ID of the user you wish to update. * @param {number} accountId The accountID of the user you wish to update. - * @param {Models.UserModel} model The user object you wish to update. - * @return {Models.UserModel} - */ - - updateUser({ id, accountId, model }: { id: number, accountId: number, model: Models.UserModel }): Promise { - var path = this.buildUrl({ - url: `/api/v2/accounts/${accountId}/users/${id}`, - parameters: {} - }); - var strClientId = - this.appNM + - '; ' + - this.appVer + - '; JavascriptSdk; ' + this.apiVersion + '; ' + - this.machineNM; + * @param {Models.UserModel} model The user object you wish to update. + * @return {Models.UserModel} + */ + + updateUser({ id, accountId, model }: { id: number, accountId: number, model: Models.UserModel }): Promise { + var path = this.buildUrl({ + url: `/api/v2/accounts/${accountId}/users/${id}`, + parameters: {} + }); + var strClientId = + this.appNM + + '; ' + + this.appVer + + '; JavascriptSdk; ' + this.apiVersion + '; ' + + this.machineNM; return this.restCall({ url: path, verb: 'put', payload: model, clientId: strClientId }, Models.UserModel); - } - - /** - * Checks if the current user is subscribed to a specific service + } + + /** + * 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. @@ -15197,30 +15458,30 @@ 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. - * Swagger Name: AvaTaxClient - * - * - * @param {string} serviceTypeId The service to check - * @return {Models.SubscriptionModel} - */ - - getMySubscription({ serviceTypeId }: { serviceTypeId: string }): Promise { - var path = this.buildUrl({ - url: `/api/v2/utilities/subscriptions/${serviceTypeId}`, - parameters: {} - }); - var strClientId = - this.appNM + - '; ' + - this.appVer + - '; JavascriptSdk; ' + this.apiVersion + '; ' + - this.machineNM; + * specific features of AvaTax. + * Swagger Name: AvaTaxClient + * + * + * @param {string} serviceTypeId The service to check + * @return {Models.SubscriptionModel} + */ + + getMySubscription({ serviceTypeId }: { serviceTypeId: string }): Promise { + var path = this.buildUrl({ + url: `/api/v2/utilities/subscriptions/${serviceTypeId}`, + parameters: {} + }); + var strClientId = + this.appNM + + '; ' + + this.appVer + + '; JavascriptSdk; ' + this.apiVersion + '; ' + + this.machineNM; return this.restCall({ url: path, verb: 'get', payload: null, clientId: strClientId }, Models.SubscriptionModel); - } - - /** - * List all services to which the current user is subscribed + } + + /** + * 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. @@ -15228,29 +15489,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. - * Swagger Name: AvaTaxClient - * - * - * @return {FetchResult} - */ - - listMySubscriptions(): Promise> { - var path = this.buildUrl({ - url: `/api/v2/utilities/subscriptions`, - parameters: {} - }); - var strClientId = - this.appNM + - '; ' + - this.appVer + - '; JavascriptSdk; ' + this.apiVersion + '; ' + - this.machineNM; + * specific features of AvaTax. + * Swagger Name: AvaTaxClient + * + * + * @return {FetchResult} + */ + + listMySubscriptions(): Promise> { + var path = this.buildUrl({ + url: `/api/v2/utilities/subscriptions`, + parameters: {} + }); + var strClientId = + this.appNM + + '; ' + + this.appVer + + '; JavascriptSdk; ' + this.apiVersion + '; ' + + this.machineNM; return this.restCall({ url: path, verb: 'get', payload: null, clientId: strClientId }, FetchResult); - } - - /** - * Tests connectivity and version of the service + } + + /** + * 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 @@ -15270,29 +15531,29 @@ export default class AvaTaxClient { * * ### Security Policies * - * * This API may be called without providing authentication credentials. - * Swagger Name: AvaTaxClient - * - * - * @return {Models.PingResultModel} - */ - - ping(): Promise { - var path = this.buildUrl({ - url: `/api/v2/utilities/ping`, - parameters: {} - }); - var strClientId = - this.appNM + - '; ' + - this.appVer + - '; JavascriptSdk; ' + this.apiVersion + '; ' + - this.machineNM; + * * This API may be called without providing authentication credentials. + * Swagger Name: AvaTaxClient + * + * + * @return {Models.PingResultModel} + */ + + ping(): Promise { + var path = this.buildUrl({ + url: `/api/v2/utilities/ping`, + parameters: {} + }); + var strClientId = + this.appNM + + '; ' + + this.appVer + + '; JavascriptSdk; ' + this.apiVersion + '; ' + + this.machineNM; return this.restCall({ url: path, verb: 'get', payload: null, clientId: strClientId }, Models.PingResultModel); - } - - /** - * Fetches a previously stored age verification response. + } + + /** + * Fetches a previously stored age verification response. * 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*: @@ -15302,30 +15563,30 @@ export default class AvaTaxClient { * * Optionally, the request 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*] - * Swagger Name: AvaTaxBeverageClient - * - * - * @param {Models.AgeVerifyRequest} model Information about the individual whose age is being verified. - * @return {Models.AgeVerifyResult} - */ - - findAgeVerification({ model }: { model: Models.AgeVerifyRequest }): Promise { - var path = this.buildUrl({ - url: `/api/v2/ageverification/store/identity/find`, - parameters: {} - }); - var strClientId = - this.appNM + - '; ' + - this.appVer + - '; JavascriptSdk; ' + this.apiVersion + '; ' + - this.machineNM; + * * The valid values for this attribute are [*US, USA*] + * Swagger Name: AvaTaxBeverageClient + * + * + * @param {Models.AgeVerifyRequest} model Information about the individual whose age is being verified. + * @return {Models.AgeVerifyResult} + */ + + findAgeVerification({ model }: { model: Models.AgeVerifyRequest }): Promise { + var path = this.buildUrl({ + url: `/api/v2/ageverification/store/identity/find`, + parameters: {} + }); + var strClientId = + this.appNM + + '; ' + + this.appVer + + '; JavascriptSdk; ' + this.apiVersion + '; ' + + this.machineNM; return this.restCall({ url: path, verb: 'put', payload: model, clientId: strClientId }, Models.AgeVerifyResult); - } - - /** - * Stores an age verification response for the account. + } + + /** + * Stores an age verification response for the account. * The request field 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*: @@ -15339,30 +15600,30 @@ export default class AvaTaxClient { * * * The response field must meet the following criteria in order to be evaluated: - * * *isOfAge*, *failureCodes* are required fields - * Swagger Name: AvaTaxBeverageClient - * - * - * @param {Models.StoreAgeVerifyRequest} model Information about the individual whose age has been verified and the corresponding age verification response. - * @return {} - */ - - storeAgeVerification({ model }: { model: Models.StoreAgeVerifyRequest }): Promise { - var path = this.buildUrl({ - url: `/api/v2/ageverification/store/identity`, - parameters: {} - }); - var strClientId = - this.appNM + - '; ' + - this.appVer + - '; JavascriptSdk; ' + this.apiVersion + '; ' + - this.machineNM; + * * *isOfAge*, *failureCodes* are required fields + * Swagger Name: AvaTaxBeverageClient + * + * + * @param {Models.StoreAgeVerifyRequest} model Information about the individual whose age has been verified and the corresponding age verification response. + * @return {} + */ + + storeAgeVerification({ model }: { model: Models.StoreAgeVerifyRequest }): Promise { + var path = this.buildUrl({ + url: `/api/v2/ageverification/store/identity`, + parameters: {} + }); + var strClientId = + this.appNM + + '; ' + + this.appVer + + '; JavascriptSdk; ' + this.apiVersion + '; ' + + this.machineNM; return this.restCall({ url: path, verb: 'put', payload: model, clientId: strClientId }, null); - } - - /** - * Conditionally performs an age verification check. If a record matching the request is found in the internal store, the associated response is returned. Otherwise, an age verification check is performed and the response is stored if the individual is determined to be of age. + } + + /** + * Conditionally performs an age verification check. If a record matching the request is found in the internal store, the associated response is returned. Otherwise, an age verification check is performed and the response is stored if the individual is determined to be of 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*: @@ -15372,33 +15633,33 @@ export default class AvaTaxClient { * * Optionally, the request 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*] - * Swagger Name: AvaTaxBeverageClient - * + * * The valid values for this attribute are [*US, USA*] + * 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 {Models.AgeVerifyRequest} model Information about the individual whose age is being verified. - * @return {Models.StoreIfVerifiedResult} - */ - - storeIfVerified({ simulatedFailureCode, model }: { simulatedFailureCode?: string, model: Models.AgeVerifyRequest }): Promise { - var path = this.buildUrl({ - url: `/api/v2/ageverification/store/identity/storeIfVerified`, + * @param {Models.AgeVerifyRequest} model Information about the individual whose age is being verified. + * @return {Models.StoreIfVerifiedResult} + */ + + storeIfVerified({ simulatedFailureCode, model }: { simulatedFailureCode?: string, model: Models.AgeVerifyRequest }): Promise { + var path = this.buildUrl({ + url: `/api/v2/ageverification/store/identity/storeIfVerified`, parameters: { simulatedFailureCode: simulatedFailureCode } - }); - var strClientId = - this.appNM + - '; ' + - this.appVer + - '; JavascriptSdk; ' + this.apiVersion + '; ' + - this.machineNM; + }); + var strClientId = + this.appNM + + '; ' + + this.appVer + + '; JavascriptSdk; ' + this.apiVersion + '; ' + + this.machineNM; return this.restCall({ url: path, verb: 'put', payload: model, clientId: strClientId }, Models.StoreIfVerifiedResult); - } - - /** - * Determines whether an individual meets or exceeds the minimum legal drinking age. + } + + /** + * 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*: @@ -15411,138 +15672,138 @@ export default class AvaTaxClient { * * The valid values for this attribute are [*US, USA*] * * **Security Policies** - * This API depends on the active subscription *AgeVerification* - * Swagger Name: AvaTaxBeverageClient - * + * 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 {Models.AgeVerifyRequest} model Information about the individual whose age is being verified. - * @return {Models.AgeVerifyResult} - */ - - verifyAge({ simulatedFailureCode, model }: { simulatedFailureCode?: string, model: Models.AgeVerifyRequest }): Promise { - var path = this.buildUrl({ - url: `/api/v2/ageverification/verify`, + * @param {Models.AgeVerifyRequest} model Information about the individual whose age is being verified. + * @return {Models.AgeVerifyResult} + */ + + verifyAge({ simulatedFailureCode, model }: { simulatedFailureCode?: string, model: Models.AgeVerifyRequest }): Promise { + var path = this.buildUrl({ + url: `/api/v2/ageverification/verify`, parameters: { simulatedFailureCode: simulatedFailureCode } - }); - var strClientId = - this.appNM + - '; ' + - this.appVer + - '; JavascriptSdk; ' + this.apiVersion + '; ' + - this.machineNM; + }); + var strClientId = + this.appNM + + '; ' + + this.appVer + + '; JavascriptSdk; ' + this.apiVersion + '; ' + + this.machineNM; return this.restCall({ url: path, verb: 'post', payload: model, clientId: strClientId }, Models.AgeVerifyResult); - } - - /** - * Removes the transaction from consideration when evaluating regulations that span multiple transactions. - * - * Swagger Name: AvaTaxBeverageClient - * + } + + /** + * 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" * @param {string} api_version (Optional): API version that should satisfy the request. If omitted, defaults to 2.2 - * @param {string} x_avalara_version (Optional): API version that should satisfy the request. If omitted, defaults to 2.2. Header takes precendence if both header and query parameters are present. - * @return {} - */ - - deregisterShipment({ companyCode, transactionCode, documentType, api_version= "", x_avalara_version= "" }: { companyCode: string, transactionCode: string, documentType?: string, api_version?: string, x_avalara_version?: string }): Promise { - var path = this.buildUrl({ - url: `/api/v2/companies/${companyCode}/transactions/${transactionCode}/shipment/registration`, + * @param {string} x_avalara_version (Optional): API version that should satisfy the request. If omitted, defaults to 2.2. Header takes precendence if both header and query parameters are present. + * @return {} + */ + + deregisterShipment({ companyCode, transactionCode, documentType, api_version= "", x_avalara_version= "" }: { companyCode: string, transactionCode: string, documentType?: string, api_version?: string, x_avalara_version?: string }): Promise { + var path = this.buildUrl({ + url: `/api/v2/companies/${companyCode}/transactions/${transactionCode}/shipment/registration`, parameters: { documentType: documentType, 'api-version': api_version } - }); - var strClientId = - this.appNM + - '; ' + - this.appVer + - '; JavascriptSdk; ' + this.apiVersion + '; ' + - this.machineNM; + }); + var strClientId = + this.appNM + + '; ' + + this.appVer + + '; JavascriptSdk; ' + this.apiVersion + '; ' + + this.machineNM; var headerValues = new Map(); if ( x_avalara_version) { headerValues.set("x-avalara-version", x_avalara_version); } return this.restCall({ url: path, verb: 'delete', payload: null, clientId: strClientId, mapHeader: headerValues }, null); - } - - /** - * Registers the transaction so that it may be included when evaluating regulations that span multiple transactions. - * - * Swagger Name: AvaTaxBeverageClient - * + } + + /** + * 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" * @param {string} api_version (Optional): API version that should satisfy the request. If omitted, defaults to 2.2 - * @param {string} x_avalara_version (Optional): API version that should satisfy the request. If omitted, defaults to 2.2. Header takes precendence if both header and query parameters are present. - * @return {} - */ - - registerShipment({ companyCode, transactionCode, documentType, api_version= "", x_avalara_version= "" }: { companyCode: string, transactionCode: string, documentType?: string, api_version?: string, x_avalara_version?: string }): Promise { - var path = this.buildUrl({ - url: `/api/v2/companies/${companyCode}/transactions/${transactionCode}/shipment/registration`, + * @param {string} x_avalara_version (Optional): API version that should satisfy the request. If omitted, defaults to 2.2. Header takes precendence if both header and query parameters are present. + * @return {} + */ + + registerShipment({ companyCode, transactionCode, documentType, api_version= "", x_avalara_version= "" }: { companyCode: string, transactionCode: string, documentType?: string, api_version?: string, x_avalara_version?: string }): Promise { + var path = this.buildUrl({ + url: `/api/v2/companies/${companyCode}/transactions/${transactionCode}/shipment/registration`, parameters: { documentType: documentType, 'api-version': api_version } - }); - var strClientId = - this.appNM + - '; ' + - this.appVer + - '; JavascriptSdk; ' + this.apiVersion + '; ' + - this.machineNM; + }); + var strClientId = + this.appNM + + '; ' + + this.appVer + + '; JavascriptSdk; ' + this.apiVersion + '; ' + + this.machineNM; var headerValues = new Map(); if ( x_avalara_version) { headerValues.set("x-avalara-version", x_avalara_version); } return this.restCall({ url: path, verb: 'put', payload: null, clientId: strClientId, mapHeader: headerValues }, null); - } - - /** - * 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 - * + } + + /** + * 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" * @param {string} api_version (Optional): API version that should satisfy the request. If omitted, defaults to 2.2 - * @param {string} x_avalara_version (Optional): API version that should satisfy the request. If omitted, defaults to 2.2. Header takes precendence if both header and query parameters are present. - * @return {Models.ShippingVerifyResult} - */ - - registerShipmentIfCompliant({ companyCode, transactionCode, documentType, api_version= "", x_avalara_version= "" }: { companyCode: string, transactionCode: string, documentType?: string, api_version?: string, x_avalara_version?: string }): Promise { - var path = this.buildUrl({ - url: `/api/v2/companies/${companyCode}/transactions/${transactionCode}/shipment/registerIfCompliant`, + * @param {string} x_avalara_version (Optional): API version that should satisfy the request. If omitted, defaults to 2.2. Header takes precendence if both header and query parameters are present. + * @return {Models.ShippingVerifyResult} + */ + + registerShipmentIfCompliant({ companyCode, transactionCode, documentType, api_version= "", x_avalara_version= "" }: { companyCode: string, transactionCode: string, documentType?: string, api_version?: string, x_avalara_version?: string }): Promise { + var path = this.buildUrl({ + url: `/api/v2/companies/${companyCode}/transactions/${transactionCode}/shipment/registerIfCompliant`, parameters: { documentType: documentType, 'api-version': api_version } - }); - var strClientId = - this.appNM + - '; ' + - this.appVer + - '; JavascriptSdk; ' + this.apiVersion + '; ' + - this.machineNM; + }); + var strClientId = + this.appNM + + '; ' + + this.appVer + + '; JavascriptSdk; ' + this.apiVersion + '; ' + + this.machineNM; var headerValues = new Map(); if ( x_avalara_version) { headerValues.set("x-avalara-version", x_avalara_version); } return this.restCall({ url: path, verb: 'put', payload: null, clientId: strClientId, mapHeader: headerValues }, Models.ShippingVerifyResult); - } - - /** - * Evaluates a transaction against a set of direct-to-consumer shipping regulations. + } + + /** + * 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*' @@ -15558,128 +15819,128 @@ export default class AvaTaxClient { * * The *SalesLocation* parameter may be used to describe whether the sale was made *OnSite* or *OffSite*. *OffSite* is the default value. * * **Security Policies** - * This API depends on all of the following active subscriptions: *AvaAlcohol, AutoAddress, AvaTaxPro* - * Swagger Name: AvaTaxBeverageClient - * + * 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" * @param {string} api_version (Optional): API version that should satisfy the request. If omitted, defaults to 2.2 - * @param {string} x_avalara_version (Optional): API version that should satisfy the request. If omitted, defaults to 2.2. Header takes precendence if both header and query parameters are present. - * @return {Models.ShippingVerifyResult} - */ - - verifyShipment({ companyCode, transactionCode, documentType, api_version= "", x_avalara_version= "" }: { companyCode: string, transactionCode: string, documentType?: string, api_version?: string, x_avalara_version?: string }): Promise { - var path = this.buildUrl({ - url: `/api/v2/companies/${companyCode}/transactions/${transactionCode}/shipment/verify`, + * @param {string} x_avalara_version (Optional): API version that should satisfy the request. If omitted, defaults to 2.2. Header takes precendence if both header and query parameters are present. + * @return {Models.ShippingVerifyResult} + */ + + verifyShipment({ companyCode, transactionCode, documentType, api_version= "", x_avalara_version= "" }: { companyCode: string, transactionCode: string, documentType?: string, api_version?: string, x_avalara_version?: string }): Promise { + var path = this.buildUrl({ + url: `/api/v2/companies/${companyCode}/transactions/${transactionCode}/shipment/verify`, parameters: { documentType: documentType, 'api-version': api_version } - }); - var strClientId = - this.appNM + - '; ' + - this.appVer + - '; JavascriptSdk; ' + this.apiVersion + '; ' + - this.machineNM; + }); + var strClientId = + this.appNM + + '; ' + + this.appVer + + '; JavascriptSdk; ' + this.apiVersion + '; ' + + this.machineNM; var headerValues = new Map(); if ( x_avalara_version) { headerValues.set("x-avalara-version", x_avalara_version); } return this.restCall({ url: path, verb: 'get', payload: null, clientId: strClientId, mapHeader: headerValues }, Models.ShippingVerifyResult); - } - - /** - * Enqueues a batch of AvaTax transactions to be deregistered by ASV - * - * Swagger Name: AvaTaxBeverageClient - * + } + + /** + * Enqueues a batch of AvaTax transactions to be deregistered by ASV + * + * Swagger Name: AvaTaxBeverageClient + * * * @param {string} companyCode The company code of the company that recorded the transaction * @param {string} batchCode The batch code of generated by AvaTax batch transaction upload * @param {string} api_version (Optional): API version that should satisfy the request. If omitted, defaults to 2.2 - * @param {string} x_avalara_version (Optional): API version that should satisfy the request. If omitted, defaults to 2.2. Header takes precendence if both header and query parameters are present. - * @return {} - */ - - enqueueBatchDeregistration({ companyCode, batchCode, api_version= "", x_avalara_version= "" }: { companyCode: string, batchCode: string, api_version?: string, x_avalara_version?: string }): Promise { - var path = this.buildUrl({ - url: `/api/v2/asv/companies/${companyCode}/batches/${batchCode}/deregister`, + * @param {string} x_avalara_version (Optional): API version that should satisfy the request. If omitted, defaults to 2.2. Header takes precendence if both header and query parameters are present. + * @return {} + */ + + enqueueBatchDeregistration({ companyCode, batchCode, api_version= "", x_avalara_version= "" }: { companyCode: string, batchCode: string, api_version?: string, x_avalara_version?: string }): Promise { + var path = this.buildUrl({ + url: `/api/v2/asv/companies/${companyCode}/batches/${batchCode}/deregister`, parameters: { 'api-version': api_version } - }); - var strClientId = - this.appNM + - '; ' + - this.appVer + - '; JavascriptSdk; ' + this.apiVersion + '; ' + - this.machineNM; + }); + var strClientId = + this.appNM + + '; ' + + this.appVer + + '; JavascriptSdk; ' + this.apiVersion + '; ' + + this.machineNM; var headerValues = new Map(); if ( x_avalara_version) { headerValues.set("x-avalara-version", x_avalara_version); } return this.restCall({ url: path, verb: 'put', payload: null, clientId: strClientId, mapHeader: headerValues }, null); - } - - /** - * Enqueues a batch of AvaTax transactions to be registered by ASV - * - * Swagger Name: AvaTaxBeverageClient - * + } + + /** + * Enqueues a batch of AvaTax transactions to be registered by ASV + * + * Swagger Name: AvaTaxBeverageClient + * * * @param {string} companyCode The company code of the company that recorded the transaction * @param {string} batchCode The batch code generated by AvaTax for batch transaction upload process * @param {string} api_version (Optional): API version that should satisfy the request. If omitted, defaults to 2.2 - * @param {string} x_avalara_version (Optional): API version that should satisfy the request. If omitted, defaults to 2.2. Header takes precendence if both header and query parameters are present. - * @return {} - */ - - enqueueBatchRegistration({ companyCode, batchCode, api_version= "", x_avalara_version= "" }: { companyCode: string, batchCode: string, api_version?: string, x_avalara_version?: string }): Promise { - var path = this.buildUrl({ - url: `/api/v2/asv/companies/${companyCode}/batches/${batchCode}/register`, + * @param {string} x_avalara_version (Optional): API version that should satisfy the request. If omitted, defaults to 2.2. Header takes precendence if both header and query parameters are present. + * @return {} + */ + + enqueueBatchRegistration({ companyCode, batchCode, api_version= "", x_avalara_version= "" }: { companyCode: string, batchCode: string, api_version?: string, x_avalara_version?: string }): Promise { + var path = this.buildUrl({ + url: `/api/v2/asv/companies/${companyCode}/batches/${batchCode}/register`, parameters: { 'api-version': api_version } - }); - var strClientId = - this.appNM + - '; ' + - this.appVer + - '; JavascriptSdk; ' + this.apiVersion + '; ' + - this.machineNM; + }); + var strClientId = + this.appNM + + '; ' + + this.appVer + + '; JavascriptSdk; ' + this.apiVersion + '; ' + + this.machineNM; var headerValues = new Map(); if ( x_avalara_version) { headerValues.set("x-avalara-version", x_avalara_version); } return this.restCall({ url: path, verb: 'put', payload: null, clientId: strClientId, mapHeader: headerValues }, null); - } - - /** - * Gets records for current and previously processed batch registration jobs - * - * Swagger Name: AvaTaxBeverageClient - * - * - * @param {string} accountId (Optional): For users with access to multiple accounts, filters results to those associated with the specified Account ID. If not specified, the Account ID defaults to the one associated with the account - * @return {Models.GetBatchesResult} - */ - - getBatchRegistrationData({ accountId }: { accountId?: string }): Promise { - var path = this.buildUrl({ - url: `/api/v2/asv/batches`, + } + + /** + * Gets records for current and previously processed batch registration jobs + * + * Swagger Name: AvaTaxBeverageClient + * + * + * @param {string} accountId (Optional): For users with access to multiple accounts, filters results to those associated with the specified Account ID. If not specified, the Account ID defaults to the one associated with the account + * @return {Models.GetBatchesResult} + */ + + getBatchRegistrationData({ accountId }: { accountId?: string }): Promise { + var path = this.buildUrl({ + url: `/api/v2/asv/batches`, parameters: { accountId: accountId } - }); - var strClientId = - this.appNM + - '; ' + - this.appVer + - '; JavascriptSdk; ' + this.apiVersion + '; ' + - this.machineNM; + }); + var strClientId = + this.appNM + + '; ' + + this.appVer + + '; JavascriptSdk; ' + this.apiVersion + '; ' + + this.machineNM; return this.restCall({ url: path, verb: 'get', payload: null, clientId: strClientId }, Models.GetBatchesResult); - } -} + } +} diff --git a/lib/enums/APStatus.ts b/lib/enums/APStatus.ts index 15e711c..7bb6ed1 100644 --- a/lib/enums/APStatus.ts +++ b/lib/enums/APStatus.ts @@ -21,19 +21,19 @@ import { JsonConverter, JsonCustomConvert } from "json2typescript"; */ export enum APStatus { NoAccrualMatch = 0, - ShortPayItemsAccrueMatch = 1, - MarkForReviewMatch = 2, - RejectMatch = 3, + AccruedShortPayItemsMatch = 1, + NeedReviewMatch = 2, + NoAccrualRejectMatch = 3, NoAccrualUndercharge = 4, AccruedUndercharge = 5, - ShortPayItemsAccrueUndercharge = 6, + AccruedShortPayItemsUndercharge = 6, NeedReviewUndercharge = 7, - RejectUndercharge = 8, + NoAccrualRejectUndercharge = 8, NoAccrualOvercharge = 9, - ShortPayAvalaraCalculated = 10, - ShortPayItemsAccrueOvercharge = 11, - MarkForReviewOvercharge = 12, - RejectOvercharge = 13, + NoAccrualShortPayAvalaraCalculated = 10, + AccruedShortPayItemsOvercharge = 11, + NeedReviewOvercharge = 12, + NoAccrualRejectOvercharge = 13, NoAccrualAmountThresholdNotMet = 14, NoAccrualExemptedCostCenter = 15, NoAccrualExemptedItem = 16, @@ -44,6 +44,18 @@ import { JsonConverter, JsonCustomConvert } from "json2typescript"; NoAccrualExemptedGLAccount = 21, PendingAccrualVendor = 22, PendingAccrualUndercharge = 23, + PendingShortPayItemsUndercharge = 24, + PendingShortPayItemsMatch = 25, + PendingShortPayItemsOvercharge = 26, + ShortPayItemsAccrueMatch = -1, + MarkForReviewMatch = -1, + RejectMatch = -1, + ShortPayItemsAccrueUndercharge = -1, + RejectUndercharge = -1, + ShortPayAvalaraCalculated = -1, + ShortPayItemsAccrueOvercharge = -1, + MarkForReviewOvercharge = -1, + RejectOvercharge = -1, } @JsonConverter diff --git a/lib/enums/ErrorCodeId.ts b/lib/enums/ErrorCodeId.ts index 6c12301..66c84e2 100644 --- a/lib/enums/ErrorCodeId.ts +++ b/lib/enums/ErrorCodeId.ts @@ -392,6 +392,8 @@ import { JsonConverter, JsonCustomConvert } from "json2typescript"; InvalidCostCenter = 2813, TooManyItemsInSyncFlowRequest = 2814, InvalidTaxCodeIdInRecommendationStatusUpdate = 2815, + CommunicationCertificatesError = 2816, + InvalidCurrencyAggrementType = 2817, InvalidHTTPHeader = 3000, } diff --git a/lib/models/ActiveCertificateModel.ts b/lib/models/ActiveCertificateModel.ts index 6915410..1dc4095 100644 --- a/lib/models/ActiveCertificateModel.ts +++ b/lib/models/ActiveCertificateModel.ts @@ -21,7 +21,7 @@ import { JsonObject, JsonProperty } from "json2typescript"; import { DateConverter } from "../utils/dateConverter"; /** - * Certificate with exemption reason and exposure zone. Exposed in url $includes + * Certificate with exemption reason and exposure zone. This is exposed in the URL's `$includes`. * @export * @class ActiveCertificateModel */ diff --git a/lib/models/BatchModel.ts b/lib/models/BatchModel.ts index e1c4034..96486ab 100644 --- a/lib/models/BatchModel.ts +++ b/lib/models/BatchModel.ts @@ -37,12 +37,6 @@ import { DateConverter } from "../utils/dateConverter"; */ @JsonProperty("batchAgent", String, true) batchAgent?: string | undefined = undefined; - /** - * @type {string} - * @memberof BatchModel - */ - @JsonProperty("options", String, true) - options?: string | undefined = undefined; /** * @type {number} * @memberof BatchModel @@ -53,6 +47,12 @@ import { DateConverter } from "../utils/dateConverter"; * @type {string} * @memberof BatchModel */ + @JsonProperty("options", String, true) + options?: string | undefined = undefined; + /** + * @type {string} + * @memberof BatchModel + */ @JsonProperty("name", String) name: string = undefined; /** diff --git a/lib/models/CertificateInvalidReasonModel.ts b/lib/models/CertificateInvalidReasonModel.ts index ac21741..726adf2 100644 --- a/lib/models/CertificateInvalidReasonModel.ts +++ b/lib/models/CertificateInvalidReasonModel.ts @@ -18,7 +18,7 @@ import { JsonObject, JsonProperty } from "json2typescript"; import { DateConverter } from "../utils/dateConverter"; /** - * Invalid reason for the certificate + * The reason the certificate is invalid. * @export * @class CertificateInvalidReasonModel */ diff --git a/lib/models/CertificateLogModel.ts b/lib/models/CertificateLogModel.ts index c23d0c5..0685885 100644 --- a/lib/models/CertificateLogModel.ts +++ b/lib/models/CertificateLogModel.ts @@ -18,7 +18,7 @@ import { JsonObject, JsonProperty } from "json2typescript"; import { DateConverter } from "../utils/dateConverter"; /** - * certificate log for a customer. Exposed in url $includes + * The certificate log for a customer. This is exposed in the URL's `$includes`. * @export * @class CertificateLogModel */ diff --git a/lib/models/CommunicationCertificateResponse.ts b/lib/models/CommunicationCertificateResponse.ts new file mode 100644 index 0000000..b33eaea --- /dev/null +++ b/lib/models/CommunicationCertificateResponse.ts @@ -0,0 +1,83 @@ +/* + * AvaTax Software Development Kit for JavaScript + * + * (c) 2004-2022 Avalara, Inc. + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + * + * @author Jonathan Wenger + * @author Sachin Baijal + * @copyright 2004-2018 Avalara, Inc. + * @license https://www.apache.org/licenses/LICENSE-2.0 + * @link https://github.com/avadev/AvaTax-REST-V2-JS-SDK + */ + +import * as Enums from '../enums/index'; +import { CommunicationCustomerResponse } from "./CommunicationCustomerResponse"; +import { CommunicationTaxTypeResponse } from "./CommunicationTaxTypeResponse"; +import { JsonObject, JsonProperty } from "json2typescript"; +import { DateConverter } from "../utils/dateConverter"; + +/** + * Encloses communication certificate details + * @export + * @class CommunicationCertificateResponse + */ + @JsonObject("CommunicationCertificateResponse") + export class CommunicationCertificateResponse { + /** + * @type {number} + * @memberof CommunicationCertificateResponse + */ + @JsonProperty("id", Number, true) + id?: number | undefined = undefined; + /** + * @type {Date} + * @memberof CommunicationCertificateResponse + */ + @JsonProperty("effectiveDate", DateConverter, true) + effectiveDate?: Date | undefined = undefined; + /** + * @type {Date} + * @memberof CommunicationCertificateResponse + */ + @JsonProperty("expirationDate", DateConverter, true) + expirationDate?: Date | undefined = undefined; + /** + * @type {string} + * @memberof CommunicationCertificateResponse + */ + @JsonProperty("exemptionReason", String, true) + exemptionReason?: string | undefined = undefined; + /** + * @type {string} + * @memberof CommunicationCertificateResponse + */ + @JsonProperty("exemptionRegion", String, true) + exemptionRegion?: string | undefined = undefined; + /** + * @type {string} + * @memberof CommunicationCertificateResponse + */ + @JsonProperty("taxNumber", String, true) + taxNumber?: string | undefined = undefined; + /** + * @type {string} + * @memberof CommunicationCertificateResponse + */ + @JsonProperty("certificateStatus", String, true) + certificateStatus?: string | undefined = undefined; + /** + * @type {CommunicationCustomerResponse[]} + * @memberof CommunicationCertificateResponse + */ + @JsonProperty("customers", [CommunicationCustomerResponse], true) + customers?: CommunicationCustomerResponse[] | undefined = undefined; + /** + * @type {CommunicationTaxTypeResponse[]} + * @memberof CommunicationCertificateResponse + */ + @JsonProperty("exemptions", [CommunicationTaxTypeResponse], true) + exemptions?: CommunicationTaxTypeResponse[] | undefined = undefined; + } \ No newline at end of file diff --git a/lib/models/CommunicationCertificateResponsePage.ts b/lib/models/CommunicationCertificateResponsePage.ts new file mode 100644 index 0000000..c4cae93 --- /dev/null +++ b/lib/models/CommunicationCertificateResponsePage.ts @@ -0,0 +1,40 @@ +/* + * AvaTax Software Development Kit for JavaScript + * + * (c) 2004-2022 Avalara, Inc. + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + * + * @author Jonathan Wenger + * @author Sachin Baijal + * @copyright 2004-2018 Avalara, Inc. + * @license https://www.apache.org/licenses/LICENSE-2.0 + * @link https://github.com/avadev/AvaTax-REST-V2-JS-SDK + */ + +import * as Enums from '../enums/index'; +import { CommunicationCertificateResponse } from "./CommunicationCertificateResponse"; +import { JsonObject, JsonProperty } from "json2typescript"; +import { DateConverter } from "../utils/dateConverter"; + +/** + * Encloses count and model value details + * @export + * @class CommunicationCertificateResponsePage + */ + @JsonObject("CommunicationCertificateResponsePage") + export class CommunicationCertificateResponsePage { + /** + * @type {number} + * @memberof CommunicationCertificateResponsePage + */ + @JsonProperty("count", Number, true) + count?: number | undefined = undefined; + /** + * @type {CommunicationCertificateResponse[]} + * @memberof CommunicationCertificateResponsePage + */ + @JsonProperty("value", [CommunicationCertificateResponse], true) + value?: CommunicationCertificateResponse[] | undefined = undefined; + } \ No newline at end of file diff --git a/lib/models/CommunicationCustomerResponse.ts b/lib/models/CommunicationCustomerResponse.ts new file mode 100644 index 0000000..5d6d9ce --- /dev/null +++ b/lib/models/CommunicationCustomerResponse.ts @@ -0,0 +1,39 @@ +/* + * AvaTax Software Development Kit for JavaScript + * + * (c) 2004-2022 Avalara, Inc. + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + * + * @author Jonathan Wenger + * @author Sachin Baijal + * @copyright 2004-2018 Avalara, Inc. + * @license https://www.apache.org/licenses/LICENSE-2.0 + * @link https://github.com/avadev/AvaTax-REST-V2-JS-SDK + */ + +import * as Enums from '../enums/index'; +import { JsonObject, JsonProperty } from "json2typescript"; +import { DateConverter } from "../utils/dateConverter"; + +/** + * Encloses communication certificate customer + * @export + * @class CommunicationCustomerResponse + */ + @JsonObject("CommunicationCustomerResponse") + export class CommunicationCustomerResponse { + /** + * @type {number} + * @memberof CommunicationCustomerResponse + */ + @JsonProperty("id", Number, true) + id?: number | undefined = undefined; + /** + * @type {string} + * @memberof CommunicationCustomerResponse + */ + @JsonProperty("customerNumber", String, true) + customerNumber?: string | undefined = undefined; + } \ No newline at end of file diff --git a/lib/models/CommunicationExemptionDesignatorResponse.ts b/lib/models/CommunicationExemptionDesignatorResponse.ts new file mode 100644 index 0000000..cad3156 --- /dev/null +++ b/lib/models/CommunicationExemptionDesignatorResponse.ts @@ -0,0 +1,45 @@ +/* + * AvaTax Software Development Kit for JavaScript + * + * (c) 2004-2022 Avalara, Inc. + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + * + * @author Jonathan Wenger + * @author Sachin Baijal + * @copyright 2004-2018 Avalara, Inc. + * @license https://www.apache.org/licenses/LICENSE-2.0 + * @link https://github.com/avadev/AvaTax-REST-V2-JS-SDK + */ + +import * as Enums from '../enums/index'; +import { JsonObject, JsonProperty } from "json2typescript"; +import { DateConverter } from "../utils/dateConverter"; + +/** + * Encloses Communication exemption designator details + * @export + * @class CommunicationExemptionDesignatorResponse + */ + @JsonObject("CommunicationExemptionDesignatorResponse") + export class CommunicationExemptionDesignatorResponse { + /** + * @type {number} + * @memberof CommunicationExemptionDesignatorResponse + */ + @JsonProperty("id", Number, true) + id?: number | undefined = undefined; + /** + * @type {string} + * @memberof CommunicationExemptionDesignatorResponse + */ + @JsonProperty("type", String, true) + type?: string | undefined = undefined; + /** + * @type {string} + * @memberof CommunicationExemptionDesignatorResponse + */ + @JsonProperty("name", String, true) + name?: string | undefined = undefined; + } \ No newline at end of file diff --git a/lib/models/CommunicationLocationResponse.ts b/lib/models/CommunicationLocationResponse.ts new file mode 100644 index 0000000..b34b6b5 --- /dev/null +++ b/lib/models/CommunicationLocationResponse.ts @@ -0,0 +1,51 @@ +/* + * AvaTax Software Development Kit for JavaScript + * + * (c) 2004-2022 Avalara, Inc. + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + * + * @author Jonathan Wenger + * @author Sachin Baijal + * @copyright 2004-2018 Avalara, Inc. + * @license https://www.apache.org/licenses/LICENSE-2.0 + * @link https://github.com/avadev/AvaTax-REST-V2-JS-SDK + */ + +import * as Enums from '../enums/index'; +import { JsonObject, JsonProperty } from "json2typescript"; +import { DateConverter } from "../utils/dateConverter"; + +/** + * Encloses communication location details + * @export + * @class CommunicationLocationResponse + */ + @JsonObject("CommunicationLocationResponse") + export class CommunicationLocationResponse { + /** + * @type {string} + * @memberof CommunicationLocationResponse + */ + @JsonProperty("country", String, true) + country?: string | undefined = undefined; + /** + * @type {string} + * @memberof CommunicationLocationResponse + */ + @JsonProperty("state", String, true) + state?: string | undefined = undefined; + /** + * @type {string} + * @memberof CommunicationLocationResponse + */ + @JsonProperty("county", String, true) + county?: string | undefined = undefined; + /** + * @type {string} + * @memberof CommunicationLocationResponse + */ + @JsonProperty("city", String, true) + city?: string | undefined = undefined; + } \ No newline at end of file diff --git a/lib/models/CommunicationTaxTypeResponse.ts b/lib/models/CommunicationTaxTypeResponse.ts new file mode 100644 index 0000000..4a87f8f --- /dev/null +++ b/lib/models/CommunicationTaxTypeResponse.ts @@ -0,0 +1,53 @@ +/* + * AvaTax Software Development Kit for JavaScript + * + * (c) 2004-2022 Avalara, Inc. + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + * + * @author Jonathan Wenger + * @author Sachin Baijal + * @copyright 2004-2018 Avalara, Inc. + * @license https://www.apache.org/licenses/LICENSE-2.0 + * @link https://github.com/avadev/AvaTax-REST-V2-JS-SDK + */ + +import * as Enums from '../enums/index'; +import { CommunicationLocationResponse } from "./CommunicationLocationResponse"; +import { CommunicationExemptionDesignatorResponse } from "./CommunicationExemptionDesignatorResponse"; +import { JsonObject, JsonProperty } from "json2typescript"; +import { DateConverter } from "../utils/dateConverter"; + +/** + * Encloses communication tax type details + * @export + * @class CommunicationTaxTypeResponse + */ + @JsonObject("CommunicationTaxTypeResponse") + export class CommunicationTaxTypeResponse { + /** + * @type {CommunicationLocationResponse} + * @memberof CommunicationTaxTypeResponse + */ + @JsonProperty("location", CommunicationLocationResponse, true) + location?: CommunicationLocationResponse | undefined = undefined; + /** + * @type {CommunicationExemptionDesignatorResponse} + * @memberof CommunicationTaxTypeResponse + */ + @JsonProperty("exemptionDesignator", CommunicationExemptionDesignatorResponse, true) + exemptionDesignator?: CommunicationExemptionDesignatorResponse | undefined = undefined; + /** + * @type {string[]} + * @memberof CommunicationTaxTypeResponse + */ + @JsonProperty("scope", [String], true) + scope?: string[] | undefined = undefined; + /** + * @type {string} + * @memberof CommunicationTaxTypeResponse + */ + @JsonProperty("domain", String, true) + domain?: string | undefined = undefined; + } \ No newline at end of file diff --git a/lib/models/CreateTransactionBatchRequestModel.ts b/lib/models/CreateTransactionBatchRequestModel.ts index fb18b15..23d2bce 100644 --- a/lib/models/CreateTransactionBatchRequestModel.ts +++ b/lib/models/CreateTransactionBatchRequestModel.ts @@ -37,4 +37,10 @@ import { DateConverter } from "../utils/dateConverter"; */ @JsonProperty("transactions", [TransactionBatchItemModel]) transactions: TransactionBatchItemModel[] = undefined; + /** + * @type {string} + * @memberof CreateTransactionBatchRequestModel + */ + @JsonProperty("options", String, true) + options?: string | undefined = undefined; } \ No newline at end of file diff --git a/lib/models/CreateTransactionBatchResponseModel.ts b/lib/models/CreateTransactionBatchResponseModel.ts index 46f43d2..c21f43c 100644 --- a/lib/models/CreateTransactionBatchResponseModel.ts +++ b/lib/models/CreateTransactionBatchResponseModel.ts @@ -35,6 +35,12 @@ import { DateConverter } from "../utils/dateConverter"; * @type {string} * @memberof CreateTransactionBatchResponseModel */ + @JsonProperty("options", String, true) + options?: string | undefined = undefined; + /** + * @type {string} + * @memberof CreateTransactionBatchResponseModel + */ @JsonProperty("name", String) name: string = undefined; /** diff --git a/lib/models/CreditTransactionDetailLines.ts b/lib/models/CreditTransactionDetailLines.ts new file mode 100644 index 0000000..37860fe --- /dev/null +++ b/lib/models/CreditTransactionDetailLines.ts @@ -0,0 +1,63 @@ +/* + * AvaTax Software Development Kit for JavaScript + * + * (c) 2004-2022 Avalara, Inc. + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + * + * @author Jonathan Wenger + * @author Sachin Baijal + * @copyright 2004-2018 Avalara, Inc. + * @license https://www.apache.org/licenses/LICENSE-2.0 + * @link https://github.com/avadev/AvaTax-REST-V2-JS-SDK + */ + +import * as Enums from '../enums/index'; +import { JsonObject, JsonProperty } from "json2typescript"; +import { DateConverter } from "../utils/dateConverter"; + +/** + * Credit Transaction Detail Lines + * @export + * @class CreditTransactionDetailLines + */ + @JsonObject("CreditTransactionDetailLines") + export class CreditTransactionDetailLines { + /** + * @type {Date} + * @memberof CreditTransactionDetailLines + */ + @JsonProperty("reportingDate", DateConverter, true) + reportingDate?: Date | undefined = undefined; + /** + * @type {string} + * @memberof CreditTransactionDetailLines + */ + @JsonProperty("lineNo", String, true) + lineNo?: string | undefined = undefined; + /** + * @type {number} + * @memberof CreditTransactionDetailLines + */ + @JsonProperty("lineAmount", Number, true) + lineAmount?: number | undefined = undefined; + /** + * @type {number} + * @memberof CreditTransactionDetailLines + */ + @JsonProperty("exemptAmount", Number, true) + exemptAmount?: number | undefined = undefined; + /** + * @type {number} + * @memberof CreditTransactionDetailLines + */ + @JsonProperty("taxableAmount", Number, true) + taxableAmount?: number | undefined = undefined; + /** + * @type {number} + * @memberof CreditTransactionDetailLines + */ + @JsonProperty("taxAmount", Number, true) + taxAmount?: number | undefined = undefined; + } \ No newline at end of file diff --git a/lib/models/CreditTransactionDetails.ts b/lib/models/CreditTransactionDetails.ts new file mode 100644 index 0000000..27650ed --- /dev/null +++ b/lib/models/CreditTransactionDetails.ts @@ -0,0 +1,64 @@ +/* + * AvaTax Software Development Kit for JavaScript + * + * (c) 2004-2022 Avalara, Inc. + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + * + * @author Jonathan Wenger + * @author Sachin Baijal + * @copyright 2004-2018 Avalara, Inc. + * @license https://www.apache.org/licenses/LICENSE-2.0 + * @link https://github.com/avadev/AvaTax-REST-V2-JS-SDK + */ + +import * as Enums from '../enums/index'; +import { CreditTransactionDetailLines } from "./CreditTransactionDetailLines"; +import { JsonObject, JsonProperty } from "json2typescript"; +import { DateConverter } from "../utils/dateConverter"; + +/** + * Credit Transaction Details + * @export + * @class CreditTransactionDetails + */ + @JsonObject("CreditTransactionDetails") + export class CreditTransactionDetails { + /** + * @type {string} + * @memberof CreditTransactionDetails + */ + @JsonProperty("docCode", String, true) + docCode?: string | undefined = undefined; + /** + * @type {Date} + * @memberof CreditTransactionDetails + */ + @JsonProperty("docDate", DateConverter, true) + docDate?: Date | undefined = undefined; + /** + * @type {number} + * @memberof CreditTransactionDetails + */ + @JsonProperty("totalExempt", Number, true) + totalExempt?: number | undefined = undefined; + /** + * @type {number} + * @memberof CreditTransactionDetails + */ + @JsonProperty("totalTaxable", Number, true) + totalTaxable?: number | undefined = undefined; + /** + * @type {number} + * @memberof CreditTransactionDetails + */ + @JsonProperty("totalTax", Number, true) + totalTax?: number | undefined = undefined; + /** + * @type {CreditTransactionDetailLines[]} + * @memberof CreditTransactionDetails + */ + @JsonProperty("lines", [CreditTransactionDetailLines], true) + lines?: CreditTransactionDetailLines[] | undefined = undefined; + } \ No newline at end of file diff --git a/lib/models/CustomerJobModel.ts b/lib/models/CustomerJobModel.ts index 745d685..8888ffe 100644 --- a/lib/models/CustomerJobModel.ts +++ b/lib/models/CustomerJobModel.ts @@ -18,7 +18,7 @@ import { JsonObject, JsonProperty } from "json2typescript"; import { DateConverter } from "../utils/dateConverter"; /** - * Customer job model. Exposed in url $includes + * Customer job model. This is exposed in the URL's `$includes`. * @export * @class CustomerJobModel */ diff --git a/lib/models/EventDeleteBatchMessageModel.ts b/lib/models/EventDeleteBatchMessageModel.ts new file mode 100644 index 0000000..997f114 --- /dev/null +++ b/lib/models/EventDeleteBatchMessageModel.ts @@ -0,0 +1,39 @@ +/* + * AvaTax Software Development Kit for JavaScript + * + * (c) 2004-2022 Avalara, Inc. + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + * + * @author Jonathan Wenger + * @author Sachin Baijal + * @copyright 2004-2018 Avalara, Inc. + * @license https://www.apache.org/licenses/LICENSE-2.0 + * @link https://github.com/avadev/AvaTax-REST-V2-JS-SDK + */ + +import * as Enums from '../enums/index'; +import { JsonObject, JsonProperty } from "json2typescript"; +import { DateConverter } from "../utils/dateConverter"; + +/** + * Model to delete message + * @export + * @class EventDeleteBatchMessageModel + */ + @JsonObject("EventDeleteBatchMessageModel") + export class EventDeleteBatchMessageModel { + /** + * @type {string} + * @memberof EventDeleteBatchMessageModel + */ + @JsonProperty("receiptHandle", String, true) + receiptHandle?: string | undefined = undefined; + /** + * @type {string} + * @memberof EventDeleteBatchMessageModel + */ + @JsonProperty("messageId", String, true) + messageId?: string | undefined = undefined; + } \ No newline at end of file diff --git a/lib/models/EventDeleteMessageModel.ts b/lib/models/EventDeleteMessageModel.ts new file mode 100644 index 0000000..7030710 --- /dev/null +++ b/lib/models/EventDeleteMessageModel.ts @@ -0,0 +1,34 @@ +/* + * AvaTax Software Development Kit for JavaScript + * + * (c) 2004-2022 Avalara, Inc. + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + * + * @author Jonathan Wenger + * @author Sachin Baijal + * @copyright 2004-2018 Avalara, Inc. + * @license https://www.apache.org/licenses/LICENSE-2.0 + * @link https://github.com/avadev/AvaTax-REST-V2-JS-SDK + */ + +import * as Enums from '../enums/index'; +import { EventDeleteBatchMessageModel } from "./EventDeleteBatchMessageModel"; +import { JsonObject, JsonProperty } from "json2typescript"; +import { DateConverter } from "../utils/dateConverter"; + +/** + * Encloses the delete message command. + * @export + * @class EventDeleteMessageModel + */ + @JsonObject("EventDeleteMessageModel") + export class EventDeleteMessageModel { + /** + * @type {EventDeleteBatchMessageModel[]} + * @memberof EventDeleteMessageModel + */ + @JsonProperty("eventDeleteBatchMessageCommands", [EventDeleteBatchMessageModel], true) + eventDeleteBatchMessageCommands?: EventDeleteBatchMessageModel[] | undefined = undefined; + } \ No newline at end of file diff --git a/lib/models/EventMessageResponse.ts b/lib/models/EventMessageResponse.ts new file mode 100644 index 0000000..6ea15be --- /dev/null +++ b/lib/models/EventMessageResponse.ts @@ -0,0 +1,45 @@ +/* + * AvaTax Software Development Kit for JavaScript + * + * (c) 2004-2022 Avalara, Inc. + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + * + * @author Jonathan Wenger + * @author Sachin Baijal + * @copyright 2004-2018 Avalara, Inc. + * @license https://www.apache.org/licenses/LICENSE-2.0 + * @link https://github.com/avadev/AvaTax-REST-V2-JS-SDK + */ + +import * as Enums from '../enums/index'; +import { JsonObject, JsonProperty } from "json2typescript"; +import { DateConverter } from "../utils/dateConverter"; + +/** + * Encloses event message details + * @export + * @class EventMessageResponse + */ + @JsonObject("EventMessageResponse") + export class EventMessageResponse { + /** + * @type {string} + * @memberof EventMessageResponse + */ + @JsonProperty("body", String, true) + body?: string | undefined = undefined; + /** + * @type {string} + * @memberof EventMessageResponse + */ + @JsonProperty("messageId", String, true) + messageId?: string | undefined = undefined; + /** + * @type {string} + * @memberof EventMessageResponse + */ + @JsonProperty("receiptHandle", String, true) + receiptHandle?: string | undefined = undefined; + } \ No newline at end of file diff --git a/lib/models/FilingCalendarModel.ts b/lib/models/FilingCalendarModel.ts index 239eee7..131e77d 100644 --- a/lib/models/FilingCalendarModel.ts +++ b/lib/models/FilingCalendarModel.ts @@ -410,4 +410,10 @@ Only used if you subscribe to Avalara Returns. */ @JsonProperty("autoLockOverrideDay", Number, true) autoLockOverrideDay?: number | undefined = undefined; + /** + * @type {string} + * @memberof FilingCalendarModel + */ + @JsonProperty("currency", String, true) + currency?: string | undefined = undefined; } \ No newline at end of file diff --git a/lib/models/FilingReturnCreditModel.ts b/lib/models/FilingReturnCreditModel.ts index ae14b53..88957ea 100644 --- a/lib/models/FilingReturnCreditModel.ts +++ b/lib/models/FilingReturnCreditModel.ts @@ -14,7 +14,7 @@ */ import * as Enums from '../enums/index'; -import { WorksheetDocument } from "./WorksheetDocument"; +import { CreditTransactionDetails } from "./CreditTransactionDetails"; import { JsonObject, JsonProperty } from "json2typescript"; import { DateConverter } from "../utils/dateConverter"; @@ -50,9 +50,9 @@ import { DateConverter } from "../utils/dateConverter"; @JsonProperty("totalTax", Number, true) totalTax?: number | undefined = undefined; /** - * @type {WorksheetDocument[]} + * @type {CreditTransactionDetails[]} * @memberof FilingReturnCreditModel */ - @JsonProperty("transactionDetails", [WorksheetDocument], true) - transactionDetails?: WorksheetDocument[] | undefined = undefined; + @JsonProperty("transactionDetails", [CreditTransactionDetails], true) + transactionDetails?: CreditTransactionDetails[] | undefined = undefined; } \ No newline at end of file diff --git a/lib/models/FilingReturnModel.ts b/lib/models/FilingReturnModel.ts index e027617..8cf1167 100644 --- a/lib/models/FilingReturnModel.ts +++ b/lib/models/FilingReturnModel.ts @@ -365,6 +365,18 @@ import { DateConverter } from "../utils/dateConverter"; */ @JsonProperty("appliedCarryOverCredits", FilingReturnCreditModel, true) appliedCarryOverCredits?: FilingReturnCreditModel | undefined = undefined; + /** + * @type {string} + * @memberof FilingReturnModel + */ + @JsonProperty("liabilityCurrencyCode", String, true) + liabilityCurrencyCode?: string | undefined = undefined; + /** + * @type {string} + * @memberof FilingReturnModel + */ + @JsonProperty("filingCalendarCurrencyCode", String, true) + filingCalendarCurrencyCode?: string | undefined = undefined; /** * @type {Date} * @memberof FilingReturnModel diff --git a/lib/models/FundingInitiateModel.ts b/lib/models/FundingInitiateModel.ts index 4a076b0..962b71b 100644 --- a/lib/models/FundingInitiateModel.ts +++ b/lib/models/FundingInitiateModel.ts @@ -42,4 +42,16 @@ import { DateConverter } from "../utils/dateConverter"; */ @JsonProperty("requestWidget", Boolean, true) requestWidget?: boolean | undefined = undefined; + /** + * @type {string} + * @memberof FundingInitiateModel + */ + @JsonProperty("currency", String, true) + currency?: string | undefined = undefined; + /** + * @type {string} + * @memberof FundingInitiateModel + */ + @JsonProperty("agreementType", String, true) + agreementType?: string | undefined = undefined; } \ No newline at end of file diff --git a/lib/models/HistoryModel.ts b/lib/models/HistoryModel.ts index 4e2537d..55c96a5 100644 --- a/lib/models/HistoryModel.ts +++ b/lib/models/HistoryModel.ts @@ -18,7 +18,7 @@ import { JsonObject, JsonProperty } from "json2typescript"; import { DateConverter } from "../utils/dateConverter"; /** - * Update history for Avalara.AvaTax.AccountServices.Models.v2.CustomerModel and Avalara.AvaTax.AccountServices.Models.v2.CertificateModel. Exposed in url $includes + * Update history for Avalara.AvaTax.AccountServices.Models.v2.CustomerModel and Avalara.AvaTax.AccountServices.Models.v2.CertificateModel. This is exposed in the URL's `$includes`. * @export * @class HistoryModel */ diff --git a/lib/models/MultiTaxFilingReturnModel.ts b/lib/models/MultiTaxFilingReturnModel.ts index b17046b..63183bf 100644 --- a/lib/models/MultiTaxFilingReturnModel.ts +++ b/lib/models/MultiTaxFilingReturnModel.ts @@ -121,6 +121,18 @@ import { DateConverter } from "../utils/dateConverter"; */ @JsonProperty("type", String, true) type?: string | undefined = undefined; + /** + * @type {string} + * @memberof MultiTaxFilingReturnModel + */ + @JsonProperty("liabilityCurrencyCode", String, true) + liabilityCurrencyCode?: string | undefined = undefined; + /** + * @type {string} + * @memberof MultiTaxFilingReturnModel + */ + @JsonProperty("filingCalendarCurrencyCode", String, true) + filingCalendarCurrencyCode?: string | undefined = undefined; /** * @type {FilingsTaxSummaryModel} * @memberof MultiTaxFilingReturnModel diff --git a/lib/models/index.ts b/lib/models/index.ts index 43fd8af..fe707bd 100644 --- a/lib/models/index.ts +++ b/lib/models/index.ts @@ -70,6 +70,12 @@ export * from './ClassificationParameterUsageMapModel'; export * from './CombinedHSTConfigModel'; export * from './CommitMultiDocumentModel'; export * from './CommitTransactionModel'; +export * from './CommunicationCertificateResponse'; +export * from './CommunicationCertificateResponsePage'; +export * from './CommunicationCustomerResponse'; +export * from './CommunicationExemptionDesignatorResponse'; +export * from './CommunicationLocationResponse'; +export * from './CommunicationTaxTypeResponse'; export * from './CommunicationsTSPairModel'; export * from './CommunicationsTransactionTypeModel'; export * from './CompanyAddress'; @@ -109,6 +115,8 @@ export * from './CreateOrAdjustTransactionModel'; export * from './CreateTransactionBatchRequestModel'; export * from './CreateTransactionBatchResponseModel'; export * from './CreateTransactionModel'; +export * from './CreditTransactionDetailLines'; +export * from './CreditTransactionDetails'; export * from './CurrencyModel'; export * from './CustomFieldModel'; export * from './CustomerAttributeModel'; @@ -142,6 +150,9 @@ export * from './ErrorCodeOutputModel'; export * from './ErrorDetail'; export * from './ErrorTransactionModelBase'; export * from './ErrorTransactionOutputModel'; +export * from './EventDeleteBatchMessageModel'; +export * from './EventDeleteMessageModel'; +export * from './EventMessageResponse'; export * from './ExemptionReasonModel'; export * from './ExemptionStatusModel'; export * from './ExportDocumentLineModel'; @@ -236,7 +247,6 @@ export * from './LoginVerificationInputModel'; export * from './LoginVerificationOutputModel'; export * from './MarketplaceLocationModel'; export * from './MarketplaceModel'; -export * from './Message'; export * from './MrsCompanyModel'; export * from './MultiDocumentLineItemModel'; export * from './MultiDocumentModel'; @@ -375,8 +385,6 @@ export * from './VarianceUnit'; export * from './VerifyMultiDocumentModel'; export * from './VerifyTransactionModel'; export * from './VoidTransactionModel'; -export * from './WorksheetDocument'; -export * from './WorksheetDocumentLine'; export * from './requiredFilingCalendarDataFieldModel'; export * from './ShippingVerifyResult'; export * from './GetBatchesResult'; diff --git a/package.json b/package.json index a131065..547f186 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "avatax", - "version": "24.6.4", + "version": "24.8.2", "description": "AvaTax v2 SDK for languages using JavaScript", "main": "index.js", "types": "index.d.ts",