avatax 20.9.0 → 21.6.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/.vs/slnx.sqlite +0 -0
- data/lib/avatax/client/addresses.rb +3 -3
- data/lib/avatax/client/advancedrules.rb +0 -10
- data/lib/avatax/client/avafileforms.rb +5 -5
- data/lib/avatax/client/certexpressinvites.rb +15 -15
- data/lib/avatax/client/certificates.rb +67 -67
- data/lib/avatax/client/companies.rb +6 -5
- data/lib/avatax/client/customers.rb +61 -61
- data/lib/avatax/client/datasources.rb +6 -6
- data/lib/avatax/client/definitions.rb +62 -8
- data/lib/avatax/client/ecms.rb +26 -31
- data/lib/avatax/client/ecommercetoken.rb +1 -1
- data/lib/avatax/client/errortransactions.rb +27 -15
- data/lib/avatax/client/filingcalendars.rb +15 -0
- data/lib/avatax/client/filings.rb +2 -2
- data/lib/avatax/client/free.rb +0 -73
- data/lib/avatax/client/fundingrequests.rb +2 -2
- data/lib/avatax/client/items.rb +117 -3
- data/lib/avatax/client/locations.rb +2 -2
- data/lib/avatax/client/multidocument.rb +12 -12
- data/lib/avatax/client/nexus.rb +2 -2
- data/lib/avatax/client/notices.rb +28 -489
- data/lib/avatax/client/reports.rb +10 -1
- data/lib/avatax/client/settings.rb +7 -2
- data/lib/avatax/client/taxcontent.rb +65 -2
- data/lib/avatax/client/taxprofiles.rb +14 -10
- data/lib/avatax/client/transactions.rb +21 -21
- data/lib/avatax/client/upcs.rb +6 -6
- data/lib/avatax/client/users.rb +2 -2
- data/lib/avatax/configuration.rb +1 -1
- data/lib/avatax/request.rb +0 -2
- data/lib/avatax/version.rb +1 -1
- data/spec/avatax/request_spec.rb +25 -0
- metadata +3 -2
data/lib/avatax/client/ecms.rb
CHANGED
@@ -1,17 +1,6 @@
|
|
1
1
|
module AvaTax
|
2
2
|
class Client
|
3
|
-
module
|
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
|
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 [
|
50
|
-
def list_e_c_m_s_by_company(companyId, options={})
|
51
|
-
path
|
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
|
-
#
|
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 [
|
72
|
-
def query_e_c_m_s(options={})
|
73
|
-
path
|
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
|
@@ -14,7 +14,7 @@ module AvaTax
|
|
14
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
15
|
# @param companyId [Integer] The company ID that will be issued this certificate.
|
16
16
|
# @param model [Object]
|
17
|
-
# @return [
|
17
|
+
# @return [Object]
|
18
18
|
def create_e_commerce_token(companyId, model) path = "/api/v2/companies/#{companyId}/ecommercetokens"
|
19
19
|
post(path, model) end
|
20
20
|
|
@@ -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
|
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
|
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
|
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 [
|
43
|
-
def list_error_transactions(options={})
|
44
|
-
path
|
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
|
@@ -19,8 +19,8 @@ module AvaTax
|
|
19
19
|
# ### Security Policies
|
20
20
|
#
|
21
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.
|
22
|
-
# * This API is available by invitation only
|
23
|
-
# * This API depends on the following active services
|
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.
|
24
24
|
# @param companyId [Integer] The ID of the company that owns these batches
|
25
25
|
# @param endPeriodMonth [Integer] The month of the period you are trying to retrieve
|
26
26
|
# @param endPeriodYear [Integer] The year of the period you are trying to retrieve
|
data/lib/avatax/client/free.rb
CHANGED
@@ -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
|
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
|
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}"
|
data/lib/avatax/client/items.rb
CHANGED
@@ -39,6 +39,27 @@ module AvaTax
|
|
39
39
|
def batch_delete_item_parameters(companyId, itemId) path = "/api/v2/companies/#{companyId}/items/#{itemId}/parameters"
|
40
40
|
delete(path) end
|
41
41
|
|
42
|
+
# Bulk upload items from a product catalog
|
43
|
+
#
|
44
|
+
# Create/Update one or more item objects attached to this company.
|
45
|
+
#
|
46
|
+
# Items are a way of separating your tax calculation process from your tax configuration details. If you choose, you
|
47
|
+
# can provide `itemCode` values for each `CreateTransaction()` API call rather than specifying tax codes, parameters, descriptions,
|
48
|
+
# and other data fields. AvaTax will automatically look up each `itemCode` and apply the correct tax codes and parameters
|
49
|
+
# from the item table instead. This allows your CreateTransaction call to be as simple as possible, and your tax compliance
|
50
|
+
# team can manage your item catalog and adjust the tax behavior of items without having to modify your software.
|
51
|
+
#
|
52
|
+
# The tax code takes precedence over the tax code id if both are provided.
|
53
|
+
#
|
54
|
+
# ### Security Policies
|
55
|
+
#
|
56
|
+
# * This API requires one of the following user roles: AccountAdmin, CompanyAdmin, CSPTester, SSTAdmin, TechnicalSupportAdmin.
|
57
|
+
# @param companyId [Integer] The ID of the company that owns this items.
|
58
|
+
# @param model [Object] The items you wish to upload.
|
59
|
+
# @return [Object]
|
60
|
+
def bulk_upload_items(companyId, model) path = "/api/v2/companies/#{companyId}/items/upload"
|
61
|
+
post(path, model) end
|
62
|
+
|
42
63
|
# Add classifications to an item.
|
43
64
|
#
|
44
65
|
# Add classifications to an item.
|
@@ -104,6 +125,22 @@ module AvaTax
|
|
104
125
|
def create_items(companyId, model) path = "/api/v2/companies/#{companyId}/items"
|
105
126
|
post(path, model) end
|
106
127
|
|
128
|
+
# Create tags for a item
|
129
|
+
#
|
130
|
+
# Creates one or more new `Tag` objects attached to this Item.
|
131
|
+
#
|
132
|
+
# Item tags puts multiple labels for an item. So that item can be easily grouped by these tags.
|
133
|
+
#
|
134
|
+
# ### Security Policies
|
135
|
+
#
|
136
|
+
# * This API requires one of the following user roles: AccountAdmin, CompanyAdmin, CSPTester, SSTAdmin, TechnicalSupportAdmin.
|
137
|
+
# @param companyId [Integer] The ID of the company that defined these items
|
138
|
+
# @param itemId [Integer] The ID of the item as defined by the company that owns this tag.
|
139
|
+
# @param model [ItemTagDetailModel[]] Tags you wish to associate with the Item
|
140
|
+
# @return [ItemTagDetailModel[]]
|
141
|
+
def create_item_tags(companyId, itemId, model) path = "/api/v2/companies/#{companyId}/items/#{itemId}/tags"
|
142
|
+
post(path, model) end
|
143
|
+
|
107
144
|
# Delete a single item
|
108
145
|
#
|
109
146
|
# Deletes the item object at this URL.
|
@@ -163,6 +200,37 @@ module AvaTax
|
|
163
200
|
def delete_item_parameter(companyId, itemId, id) path = "/api/v2/companies/#{companyId}/items/#{itemId}/parameters/#{id}"
|
164
201
|
delete(path) end
|
165
202
|
|
203
|
+
# Delete item tag by id
|
204
|
+
#
|
205
|
+
# Deletes the `Tag` object of an Item at this URL.
|
206
|
+
#
|
207
|
+
# Item tags puts multiple labels for an item. So that item can be easily grouped by these tags.
|
208
|
+
#
|
209
|
+
# ### Security Policies
|
210
|
+
#
|
211
|
+
# * This API requires one of the following user roles: AccountAdmin, CompanyAdmin, CSPTester, SSTAdmin, TechnicalSupportAdmin.
|
212
|
+
# @param companyId [Integer] The ID of the company that defined these items
|
213
|
+
# @param itemId [Integer] The ID of the item as defined by the company that owns this tag.
|
214
|
+
# @param itemTagDetailId [Integer] The ID of the item tag detail you wish to delete.
|
215
|
+
# @return [ErrorDetail[]]
|
216
|
+
def delete_item_tag(companyId, itemId, itemTagDetailId) path = "/api/v2/companies/#{companyId}/items/#{itemId}/tags/#{itemTagDetailId}"
|
217
|
+
delete(path) end
|
218
|
+
|
219
|
+
# Delete all item tags
|
220
|
+
#
|
221
|
+
# Deletes all `Tags` objects of an Item at this URL.
|
222
|
+
#
|
223
|
+
# Item tags puts multiple labels for an item. So that item can be easily grouped by these tags.
|
224
|
+
#
|
225
|
+
# ### Security Policies
|
226
|
+
#
|
227
|
+
# * This API requires one of the following user roles: AccountAdmin, CompanyAdmin, CSPTester, SSTAdmin, TechnicalSupportAdmin.
|
228
|
+
# @param companyId [Integer] The ID of the company that defined these items.
|
229
|
+
# @param itemId [Integer] The ID of the item as defined by the company that owns this tag.
|
230
|
+
# @return [ErrorDetail[]]
|
231
|
+
def delete_item_tags(companyId, itemId) path = "/api/v2/companies/#{companyId}/items/#{itemId}/tags"
|
232
|
+
delete(path) end
|
233
|
+
|
166
234
|
# Retrieve a single item
|
167
235
|
#
|
168
236
|
# Get the `Item` object identified by this URL.
|
@@ -221,6 +289,24 @@ module AvaTax
|
|
221
289
|
def get_item_parameter(companyId, itemId, id) path = "/api/v2/companies/#{companyId}/items/#{itemId}/parameters/#{id}"
|
222
290
|
get(path) end
|
223
291
|
|
292
|
+
# Retrieve tags for an item
|
293
|
+
#
|
294
|
+
# Get the `Tag` objects of an Item identified by this URL.
|
295
|
+
#
|
296
|
+
# Item tags puts multiple labels for an item. So that item can be easily grouped by these tags.
|
297
|
+
#
|
298
|
+
# ### Security Policies
|
299
|
+
#
|
300
|
+
# * This API requires one of the following user roles: AccountAdmin, AccountUser, CompanyAdmin, CompanyUser, CSPAdmin, CSPTester, SiteAdmin, SSTAdmin, SystemAdmin, TechnicalSupportAdmin, TechnicalSupportUser.
|
301
|
+
# @param companyId [Integer] The ID of the company that defined these items
|
302
|
+
# @param itemId [Integer] The ID of the item as defined by the company that owns this tag.
|
303
|
+
# @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:* tagName
|
304
|
+
# @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.
|
305
|
+
# @param skip [Integer] If nonzero, skip this number of results before returning data. Used with `$top` to provide pagination for large datasets.
|
306
|
+
# @return [FetchResult]
|
307
|
+
def get_item_tags(companyId, itemId, options={}) path = "/api/v2/companies/#{companyId}/items/#{itemId}/tags"
|
308
|
+
get(path, options) end
|
309
|
+
|
224
310
|
# Retrieve classifications for an item.
|
225
311
|
#
|
226
312
|
# List classifications for an item.
|
@@ -263,7 +349,7 @@ module AvaTax
|
|
263
349
|
# * This API requires one of the following user roles: AccountAdmin, AccountUser, CompanyAdmin, CompanyUser, CSPAdmin, CSPTester, SiteAdmin, SSTAdmin, SystemAdmin, TechnicalSupportAdmin, TechnicalSupportUser.
|
264
350
|
# @param companyId [Integer] The company id
|
265
351
|
# @param itemId [Integer] The item id
|
266
|
-
# @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
|
352
|
+
# @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, isNeededForCalculation, isNeededForReturns, isNeededForClassification
|
267
353
|
# @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.
|
268
354
|
# @param skip [Integer] If nonzero, skip this number of results before returning data. Used with `$top` to provide pagination for large datasets.
|
269
355
|
# @param orderBy [String] A comma separated list of sort statements in the format `(fieldname) [ASC|DESC]`, for example `id ASC`.
|
@@ -294,7 +380,7 @@ module AvaTax
|
|
294
380
|
#
|
295
381
|
# * This API requires one of the following user roles: AccountAdmin, AccountUser, CompanyAdmin, CompanyUser, CSPAdmin, CSPTester, SiteAdmin, SSTAdmin, SystemAdmin, TechnicalSupportAdmin, TechnicalSupportUser.
|
296
382
|
# @param companyId [Integer] The ID of the company that defined these items
|
297
|
-
# @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:* taxCode, classifications, parameters
|
383
|
+
# @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:* taxCode, classifications, parameters, tags
|
298
384
|
# @param include [String] A comma separated list of additional data to retrieve.
|
299
385
|
# @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.
|
300
386
|
# @param skip [Integer] If nonzero, skip this number of results before returning data. Used with `$top` to provide pagination for large datasets.
|
@@ -320,7 +406,7 @@ module AvaTax
|
|
320
406
|
# ### Security Policies
|
321
407
|
#
|
322
408
|
# * This API requires one of the following user roles: AccountAdmin, AccountUser, CompanyAdmin, CompanyUser, CSPAdmin, CSPTester, SiteAdmin, SSTAdmin, SystemAdmin, TechnicalSupportAdmin, TechnicalSupportUser.
|
323
|
-
# @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:* taxCode, classifications, parameters
|
409
|
+
# @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:* taxCode, classifications, parameters, tags
|
324
410
|
# @param include [String] A comma separated list of additional data to retrieve.
|
325
411
|
# @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.
|
326
412
|
# @param skip [Integer] If nonzero, skip this number of results before returning data. Used with `$top` to provide pagination for large datasets.
|
@@ -329,6 +415,34 @@ module AvaTax
|
|
329
415
|
def query_items(options={}) path = "/api/v2/items"
|
330
416
|
get(path, options) end
|
331
417
|
|
418
|
+
# Retrieve all items associated with given tag
|
419
|
+
#
|
420
|
+
# Get multiple item objects associated with given tag.
|
421
|
+
#
|
422
|
+
# Items are a way of separating your tax calculation process from your tax configuration details. If you choose, you
|
423
|
+
# can provide `itemCode` values for each `CreateTransaction()` API call rather than specifying tax codes, parameters, descriptions,
|
424
|
+
# and other data fields. AvaTax will automatically look up each `itemCode` and apply the correct tax codes and parameters
|
425
|
+
# from the item table instead. This allows your CreateTransaction call to be as simple as possible, and your tax compliance
|
426
|
+
# team can manage your item catalog and adjust the tax behavior of items without having to modify your software.
|
427
|
+
#
|
428
|
+
# 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/) .
|
429
|
+
#
|
430
|
+
# Paginate your results using the `$top`, `$skip`, and `$orderby` parameters.
|
431
|
+
#
|
432
|
+
# ### Security Policies
|
433
|
+
#
|
434
|
+
# * This API requires one of the following user roles: AccountAdmin, AccountUser, CompanyAdmin, CompanyUser, CSPAdmin, CSPTester, SiteAdmin, SSTAdmin, SystemAdmin, TechnicalSupportAdmin, TechnicalSupportUser.
|
435
|
+
# @param companyId [Integer] The ID of the company that defined these items.
|
436
|
+
# @param tag [String] The master tag to be associated with item.
|
437
|
+
# @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:* taxCode, classifications, parameters, tags
|
438
|
+
# @param include [String] A comma separated list of additional data to retrieve.
|
439
|
+
# @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.
|
440
|
+
# @param skip [Integer] If nonzero, skip this number of results before returning data. Used with `$top` to provide pagination for large datasets.
|
441
|
+
# @param orderBy [String] A comma separated list of sort statements in the format `(fieldname) [ASC|DESC]`, for example `id ASC`.
|
442
|
+
# @return [FetchResult]
|
443
|
+
def query_items_by_tag(companyId, tag, options={}) path = "/api/v2/companies/#{companyId}/items/bytags/#{tag}"
|
444
|
+
get(path, options) end
|
445
|
+
|
332
446
|
# Sync items from a product catalog
|
333
447
|
#
|
334
448
|
# Syncs a list of items with AvaTax without waiting for them to be created. It is ideal for syncing large product catalogs
|