avatax 20.7.1 → 21.3.1

Sign up to get free protection for your applications and to get access to all the features.
@@ -18,7 +18,7 @@ module AvaTax
18
18
  #
19
19
  # ### Security Policies
20
20
  #
21
- # * This API depends on the following active services<br />*Required* (all): AvaTaxGlobal.
21
+ # * This API depends on the following active services:*Required* (all): AvaTaxGlobal.
22
22
  # @param country [String] The name or code of the destination country.
23
23
  # @param hsCode [String] The partial or full HS Code for which you would like to view all of the parents.
24
24
  # @return [FetchResult]
@@ -186,7 +186,7 @@ module AvaTax
186
186
  #
187
187
  # ### Security Policies
188
188
  #
189
- # * This API depends on the following active services<br />*Required* (all): AvaTaxGlobal.
189
+ # * This API depends on the following active services:*Required* (all): AvaTaxGlobal.
190
190
  # @param country [String] The name or code of the destination country.
191
191
  # @param hsCode [String] 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.
192
192
  # @param filter [String] A filter statement to identify specific records to retrieve. For more information on filtering, see [Filtering in REST](http://developer.avalara.com/avatax/filtering-in-rest/).<br />*Not filterable:* hsCodeSource, system, destinationCountry, isDecisionNode, zeroPaddingCount, isSystemDefined, isTaxable, effDate, endDate, hsCodeSourceLength
@@ -208,7 +208,7 @@ module AvaTax
208
208
  #
209
209
  # ### Security Policies
210
210
  #
211
- # * This API depends on the following active services<br />*Required* (all): AvaTaxGlobal.
211
+ # * This API depends on the following active services:*Required* (all): AvaTaxGlobal.
212
212
  # @return [FetchResult]
213
213
  def list_cross_border_sections() path = "/api/v2/definitions/crossborder/sections"
214
214
  get(path) end
@@ -259,7 +259,7 @@ module AvaTax
259
259
  # Returns a list of all Avalara-supported taxing jurisdictions.
260
260
  #
261
261
  # This API allows you to examine all Avalara-supported jurisdictions. You can filter your search by supplying
262
- # SQL-like query for fetching only the ones you concerned about. For example: effectiveDate &gt; '2016-01-01'
262
+ # SQL-like query for fetching only the ones you concerned about. For example: effectiveDate > '2016-01-01'
263
263
  #
264
264
  # The rate, salesRate, and useRate fields are not available on the JurisdictionModels returned by this API.
265
265
  # @param filter [String] A filter statement to identify specific records to retrieve. For more information on filtering, see [Filtering in REST](http://developer.avalara.com/avatax/filtering-in-rest/).<br />*Not filterable:* rate, salesRate, signatureCode, useRate
@@ -348,7 +348,7 @@ module AvaTax
348
348
  # Returns the full list of all Avalara-supported nexus for all countries and regions.
349
349
  #
350
350
  # This API is intended to be useful if your user interface needs to display a selectable list of nexus.
351
- # @param filter [String] A filter statement to identify specific records to retrieve. For more information on filtering, see [Filtering in REST](http://developer.avalara.com/avatax/filtering-in-rest/).<br />*Not filterable:* streamlinedSalesTax, isSSTActive, taxAuthorityId, taxName, parameters
351
+ # @param filter [String] A filter statement to identify specific records to retrieve. For more information on filtering, see [Filtering in REST](http://developer.avalara.com/avatax/filtering-in-rest/).<br />*Not filterable:* streamlinedSalesTax, isSSTActive, taxAuthorityId, taxName, parameters, taxableNexus
352
352
  # @param top [Integer] If nonzero, return no more than this number of results. Used with `$skip` to provide pagination for large datasets. Unless otherwise specified, the maximum number of records that can be returned from an API call is 1,000 records.
353
353
  # @param skip [Integer] If nonzero, skip this number of results before returning data. Used with `$top` to provide pagination for large datasets.
354
354
  # @param orderBy [String] A comma separated list of sort statements in the format `(fieldname) [ASC|DESC]`, for example `id ASC`.
@@ -370,7 +370,7 @@ module AvaTax
370
370
  # @param region [String] Name or ISO 3166 code identifying the region portion of the address. This field supports many different region identifiers: * Two and three character ISO 3166 region codes * Fully spelled out names of the region in ISO supported languages * Common alternative spellings for many regions For a full list of all supported codes and names, please see the Definitions API `ListRegions`.
371
371
  # @param postalCode [String] The postal code or zip code portion of this address.
372
372
  # @param country [String] Name or ISO 3166 code identifying the country portion of this address. This field supports many different country identifiers: * Two character ISO 3166 codes * Three character ISO 3166 codes * Fully spelled out names of the country in ISO supported languages * Common alternative spellings for many countries For a full list of all supported codes and names, please see the Definitions API `ListCountries`.
373
- # @param filter [String] A filter statement to identify specific records to retrieve. For more information on filtering, see [Filtering in REST](http://developer.avalara.com/avatax/filtering-in-rest/).<br />*Not filterable:* streamlinedSalesTax, isSSTActive, taxAuthorityId, taxName, parameters
373
+ # @param filter [String] A filter statement to identify specific records to retrieve. For more information on filtering, see [Filtering in REST](http://developer.avalara.com/avatax/filtering-in-rest/).<br />*Not filterable:* streamlinedSalesTax, isSSTActive, taxAuthorityId, taxName, parameters, taxableNexus
374
374
  # @param top [Integer] If nonzero, return no more than this number of results. Used with `$skip` to provide pagination for large datasets. Unless otherwise specified, the maximum number of records that can be returned from an API call is 1,000 records.
375
375
  # @param skip [Integer] If nonzero, skip this number of results before returning data. Used with `$top` to provide pagination for large datasets.
376
376
  # @param orderBy [String] A comma separated list of sort statements in the format `(fieldname) [ASC|DESC]`, for example `id ASC`.
@@ -384,7 +384,7 @@ module AvaTax
384
384
  #
385
385
  # This API is intended to be useful if your user interface needs to display a selectable list of nexus filtered by country.
386
386
  # @param country [String] The country in which you want to fetch the system nexus
387
- # @param filter [String] A filter statement to identify specific records to retrieve. For more information on filtering, see [Filtering in REST](http://developer.avalara.com/avatax/filtering-in-rest/).<br />*Not filterable:* streamlinedSalesTax, isSSTActive, taxAuthorityId, taxName, parameters
387
+ # @param filter [String] A filter statement to identify specific records to retrieve. For more information on filtering, see [Filtering in REST](http://developer.avalara.com/avatax/filtering-in-rest/).<br />*Not filterable:* streamlinedSalesTax, isSSTActive, taxAuthorityId, taxName, parameters, taxableNexus
388
388
  # @param top [Integer] If nonzero, return no more than this number of results. Used with `$skip` to provide pagination for large datasets. Unless otherwise specified, the maximum number of records that can be returned from an API call is 1,000 records.
389
389
  # @param skip [Integer] If nonzero, skip this number of results before returning data. Used with `$top` to provide pagination for large datasets.
390
390
  # @param orderBy [String] A comma separated list of sort statements in the format `(fieldname) [ASC|DESC]`, for example `id ASC`.
@@ -399,7 +399,7 @@ module AvaTax
399
399
  # This API is intended to be useful if your user interface needs to display a selectable list of nexus filtered by country and region.
400
400
  # @param country [String] The two-character ISO-3166 code for the country.
401
401
  # @param region [String] The two or three character region code for the region.
402
- # @param filter [String] A filter statement to identify specific records to retrieve. For more information on filtering, see [Filtering in REST](http://developer.avalara.com/avatax/filtering-in-rest/).<br />*Not filterable:* streamlinedSalesTax, isSSTActive, taxAuthorityId, taxName, parameters
402
+ # @param filter [String] A filter statement to identify specific records to retrieve. For more information on filtering, see [Filtering in REST](http://developer.avalara.com/avatax/filtering-in-rest/).<br />*Not filterable:* streamlinedSalesTax, isSSTActive, taxAuthorityId, taxName, parameters, taxableNexus
403
403
  # @param top [Integer] If nonzero, return no more than this number of results. Used with `$skip` to provide pagination for large datasets. Unless otherwise specified, the maximum number of records that can be returned from an API call is 1,000 records.
404
404
  # @param skip [Integer] If nonzero, skip this number of results before returning data. Used with `$top` to provide pagination for large datasets.
405
405
  # @param orderBy [String] A comma separated list of sort statements in the format `(fieldname) [ASC|DESC]`, for example `id ASC`.
@@ -1,17 +1,6 @@
1
1
  module AvaTax
2
2
  class Client
3
- module ECMS
4
-
5
-
6
- # Bridge API for integration of validated certificates
7
- #
8
- # This API is for use by invitation only.
9
- # @param model [EcmsModel[]] Either a single exempt certificate or an array of certificates to create
10
- # @return [EcmsModel[]]
11
- def cert_capture_bridge(model)
12
- path = "/api/v2/certcapturebridge"
13
- post(path, model)
14
- end
3
+ module Ecms
15
4
 
16
5
 
17
6
  # Get an ECMS identified by company id and ECMS id
@@ -22,15 +11,17 @@ module AvaTax
22
11
  # 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:
23
12
  #
24
13
  # * Details
14
+ #
15
+ # ### Security Policies
16
+ #
17
+ # * This API requires one of the following user roles: AccountAdmin, AccountUser, CompanyAdmin, CompanyUser, CSPAdmin, CSPTester, SiteAdmin, SSTAdmin, SystemAdmin, TechnicalSupportAdmin, TechnicalSupportUser.
18
+ # * This API depends on the following active services<br />*Required* (all): AvaCert.
25
19
  # @param companyId [Integer] company to retrieve exempt certificate for
26
20
  # @param ecmsId [Integer] exempt certificate Id
27
21
  # @param include [String]
28
22
  # @return [Object]
29
- def get_e_c_m_s_by_id(companyId, ecmsId, options={})
30
- path = "/api/v2/companies/#{companyId}/ecms/#{ecmsId}"
31
- get(path, options)
32
- end
33
-
23
+ def get_e_c_m_s_by_id(companyId, ecmsId, options={}) path = "/api/v2/companies/#{companyId}/ecms/#{ecmsId}"
24
+ get(path, options) end
34
25
 
35
26
  # Get list of ECMS data for this company
36
27
  #
@@ -40,18 +31,20 @@ module AvaTax
40
31
  # 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:
41
32
  #
42
33
  # * Details
34
+ #
35
+ # ### Security Policies
36
+ #
37
+ # * This API requires one of the following user roles: AccountAdmin, AccountUser, CompanyAdmin, CompanyUser, CSPAdmin, CSPTester, SiteAdmin, SSTAdmin, SystemAdmin, TechnicalSupportAdmin, TechnicalSupportUser.
38
+ # * This API depends on the following active services<br />*Required* (all): AvaCert.
43
39
  # @param companyId [Integer] which company to retrieve certificates from
44
- # @param filter [String] A filter statement to identify specific records to retrieve. For more information on filtering, see [Filtering in REST](http://developer.avalara.com/avatax/filtering-in-rest/).
40
+ # @param filter [String] A filter statement to identify specific records to retrieve. For more information on filtering, see [Filtering in REST](http://developer.avalara.com/avatax/filtering-in-rest/).<br />*Not filterable:* details
45
41
  # @param include [String]
46
42
  # @param top [Integer] If nonzero, return no more than this number of results. Used with `$skip` to provide pagination for large datasets. Unless otherwise specified, the maximum number of records that can be returned from an API call is 1,000 records.
47
43
  # @param skip [Integer] If nonzero, skip this number of results before returning data. Used with `$top` to provide pagination for large datasets.
48
44
  # @param orderBy [String] A comma separated list of sort statements in the format `(fieldname) [ASC|DESC]`, for example `id ASC`.
49
- # @return [EcmsModel[]]
50
- def list_e_c_m_s_by_company(companyId, options={})
51
- path = "/api/v2/companies/#{companyId}/ecms"
52
- get(path, options)
53
- end
54
-
45
+ # @return [FetchResult]
46
+ def list_e_c_m_s_by_company(companyId, options={}) path = "/api/v2/companies/#{companyId}/ecms"
47
+ get(path, options) end
55
48
 
56
49
  # Get all exempt certificates
57
50
  #
@@ -63,17 +56,19 @@ module AvaTax
63
56
  # 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:
64
57
  #
65
58
  # * Details
66
- # @param filter [String] A filter statement to identify specific records to retrieve. For more information on filtering, see [Filtering in REST](http://developer.avalara.com/avatax/filtering-in-rest/).
59
+ #
60
+ # ### Security Policies
61
+ #
62
+ # * This API requires one of the following user roles: AccountAdmin, AccountUser, CompanyAdmin, CompanyUser, CSPAdmin, CSPTester, SiteAdmin, SSTAdmin, SystemAdmin, TechnicalSupportAdmin, TechnicalSupportUser.
63
+ # * This API depends on the following active services<br />*Required* (all): AvaCert.
64
+ # @param filter [String] A filter statement to identify specific records to retrieve. For more information on filtering, see [Filtering in REST](http://developer.avalara.com/avatax/filtering-in-rest/).<br />*Not filterable:* details
67
65
  # @param include [String]
68
66
  # @param top [Integer] If nonzero, return no more than this number of results. Used with `$skip` to provide pagination for large datasets. Unless otherwise specified, the maximum number of records that can be returned from an API call is 1,000 records.
69
67
  # @param skip [Integer] If nonzero, skip this number of results before returning data. Used with `$top` to provide pagination for large datasets.
70
68
  # @param orderBy [String] A comma separated list of sort statements in the format `(fieldname) [ASC|DESC]`, for example `id ASC`.
71
- # @return [EcmsModel[]]
72
- def query_e_c_m_s(options={})
73
- path = "/api/v2/ecms"
74
- get(path, options)
75
- end
76
-
69
+ # @return [FetchResult]
70
+ def query_e_c_m_s(options={}) path = "/api/v2/ecms"
71
+ get(path, options) end
77
72
  end
78
73
  end
79
74
  end
@@ -0,0 +1,37 @@
1
+ module AvaTax
2
+ class Client
3
+ module ECommerceToken
4
+
5
+
6
+ # Create a new eCommerce token.
7
+ #
8
+ # Creates a new eCommerce token.
9
+ #
10
+ # 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.
11
+ #
12
+ # ### Security Policies
13
+ #
14
+ # * This API requires one of the following user roles: AccountAdmin, AccountOperator, AccountUser, CompanyAdmin, CompanyUser, Compliance Root User, ComplianceAdmin, ComplianceUser, CSPAdmin, CSPTester, FirmAdmin, FirmUser, ProStoresOperator, Registrar, SiteAdmin, SSTAdmin, SystemAdmin, TechnicalSupportAdmin, TechnicalSupportUser, TreasuryAdmin, TreasuryUser.
15
+ # @param companyId [Integer] The company ID that will be issued this certificate.
16
+ # @param model [Object]
17
+ # @return [Object]
18
+ def create_e_commerce_token(companyId, model) path = "/api/v2/companies/#{companyId}/ecommercetokens"
19
+ post(path, model) end
20
+
21
+ # Refresh an eCommerce token.
22
+ #
23
+ # Refresh an eCommerce token.
24
+ #
25
+ # 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.
26
+ #
27
+ # ### Security Policies
28
+ #
29
+ # * This API requires one of the following user roles: AccountAdmin, AccountOperator, AccountUser, CompanyAdmin, CompanyUser, Compliance Root User, ComplianceAdmin, ComplianceUser, CSPAdmin, CSPTester, FirmAdmin, FirmUser, ProStoresOperator, Registrar, SiteAdmin, SSTAdmin, SystemAdmin, TechnicalSupportAdmin, TechnicalSupportUser, TreasuryAdmin, TreasuryUser.
30
+ # @param companyId [Integer] The company ID that the refreshed certificate belongs to.
31
+ # @param model [Object]
32
+ # @return [FetchResult]
33
+ def refresh_e_commerce_token(companyId, model) path = "/api/v2/companies/#{companyId}/ecommercetokens"
34
+ put(path, model) end
35
+ end
36
+ end
37
+ end
@@ -12,20 +12,35 @@ module AvaTax
12
12
  # ### Security Policies
13
13
  #
14
14
  # * This API requires one of the following user roles: AccountAdmin, AccountUser, CompanyAdmin, CompanyUser, CSPAdmin, CSPTester, ProStoresOperator, SiteAdmin, SSTAdmin, SystemAdmin, TechnicalSupportAdmin, TechnicalSupportUser.
15
- # * This API depends on the following active services<br />*Required* (all): AvaTaxPro.
15
+ # * This API depends on the following active services<br />*Required* (all): AvaTaxPro, BasicReturns.
16
+ # @param companyId [Integer] ID number of the company to delete error transactions from.
16
17
  # @param model [Object] The request that contains error transactions to be deleted
17
18
  # @return [Object]
18
- def delete_error_transactions(model)
19
- path = "/api/v2/errortransactions"
20
- delete(path, model)
21
- end
19
+ def delete_error_transactions(companyId, model) path = "/api/v2/companies/#{companyId}/errortransactions"
20
+ delete(path, model) end
22
21
 
22
+ # Get a list of error transactions' error codes and its counts
23
+ #
24
+ # Get a list of error transactions' error codes and their counts
25
+ # When you try to create or adjust a transaction with a datasource for a company and for any reason that call fails with an error,
26
+ # those errors with their count can be retrieved by this API.
27
+ #
28
+ # ### Security Policies
29
+ #
30
+ # * This API requires one of the following user roles: AccountAdmin, AccountUser, CompanyAdmin, CompanyUser, CSPAdmin, CSPTester, ProStoresOperator, SiteAdmin, SSTAdmin, SystemAdmin, TechnicalSupportAdmin, TechnicalSupportUser.
31
+ # * This API depends on the following active services<br />*Required* (all): AvaTaxPro, BasicReturns.
32
+ # @param companyId [Integer] ID number of the company to query from.
33
+ # @param top [Integer] If nonzero, return no more than this number of results. Used with `$skip` to provide pagination for large datasets. Unless otherwise specified, the maximum number of records that can be returned from an API call is 1,000 records.
34
+ # @param skip [Integer] If nonzero, skip this number of results before returning data. Used with `$top` to provide pagination for large datasets.
35
+ # @return [CappedFetchResult]
36
+ def list_error_codes(companyId, options={}) path = "/api/v2/companies/#{companyId}/errortransactions/errorcodes"
37
+ get(path, options) end
23
38
 
24
39
  # Retrieve list of error transactions
25
40
  #
26
41
  # List error transactions attached to this company. Results are dependent on `$filter` if provided.
27
42
  #
28
- # This endpoint is limited to returning 250 error transactions at a time maximum.
43
+ # This endpoint is limited to returning 1000 error transactions at a time maximum.
29
44
  #
30
45
  # 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/) .
31
46
  # Paginate your results using the `$top`, `$skip`, and `$orderby` parameters.
@@ -33,18 +48,15 @@ module AvaTax
33
48
  # ### Security Policies
34
49
  #
35
50
  # * This API requires one of the following user roles: AccountAdmin, AccountUser, CompanyAdmin, CompanyUser, CSPAdmin, CSPTester, ProStoresOperator, SiteAdmin, SSTAdmin, SystemAdmin, TechnicalSupportAdmin, TechnicalSupportUser.
36
- # * This API depends on the following active services<br />*Required* (all): AvaTaxPro.
37
- # @param companyCode [String] The company code to filter on. This query parameter is required.
38
- # @param filter [String] A filter statement to identify specific records to retrieve. For more information on filtering, see [Filtering in REST](http://developer.avalara.com/avatax/filtering-in-rest/).<br />*Not filterable:* companyId, avataxErrorJson, avataxCreateTransactionJson
51
+ # * This API depends on the following active services<br />*Required* (all): AvaTaxPro, BasicReturns.
52
+ # @param companyId [Integer] The company ID to filter error transactions on.
53
+ # @param filter [String] A filter statement to identify specific records to retrieve. For more information on filtering, see [Filtering in REST](http://developer.avalara.com/avatax/filtering-in-rest/).<br />*Not filterable:* companyId, avataxErrorJson, avataxCreateTransactionJson, expiresAt
39
54
  # @param top [Integer] If nonzero, return no more than this number of results. Used with `$skip` to provide pagination for large datasets. Unless otherwise specified, the maximum number of records that can be returned from an API call is 1,000 records.
40
55
  # @param skip [Integer] If nonzero, skip this number of results before returning data. Used with `$top` to provide pagination for large datasets.
41
56
  # @param orderBy [String] A comma separated list of sort statements in the format `(fieldname) [ASC|DESC]`, for example `id ASC`.
42
- # @return [FetchResult]
43
- def list_error_transactions(options={})
44
- path = "/api/v2/errortransactions"
45
- get(path, options)
46
- end
47
-
57
+ # @return [CappedFetchResult]
58
+ def list_error_transactions(companyId, options={}) path = "/api/v2/companies/#{companyId}/errortransactions"
59
+ get(path, options) end
48
60
  end
49
61
  end
50
62
  end
@@ -3,6 +3,21 @@ module AvaTax
3
3
  module FilingCalendars
4
4
 
5
5
 
6
+ # Add or Edit options
7
+ #
8
+ # Returns a list of options for adding tax forms for the company and tax form code specified.
9
+ # Returns edit options when modifying a filing calendar.
10
+ # This API is available by invitation only.
11
+ #
12
+ # ### Security Policies
13
+ #
14
+ # * 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.
15
+ # @param companyId [Integer] The unique ID of the company that owns the filing calendar object
16
+ # @param model [Object] Cycle Safe Options Request
17
+ # @return [Object]
18
+ def cycle_safe_options(companyId, model) path = "/api/v2/companies/#{companyId}/filingcalendars/edit/cycleSafeOptions"
19
+ post(path, model) end
20
+
6
21
  # Delete a company return setting
7
22
  #
8
23
  # This API is available by invitation only and only available for users with Compliance access
@@ -3,13 +3,24 @@ module AvaTax
3
3
  module Filings
4
4
 
5
5
 
6
+ # Retrieve a filing containing the return and all its accrual returns.
7
+ #
8
+ # ### Security Policies
9
+ #
10
+ # * This API requires one of the following user roles: AccountAdmin, CompanyAdmin, Compliance Root User, ComplianceAdmin, ComplianceUser, CSPTester, FirmAdmin, FirmUser, SSTAdmin, TechnicalSupportAdmin, TechnicalSupportUser, TreasuryAdmin, TreasuryUser.
11
+ # @param companyId [Integer] The ID of the company that owns these returns
12
+ # @param filingReturnId [Integer] The ID of the filing return
13
+ # @return [FetchResult]
14
+ def get_accrual_filings(companyId, filingReturnId) path = "/api/v2/companies/#{companyId}/filings/accrual/#{filingReturnId}"
15
+ get(path) end
16
+
6
17
  # Retrieve a list of filed returns for the specified company in the year and month of a given filing period.
7
18
  #
8
19
  # ### Security Policies
9
20
  #
10
21
  # * This API requires one of the following user roles: AccountAdmin, AccountOperator, AccountUser, CompanyAdmin, CompanyUser, Compliance Root User, ComplianceAdmin, ComplianceUser, CSPAdmin, CSPTester, FirmAdmin, FirmUser, ProStoresOperator, Registrar, SiteAdmin, SSTAdmin, SystemAdmin, TechnicalSupportAdmin, TechnicalSupportUser, TreasuryAdmin, TreasuryUser.
11
- # * This API is available by invitation only.<br />*Exempt security roles*: ComplianceRootUser, ComplianceAdmin, ComplianceUser, TechnicalSupportAdmin, TechnicalSupportUser, CompanyUser, AccountUser, CompanyAdmin, AccountAdmin.
12
- # * This API depends on the following active services<br />*Returns* (at least one of): Mrs, MRSComplianceManager, AvaTaxCsp.<br />*Firm Managed* (for accounts managed by a firm): ARA, ARAManaged.
22
+ # * This API is available by invitation only.*Exempt security roles*: ComplianceRootUser, ComplianceAdmin, ComplianceUser, TechnicalSupportAdmin, TechnicalSupportUser, CompanyUser, AccountUser, CompanyAdmin, AccountAdmin.
23
+ # * 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.
13
24
  # @param companyId [Integer] The ID of the company that owns these batches
14
25
  # @param endPeriodMonth [Integer] The month of the period you are trying to retrieve
15
26
  # @param endPeriodYear [Integer] The year of the period you are trying to retrieve
@@ -23,79 +23,6 @@ module AvaTax
23
23
  # @return [Object]
24
24
  def request_free_trial(model) path = "/api/v2/accounts/freetrials/request"
25
25
  post(path, model) end
26
-
27
- # FREE API - Sales tax rates for a specified address
28
- #
29
- # # Free-To-Use
30
- #
31
- # The TaxRates API is a free-to-use, no cost option for estimating sales tax rates.
32
- # Any customer can request a free AvaTax account and make use of the TaxRates API.
33
- #
34
- # Usage of this API is subject to rate limits. Users who exceed the rate limit will receive HTTP
35
- # response code 429 - `Too Many Requests`.
36
- #
37
- # This API assumes that you are selling general tangible personal property at a retail point-of-sale
38
- # location in the United States only.
39
- #
40
- # For more powerful tax calculation, please consider upgrading to the `CreateTransaction` API,
41
- # which supports features including, but not limited to:
42
- #
43
- # * Nexus declarations
44
- # * Taxability based on product/service type
45
- # * Sourcing rules affecting origin/destination states
46
- # * Customers who are exempt from certain taxes
47
- # * States that have dollar value thresholds for tax amounts
48
- # * Refunds for products purchased on a different date
49
- # * Detailed jurisdiction names and state assigned codes
50
- # * And more!
51
- #
52
- # Please see [Estimating Tax with REST v2](http://developer.avalara.com/blog/2016/11/04/estimating-tax-with-rest-v2/)
53
- # for information on how to upgrade to the full AvaTax CreateTransaction API.
54
- # @param line1 [String] The street address of the location.
55
- # @param line2 [String] The street address of the location.
56
- # @param line3 [String] The street address of the location.
57
- # @param city [String] The city name of the location.
58
- # @param region [String] 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`.
59
- # @param postalCode [String] The postal code of the location.
60
- # @param country [String] 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`.
61
- # @return [Object]
62
- def tax_rates_by_address(options={}) path = "/api/v2/taxrates/byaddress"
63
- get(path, options) end
64
-
65
- # FREE API - Sales tax rates for a specified country and postal code. This API is only available for US postal codes.
66
- #
67
- # # Free-To-Use
68
- #
69
- # This API is only available for a US postal codes.
70
- #
71
- # The TaxRates API is a free-to-use, no cost option for estimating sales tax rates.
72
- # Any customer can request a free AvaTax account and make use of the TaxRates API.
73
- #
74
- # Usage of this API is subject to rate limits. Users who exceed the rate limit will receive HTTP
75
- # response code 429 - `Too Many Requests`.
76
- #
77
- # This API assumes that you are selling general tangible personal property at a retail point-of-sale
78
- # location in the United States only.
79
- #
80
- # For more powerful tax calculation, please consider upgrading to the `CreateTransaction` API,
81
- # which supports features including, but not limited to:
82
- #
83
- # * Nexus declarations
84
- # * Taxability based on product/service type
85
- # * Sourcing rules affecting origin/destination states
86
- # * Customers who are exempt from certain taxes
87
- # * States that have dollar value thresholds for tax amounts
88
- # * Refunds for products purchased on a different date
89
- # * Detailed jurisdiction names and state assigned codes
90
- # * And more!
91
- #
92
- # Please see [Estimating Tax with REST v2](http://developer.avalara.com/blog/2016/11/04/estimating-tax-with-rest-v2/)
93
- # for information on how to upgrade to the full AvaTax CreateTransaction API.
94
- # @param country [String] 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`.
95
- # @param postalCode [String] The postal code of the location.
96
- # @return [Object]
97
- def tax_rates_by_postal_code(options={}) path = "/api/v2/taxrates/bypostalcode"
98
- get(path, options) end
99
26
  end
100
27
  end
101
28
  end
@@ -21,7 +21,7 @@ module AvaTax
21
21
  # ### Security Policies
22
22
  #
23
23
  # * This API requires one of the following user roles: AccountAdmin, AccountOperator, AccountUser, CompanyAdmin, CompanyUser, Compliance Root User, ComplianceAdmin, ComplianceUser, CSPAdmin, CSPTester, FirmAdmin, FirmUser, ProStoresOperator, Registrar, SiteAdmin, SSTAdmin, SystemAdmin, TechnicalSupportAdmin, TechnicalSupportUser, TreasuryAdmin, TreasuryUser.
24
- # * This API depends on the following active services<br />*Returns* (at least one of): Mrs, MRSComplianceManager, AvaTaxCsp.<br />*Firm Managed* (for accounts managed by a firm): ARA, ARAManaged.
24
+ # * 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.
25
25
  # @param id [Integer] The unique ID number of this funding request
26
26
  # @return [Object]
27
27
  def activate_funding_request(id) path = "/api/v2/fundingrequests/#{id}/widget"
@@ -43,7 +43,7 @@ module AvaTax
43
43
  # ### Security Policies
44
44
  #
45
45
  # * This API requires one of the following user roles: AccountAdmin, CompanyAdmin, CSPTester, FirmAdmin, Registrar, SiteAdmin, SSTAdmin, SystemAdmin, TechnicalSupportAdmin.
46
- # * This API depends on the following active services<br />*Returns* (at least one of): Mrs, MRSComplianceManager, AvaTaxCsp.<br />*Firm Managed* (for accounts managed by a firm): ARA, ARAManaged.
46
+ # * 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.
47
47
  # @param id [Integer] The unique ID number of this funding request
48
48
  # @return [Object]
49
49
  def funding_request_status(id) path = "/api/v2/fundingrequests/#{id}"
@@ -3,6 +3,30 @@ module AvaTax
3
3
  module Locations
4
4
 
5
5
 
6
+ # Add parameters to a location.
7
+ #
8
+ # Add parameters to a location.
9
+ #
10
+ # Some locations can be taxed differently depending on the properties of that location. In AvaTax, these tax-affecting properties are called "parameters".
11
+ #
12
+ # A parameter added to a location will be used by default in tax calculation but will not show on the transaction line referencing the location.
13
+ #
14
+ # A parameter specified on a transaction line will override a location parameter if they share the same parameter name.
15
+ #
16
+ # To see available parameters for this location, call `/api/v2/definitions/parameters?$filter=attributeType eq Company`
17
+ #
18
+ # Some parameters are only available for use if you have subscribed to specific AvaTax services. To see which parameters you are able to use, add the query parameter "$showSubscribed=true" to the parameter definition call above.
19
+ #
20
+ # ### Security Policies
21
+ #
22
+ # * This API requires one of the following user roles: AccountAdmin, CompanyAdmin, CSPAdmin, CSPTester, FirmAdmin, SiteAdmin, SSTAdmin, SystemAdmin, TechnicalSupportAdmin.
23
+ # @param companyId [Integer] The ID of the company that owns this location parameter.
24
+ # @param locationId [Integer] The location id.
25
+ # @param model [LocationParameterModel[]] The location parameters you wish to create.
26
+ # @return [LocationParameterModel[]]
27
+ def create_location_parameters(companyId, locationId, model) path = "/api/v2/companies/#{companyId}/locations/#{locationId}/parameters"
28
+ post(path, model) end
29
+
6
30
  # Create a new location
7
31
  #
8
32
  # Create one or more new location objects attached to this company.
@@ -29,6 +53,26 @@ module AvaTax
29
53
  def delete_location(companyId, id) path = "/api/v2/companies/#{companyId}/locations/#{id}"
30
54
  delete(path) end
31
55
 
56
+ # Delete a single location parameter
57
+ #
58
+ # Delete a single location parameter.
59
+ #
60
+ # Some locations can be taxed differently depending on the properties of that location. In AvaTax, these tax-affecting properties are called "parameters".
61
+ #
62
+ # A parameter added to a location will be used by default in tax calculation but will not show on the transaction line referencing the location.
63
+ #
64
+ # A parameter specified on a transaction line will override a location parameter if they share the same parameter name.
65
+ #
66
+ # ### Security Policies
67
+ #
68
+ # * This API requires one of the following user roles: AccountAdmin, CompanyAdmin, CSPAdmin, CSPTester, FirmAdmin, SiteAdmin, SSTAdmin, SystemAdmin, TechnicalSupportAdmin.
69
+ # @param companyId [Integer] The company id
70
+ # @param locationId [Integer] The location id
71
+ # @param id [Integer] The parameter id
72
+ # @return [ErrorDetail[]]
73
+ def delete_location_parameter(companyId, locationId, id) path = "/api/v2/companies/#{companyId}/locations/#{locationId}/parameters/#{id}"
74
+ delete(path) end
75
+
32
76
  # Retrieve a single location
33
77
  #
34
78
  # Get the location object identified by this URL.
@@ -44,7 +88,7 @@ module AvaTax
44
88
  #
45
89
  # ### Security Policies
46
90
  #
47
- # * This API requires one of the following user roles: AccountAdmin, AccountUser, CompanyAdmin, CompanyUser, CSPAdmin, CSPTester, FirmAdmin, SiteAdmin, SSTAdmin, SystemAdmin, TechnicalSupportAdmin, TechnicalSupportUser, TreasuryAdmin, TreasuryUser.
91
+ # * This API requires one of the following user roles: AccountAdmin, AccountUser, CompanyAdmin, CompanyUser, CSPAdmin, CSPTester, FirmAdmin, FirmUser, SiteAdmin, SSTAdmin, SystemAdmin, TechnicalSupportAdmin, TechnicalSupportUser, TreasuryAdmin, TreasuryUser.
48
92
  # @param companyId [Integer] The ID of the company that owns this location
49
93
  # @param id [Integer] The primary key of this location
50
94
  # @param include [String] A comma separated list of additional data to retrieve.
@@ -52,6 +96,52 @@ module AvaTax
52
96
  def get_location(companyId, id, options={}) path = "/api/v2/companies/#{companyId}/locations/#{id}"
53
97
  get(path, options) end
54
98
 
99
+ # Retrieve a single company location parameter
100
+ #
101
+ # Retrieve a single location parameter.
102
+ #
103
+ # Some locations can be taxed differently depending on the properties of that location. In AvaTax, these tax-affecting properties are called "parameters".
104
+ #
105
+ # A parameter added to a location will be used by default in tax calculation but will not show on the transaction line referencing the location.
106
+ #
107
+ # A parameter specified on a transaction line will override a location parameter if they share the same parameter name.
108
+ #
109
+ # ### Security Policies
110
+ #
111
+ # * This API requires one of the following user roles: AccountAdmin, AccountUser, CompanyAdmin, CompanyUser, CSPAdmin, CSPTester, FirmAdmin, FirmUser, SiteAdmin, SSTAdmin, SystemAdmin, TechnicalSupportAdmin, TechnicalSupportUser, TreasuryAdmin, TreasuryUser.
112
+ # @param companyId [Integer] The company id
113
+ # @param locationId [Integer] The location id
114
+ # @param id [Integer] The parameter id
115
+ # @return [Object]
116
+ def get_location_parameter(companyId, locationId, id) path = "/api/v2/companies/#{companyId}/locations/#{locationId}/parameters/#{id}"
117
+ get(path) end
118
+
119
+ # Retrieve parameters for a location
120
+ #
121
+ # List parameters for a location.
122
+ #
123
+ # Some locations can be taxed differently depending on the properties of that location. In AvaTax, these tax-affecting properties are called "parameters".
124
+ #
125
+ # A parameter added to a location will be used by default in tax calculation but will not show on the transaction line referencing the location.
126
+ #
127
+ # A parameter specified on a transaction line will override a location parameter if they share the same parameter name.
128
+ #
129
+ # 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/) .
130
+ # Paginate your results using the `$top`, `$skip`, and `$orderby` parameters.
131
+ #
132
+ # ### Security Policies
133
+ #
134
+ # * This API requires one of the following user roles: AccountAdmin, AccountUser, CompanyAdmin, CompanyUser, CSPAdmin, CSPTester, FirmAdmin, FirmUser, SiteAdmin, SSTAdmin, SystemAdmin, TechnicalSupportAdmin, TechnicalSupportUser, TreasuryAdmin, TreasuryUser.
135
+ # @param companyId [Integer] The company id
136
+ # @param locationId [Integer] The ID of the location
137
+ # @param filter [String] A filter statement to identify specific records to retrieve. For more information on filtering, see [Filtering in REST](http://developer.avalara.com/avatax/filtering-in-rest/).<br />*Not filterable:* name, unit
138
+ # @param top [Integer] If nonzero, return no more than this number of results. Used with `$skip` to provide pagination for large datasets. Unless otherwise specified, the maximum number of records that can be returned from an API call is 1,000 records.
139
+ # @param skip [Integer] If nonzero, skip this number of results before returning data. Used with `$top` to provide pagination for large datasets.
140
+ # @param orderBy [String] A comma separated list of sort statements in the format `(fieldname) [ASC|DESC]`, for example `id ASC`.
141
+ # @return [FetchResult]
142
+ def list_location_parameters(companyId, locationId, options={}) path = "/api/v2/companies/#{companyId}/locations/#{locationId}/parameters"
143
+ get(path, options) end
144
+
55
145
  # Retrieve locations for this company
56
146
  #
57
147
  # List all location objects defined for this company.
@@ -69,9 +159,9 @@ module AvaTax
69
159
  #
70
160
  # ### Security Policies
71
161
  #
72
- # * This API requires one of the following user roles: AccountAdmin, AccountUser, CompanyAdmin, CompanyUser, CSPAdmin, CSPTester, FirmAdmin, SiteAdmin, SSTAdmin, SystemAdmin, TechnicalSupportAdmin, TechnicalSupportUser, TreasuryAdmin, TreasuryUser.
162
+ # * This API requires one of the following user roles: AccountAdmin, AccountUser, CompanyAdmin, CompanyUser, CSPAdmin, CSPTester, FirmAdmin, FirmUser, SiteAdmin, SSTAdmin, SystemAdmin, TechnicalSupportAdmin, TechnicalSupportUser, TreasuryAdmin, TreasuryUser.
73
163
  # @param companyId [Integer] The ID of the company that owns these locations
74
- # @param filter [String] A filter statement to identify specific records to retrieve. For more information on filtering, see [Filtering in REST](http://developer.avalara.com/avatax/filtering-in-rest/).<br />*Not filterable:* settings, parameters
164
+ # @param filter [String] A filter statement to identify specific records to retrieve. For more information on filtering, see [Filtering in REST](http://developer.avalara.com/avatax/filtering-in-rest/).<br />*Not filterable:* isMarketplaceOutsideUsa, settings, parameters
75
165
  # @param include [String] A comma separated list of additional data to retrieve.
76
166
  # @param top [Integer] If nonzero, return no more than this number of results. Used with `$skip` to provide pagination for large datasets. Unless otherwise specified, the maximum number of records that can be returned from an API call is 1,000 records.
77
167
  # @param skip [Integer] If nonzero, skip this number of results before returning data. Used with `$top` to provide pagination for large datasets.
@@ -98,8 +188,8 @@ module AvaTax
98
188
  #
99
189
  # ### Security Policies
100
190
  #
101
- # * This API requires one of the following user roles: AccountAdmin, AccountUser, CompanyAdmin, CompanyUser, CSPAdmin, CSPTester, FirmAdmin, SiteAdmin, SSTAdmin, SystemAdmin, TechnicalSupportAdmin, TechnicalSupportUser, TreasuryAdmin, TreasuryUser.
102
- # @param filter [String] A filter statement to identify specific records to retrieve. For more information on filtering, see [Filtering in REST](http://developer.avalara.com/avatax/filtering-in-rest/).<br />*Not filterable:* settings, parameters
191
+ # * This API requires one of the following user roles: AccountAdmin, AccountUser, CompanyAdmin, CompanyUser, CSPAdmin, CSPTester, FirmAdmin, FirmUser, SiteAdmin, SSTAdmin, SystemAdmin, TechnicalSupportAdmin, TechnicalSupportUser, TreasuryAdmin, TreasuryUser.
192
+ # @param filter [String] A filter statement to identify specific records to retrieve. For more information on filtering, see [Filtering in REST](http://developer.avalara.com/avatax/filtering-in-rest/).<br />*Not filterable:* isMarketplaceOutsideUsa, settings, parameters
103
193
  # @param include [String] A comma separated list of additional data to retrieve. You may specify `LocationSettings` to retrieve location settings.
104
194
  # @param top [Integer] If nonzero, return no more than this number of results. Used with `$skip` to provide pagination for large datasets. Unless otherwise specified, the maximum number of records that can be returned from an API call is 1,000 records.
105
195
  # @param skip [Integer] If nonzero, skip this number of results before returning data. Used with `$top` to provide pagination for large datasets.
@@ -124,6 +214,27 @@ module AvaTax
124
214
  def update_location(companyId, id, model) path = "/api/v2/companies/#{companyId}/locations/#{id}"
125
215
  put(path, model) end
126
216
 
217
+ # Update a location parameter
218
+ #
219
+ # Update a location parameter.
220
+ #
221
+ # Some locations can be taxed differently depending on the properties of that location. In AvaTax, these tax-affecting properties are called "parameters".
222
+ #
223
+ # A parameter added to a location will be used by default in tax calculation but will not show on the transaction line referencing the location.
224
+ #
225
+ # A parameter specified on a transaction line will override a location parameter if they share the same parameter name.
226
+ #
227
+ # ### Security Policies
228
+ #
229
+ # * This API requires one of the following user roles: AccountAdmin, CompanyAdmin, CSPAdmin, CSPTester, FirmAdmin, SiteAdmin, SSTAdmin, SystemAdmin, TechnicalSupportAdmin.
230
+ # @param companyId [Integer] The company id.
231
+ # @param locationId [Integer] The location id
232
+ # @param id [Integer] The location parameter id
233
+ # @param model [Object] The location parameter object you wish to update.
234
+ # @return [Object]
235
+ def update_location_parameter(companyId, locationId, id, model) path = "/api/v2/companies/#{companyId}/locations/#{locationId}/parameters/#{id}"
236
+ put(path, model) end
237
+
127
238
  # Validate the location against local requirements
128
239
  #
129
240
  # Returns validation information for this location.
@@ -132,7 +243,7 @@ module AvaTax
132
243
  #
133
244
  # ### Security Policies
134
245
  #
135
- # * This API requires one of the following user roles: AccountAdmin, AccountUser, CompanyAdmin, CompanyUser, CSPAdmin, CSPTester, FirmAdmin, SiteAdmin, SSTAdmin, SystemAdmin, TechnicalSupportAdmin, TechnicalSupportUser, TreasuryAdmin, TreasuryUser.
246
+ # * This API requires one of the following user roles: AccountAdmin, AccountUser, CompanyAdmin, CompanyUser, CSPAdmin, CSPTester, FirmAdmin, FirmUser, SiteAdmin, SSTAdmin, SystemAdmin, TechnicalSupportAdmin, TechnicalSupportUser, TreasuryAdmin, TreasuryUser.
136
247
  # @param companyId [Integer] The ID of the company that owns this location
137
248
  # @param id [Integer] The primary key of this location
138
249
  # @return [Object]