avatax 19.5.0 → 19.9.1

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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 2512039042d82fe246845a50c231a866722d3edaaa96d706ddb998bd29a55652
4
- data.tar.gz: c547e15c054c2c1333461de86bf875355a2d702fd9e41be5026cee56a65b26bc
3
+ metadata.gz: 93c68605547d18e18f977de7f8e02672ea083ab7ff4cc15289b622eddc2cad37
4
+ data.tar.gz: d08e217a9a80f892ff0ccb01e1536769e406683ff982bfb6ac3c7b53538e720c
5
5
  SHA512:
6
- metadata.gz: 30c074e4a60b2d613061113480c879b7ea24539fe49771d24928342f512c8eacaa8bc977460e851ad47a3c600fea744750c2cbe08528db1943fb54add04d2e6b
7
- data.tar.gz: 6dd71355cd5af75146284ef35c6cac6f3c6b4d2877f0a243967fdae06fe9448b2c7debc42c0583877697e5de6bb2d1af06ce88867f856ff49a5b0c3f1a5ec6c0
6
+ metadata.gz: 4e5246a5b056f565156a3e3a361c0ab842d2e3a4f52943e48a67c1b1b780cb3fe615be5e827dbe20ca27417d21cf24cfb5ad16c6f4745ca11cd39382f76ea4d0
7
+ data.tar.gz: cbd85e78c2530f845c670914f26ce80df3003b7a519013c1e9617c45dd8a247d37afd6080b73c75f01a3804d2bd1e0001a2e6ad7f4f215f51329d8119f3327f3
@@ -1,7 +1,15 @@
1
1
  language: ruby
2
2
  sudo: false
3
3
  rvm:
4
- - 2.4
5
- - 2.3
6
- - 2.2
7
- - 2.1
4
+ - 2.4
5
+ - 2.3
6
+ - 2.2
7
+ - 2.1
8
+ deploy:
9
+ provider: rubygems
10
+ api_key:
11
+ secure: VnQH+Ffony43CPwrJ9vBVQ+/4aHFNvlGbXSKZL9Elm2P/FKwgjycwNZ+QtPmKbA9bVUtUkPjK3phJYeL//cTv+asrBBWM/ptBCBWVYB+ICeDXCfhB7id2hcSIWy9xQ4/KdCJxgeD+gwF1Ce95XK7epZLkhcr1OpgNO+cqnA1KlZ7fkZDtFEkXtY8H40oZZ6d5G7S3s+yBUEGHoiAiD2Gj/6RfWqT8iKykT4TzBtQSzyUDVel5/dt3MG2o4kUMcF3IS+HU2fOv61mCBpCP8Y6uDSe14TWPtYrsyR+Y5E5g7OetOq3/JxMacxG7fSo6KYtkL6qYqULgc3YtUoAPyULg4nWHO1aixdBbEiD7WNlBiSeRkUgRxunNHNFwnasW1g1zrkYdcqwkROjPfXChwmFK5ZFho6PpuWpEijttNjbmjwC/IWb/7X04MPwm2tzs5pdVVBsm+Hb1dstxWsm5nLZ+xzFDDfcKqM9ktRUeeRF9SlpY/1eNdedf76IVMcZRRRPvRIJwW/zU7MPGfBqJv1AM74150X4tyGHA+OCV7aUAh9NeJegYhHfi8gFAItjQWo59ZsWXhXjwxRJwKOKTreEmmDlFrdQ7OP6uEBLy+d+4rQgxmQsB/+8TDKV0TH9bhITAqYmue9uu0Fb0mJkSaUMJ4rGl0zGM+58nIwQ2YmoeoY=
12
+ gem: avatax
13
+ on:
14
+ tags: true
15
+ branch: master
@@ -12,6 +12,11 @@ module AvaTax
12
12
  # This is the same API as the POST /api/v2/addresses/resolve endpoint.
13
13
  # Both verbs are supported to provide for flexible implementation.
14
14
  #
15
+ # Inorder to get any evaluation for an address please provide atleast one of the following fields/pairs:
16
+ # 1. postal code
17
+ # 2. line1 + city + region
18
+ # 3. line1 + postal code
19
+ #
15
20
  # ### Security Policies
16
21
  #
17
22
  # * This API requires one of the following user roles: AccountAdmin, AccountOperator, AccountUser, CompanyAdmin, CompanyUser, CSPTester, SSTAdmin, TechnicalSupportAdmin, TechnicalSupportUser.
@@ -11,8 +11,8 @@ module AvaTax
11
11
  # ### Security Policies
12
12
  #
13
13
  # * This API requires the user role Compliance Root User.
14
- # * This API depends on the following active services<br />*Returns* (at least one of): Mrs, MRSComplianceManager, AvaTaxCsp.
15
- # * This API is available by invitation only. To request access to this feature, please speak to a business development manager and request host address whitelisting for [Returns] for your servers.
14
+ # * 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.
15
+ # * This API is available by invitation only.<br />*Exempt security roles*: ComplianceRootUser, ComplianceAdmin, ComplianceUser, TechnicalSupportAdmin, TechnicalSupportUser.
16
16
  # @param model [AvaFileFormModel[]] The AvaFileForm you wish to create.
17
17
  # @return [AvaFileFormModel[]]
18
18
  def create_ava_file_forms(model)
@@ -28,8 +28,8 @@ module AvaTax
28
28
  # ### Security Policies
29
29
  #
30
30
  # * This API requires one of the following user roles: Compliance Root User, ComplianceUser, FirmAdmin.
31
- # * This API depends on the following active services<br />*Returns* (at least one of): Mrs, MRSComplianceManager, AvaTaxCsp.
32
- # * This API is available by invitation only. To request access to this feature, please speak to a business development manager and request host address whitelisting for [Returns] for your servers.
31
+ # * 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.
32
+ # * This API is available by invitation only.<br />*Exempt security roles*: ComplianceRootUser, ComplianceAdmin, ComplianceUser, TechnicalSupportAdmin, TechnicalSupportUser.
33
33
  # @param id [Integer] The ID of the AvaFileForm you wish to delete.
34
34
  # @return [ErrorDetail[]]
35
35
  def delete_ava_file_form(id)
@@ -45,8 +45,8 @@ module AvaTax
45
45
  # ### Security Policies
46
46
  #
47
47
  # * This API requires one of the following user roles: AccountAdmin, AccountOperator, CompanyAdmin, CompanyUser, Compliance Root User, Compliance Temp User, ComplianceAdmin, ComplianceUser, FirmAdmin, FirmUser, SystemAdmin, TechnicalSupportAdmin, TechnicalSupportUser, TreasuryAdmin.
48
- # * This API is available by invitation only. To request access to this feature, please speak to a business development manager and request host address whitelisting for [Returns] for your servers.
49
- # * This API depends on the following active services<br />*Returns* (at least one of): Mrs, MRSComplianceManager, AvaTaxCsp.
48
+ # * This API is available by invitation only.<br />*Exempt security roles*: ComplianceRootUser, ComplianceAdmin, ComplianceUser, TechnicalSupportAdmin, TechnicalSupportUser.
49
+ # * 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.
50
50
  # @param id [Integer] The primary key of this AvaFileForm
51
51
  # @return [Object]
52
52
  def get_ava_file_form(id)
@@ -63,10 +63,9 @@ module AvaTax
63
63
  # ### Security Policies
64
64
  #
65
65
  # * This API requires one of the following user roles: AccountAdmin, AccountOperator, CompanyAdmin, CompanyUser, Compliance Root User, Compliance Temp User, ComplianceAdmin, ComplianceUser, FirmAdmin, FirmUser, SystemAdmin, TechnicalSupportAdmin, TechnicalSupportUser, TreasuryAdmin.
66
- # * This API depends on the following active services<br />*Returns* (at least one of): Mrs, MRSComplianceManager, AvaTaxCsp.
67
- # * This API is available by invitation only. To request access to this feature, please speak to a business development manager and request host address whitelisting for [Returns] for your servers.
66
+ # * 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.
67
+ # * This API is available by invitation only.<br />*Exempt security roles*: ComplianceRootUser, ComplianceAdmin, ComplianceUser, TechnicalSupportAdmin, TechnicalSupportUser.
68
68
  # @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:* outletTypeId
69
- # @param include [String] A comma separated list of additional data to retrieve.
70
69
  # @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.
71
70
  # @param skip [Integer] If nonzero, skip this number of results before returning data. Used with `$top` to provide pagination for large datasets.
72
71
  # @param orderBy [String] A comma separated list of sort statements in the format `(fieldname) [ASC|DESC]`, for example `id ASC`.
@@ -85,8 +84,8 @@ module AvaTax
85
84
  # ### Security Policies
86
85
  #
87
86
  # * This API requires the user role Compliance Root User.
88
- # * This API depends on the following active services<br />*Returns* (at least one of): Mrs, MRSComplianceManager, AvaTaxCsp.
89
- # * This API is available by invitation only. To request access to this feature, please speak to a business development manager and request host address whitelisting for [Returns] for your servers.
87
+ # * 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.
88
+ # * This API is available by invitation only.<br />*Exempt security roles*: ComplianceRootUser, ComplianceAdmin, ComplianceUser, TechnicalSupportAdmin, TechnicalSupportUser.
90
89
  # @param id [Integer] The ID of the AvaFileForm you wish to update
91
90
  # @param model [Object] The AvaFileForm model you wish to update.
92
91
  # @return [Object]
@@ -25,6 +25,8 @@ module AvaTax
25
25
  # certificate related APIs. To check if this company is set up, call `GetCertificateSetup`. To request setup of the auditable document
26
26
  # storage for this company, call `RequestCertificateSetup`.
27
27
  #
28
+ # If the users specified in the certificates do not exist, the API will create the user and link them to the certificate
29
+ #
28
30
  # ### Security Policies
29
31
  #
30
32
  # * This API requires one of the following user roles: AccountAdmin, CompanyAdmin, CSPTester, ProStoresOperator, Registrar, SiteAdmin, SSTAdmin, SystemAdmin, TechnicalSupportAdmin.
@@ -61,7 +63,7 @@ module AvaTax
61
63
  # * This API depends on the following active services<br />*Required* (all): AvaTaxPro.
62
64
  # @param companyId [Integer] The unique ID number of the company that recorded this certificate
63
65
  # @param id [Integer] The unique ID number of this certificate
64
- # @return [Object]
66
+ # @return [ErrorDetail[]]
65
67
  def delete_certificate(companyId, id)
66
68
  path = "/api/v2/companies/#{companyId}/certificates/#{id}"
67
69
  delete(path)
@@ -306,7 +308,7 @@ module AvaTax
306
308
  # * This API depends on the following active services<br />*Required* (all): AvaTaxPro.
307
309
  # @param companyId [Integer] The ID number of the company to search
308
310
  # @param include [String] 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.
309
- # @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:* status, pdf, pages
311
+ # @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:* exemptionNumber, status, ecmsId, ecmsStatus, pdf, pages
310
312
  # @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.
311
313
  # @param skip [Integer] If nonzero, skip this number of results before returning data. Used with `$top` to provide pagination for large datasets.
312
314
  # @param orderBy [String] A comma separated list of sort statements in the format `(fieldname) [ASC|DESC]`, for example `id ASC`.
@@ -3,6 +3,43 @@ module AvaTax
3
3
  module Companies
4
4
 
5
5
 
6
+ # Checks whether the integration being used to set up this company and run transactions onto this company is compliant to all requirements.
7
+ #
8
+ # Examines the most recent 100 transactions or data from the last month when verifying transaction-related integrations.
9
+ # 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
10
+ # written integrations for a company are sufficient enough to be delivered to the respective customers to start using it.
11
+ #
12
+ # This API provides messages specific enough (through predefined checks) to guide the partner on what integrations are still missing from the company to get fully certified.
13
+ # The API makes the following checks to conclude if the company is NOT fully certified:
14
+ # 1. Any past month items contains generic tax code of P0000000.
15
+ # 2. All the companies on the requesting account are test companies.
16
+ # 3. No Voided/Cancelled documents in the past 30 days.
17
+ # 4. There are less than 2 committed documents.
18
+ # 5. Any documentCode is a generic GUID string.
19
+ # 6. Any customerCode on document is a generic GUID string.
20
+ # 7. No document has more than 1 documentLine.
21
+ # 8. All of the documents have missing exemptionNo, customerUsageType, taxDateOverride or negative amount.
22
+ # 9. Any document quantity is a negative number.
23
+ # 10. Any document have repeated lines.
24
+ # 11. No document has shipping charge.
25
+ # 12. All documents have same ItemCodes, descriptions and taxCodes.
26
+ # 13. Less than 2 addresses used across all documents.
27
+ # 14. Whether locationCode was used in documents.
28
+ # 15. Account with AvaGlobal subscription and no documents have VATBuyerId.
29
+ # 16. Any document has currencyCode not being USD for accounts with AvaGlobal subscription.
30
+ # 17. All documents have countryCode used for accounts with AvaGlobal subscription.
31
+ #
32
+ # ### Security Policies
33
+ #
34
+ # * 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.
35
+ # @param id [Integer] The ID of the company to check if its integration is certified.
36
+ # @return [String]
37
+ def certify_integration(id)
38
+ path = "/api/v2/companies/#{id}/certify"
39
+ get(path)
40
+ end
41
+
42
+
6
43
  # Change the filing status of this company
7
44
  #
8
45
  # Changes the current filing status of this company.
@@ -89,6 +126,7 @@ module AvaTax
89
126
  #
90
127
  # ### Security Policies
91
128
  #
129
+ # * This API depends on the following active services<br />*Returns* (at least one of): Mrs, MRSComplianceManager, AvaTaxCsp.
92
130
  # * 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.
93
131
  # @param id [Integer] The unique identifier of the company
94
132
  # @param model [Object] The funding initialization request
@@ -124,7 +162,7 @@ module AvaTax
124
162
  # ### Security Policies
125
163
  #
126
164
  # * 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.
127
- # * This API depends on the following active services<br />*Returns* (at least one of): Mrs, MRSComplianceManager, AvaTaxCsp.
165
+ # * 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.
128
166
  # * This API is available by invitation only.<br />*Exempt security roles*: ComplianceRootUser, ComplianceAdmin, ComplianceUser, TechnicalSupportAdmin, TechnicalSupportUser.
129
167
  # @param companyId [Integer] The unique identifier of the company
130
168
  # @return [Object]
@@ -144,7 +182,7 @@ module AvaTax
144
182
  # ### Security Policies
145
183
  #
146
184
  # * 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.
147
- # * This API depends on the following active services<br />*Returns* (at least one of): Mrs, MRSComplianceManager, AvaTaxCsp.
185
+ # * 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.
148
186
  # * This API is available by invitation only.<br />*Exempt security roles*: ComplianceRootUser, ComplianceAdmin, ComplianceUser, TechnicalSupportAdmin, TechnicalSupportUser.
149
187
  # @param companyId [Integer] The unique identifier of the company
150
188
  # @param currency [String] The currency of the funding. USD and CAD are the only valid currencies
@@ -244,6 +282,7 @@ module AvaTax
244
282
  #
245
283
  # ### Security Policies
246
284
  #
285
+ # * This API depends on the following active services<br />*Returns* (at least one of): Mrs, MRSComplianceManager, AvaTaxCsp.
247
286
  # * 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.
248
287
  # @param id [Integer] The unique identifier of the company
249
288
  # @return [FundingStatusModel[]]
@@ -292,7 +331,7 @@ module AvaTax
292
331
  #
293
332
  # * 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.
294
333
  # @param include [String] 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.
295
- # @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:* contacts, items, locations, nexus, settings, taxCodes, taxRules, upcs, nonReportingChildCompanies, exemptCerts
334
+ # @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:* IsFein, contacts, items, locations, nexus, settings, taxCodes, taxRules, upcs, nonReportingChildCompanies, exemptCerts
296
335
  # @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.
297
336
  # @param skip [Integer] If nonzero, skip this number of results before returning data. Used with `$top` to provide pagination for large datasets.
298
337
  # @param orderBy [String] A comma separated list of sort statements in the format `(fieldname) [ASC|DESC]`, for example `id ASC`.
@@ -3,112 +3,6 @@ module AvaTax
3
3
  module Compliance
4
4
 
5
5
 
6
- # Retrieve a single tax rate.
7
- #
8
- # This API is available by invitation only.
9
- # @param id [Integer] The ID of the tax rate to retrieve.
10
- # @return [Object]
11
- def get_tax_rate(id)
12
- path = "/api/v2/compliance/taxrates/#{id}"
13
- get(path)
14
- end
15
-
16
-
17
- # Retrieve a single tax region.
18
- #
19
- # This API is available by invitation only.
20
- # @param id [Integer] The ID of the tax region to retrieve.
21
- # @return [Object]
22
- def get_tax_region(id)
23
- path = "/api/v2/compliance/taxregions/#{id}"
24
- get(path)
25
- end
26
-
27
-
28
- # Retrieve jurisdictions and rates in a combined format.
29
- #
30
- # This API is available by invitation only.
31
- # @param effectiveDate [DateTime] Used to limit the jurisdictions returned.
32
- # @param endDate [DateTime] Used to limit the jurisdictions returned.
33
- # @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/).
34
- # @param include [String] A comma separated list of objects to fetch underneath this jurisdiction.
35
- # @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.
36
- # @param skip [Integer] If nonzero, skip this number of results before returning data. Used with `$top` to provide pagination for large datasets.
37
- # @param orderBy [String] A comma separated list of sort statements in the format `(fieldname) [ASC|DESC]`, for example `id ASC`.
38
- # @return [Object]
39
- def query_jurisdiction_rates(options={})
40
- path = "/api/v2/compliance/jurisdictionrates"
41
- get(path, options)
42
- end
43
-
44
-
45
- # Retrieve all unique jurisdictions.
46
- #
47
- # This API is available by invitation only.
48
- #
49
- # 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:
50
- #
51
- # * TaxRates
52
- # @param country [String] The two-character ISO-3166 code for the country.
53
- # @param region [String] The two or three character region code for the region.
54
- # @param effectiveDate [DateTime] Used to limit the jurisdictions or rates returned.
55
- # @param endDate [DateTime] Used to limit the jurisdictions or rates returned.
56
- # @param aggregationOption [String] Aggregation method used if rates are returned using the '$include' parameter. (See StackAggregationOption::* for a list of allowable values)
57
- # @param include [String] A comma separated list of objects to fetch underneath this tax rate.
58
- # @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.
59
- # @param skip [Integer] If nonzero, skip this number of results before returning data. Used with `$top` to provide pagination for large datasets.
60
- # @return [Object]
61
- def query_jurisdictions(country, region, options={})
62
- path = "/api/v2/compliance/jurisdictions/#{country}/#{region}"
63
- get(path, options)
64
- end
65
-
66
-
67
- # Retrieve all tax rates.
68
- #
69
- # This API is available by invitation only.
70
- # @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/).
71
- # @param include [String] A comma separated list of objects to fetch underneath this tax rate.
72
- # @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.
73
- # @param skip [Integer] If nonzero, skip this number of results before returning data. Used with `$top` to provide pagination for large datasets.
74
- # @param orderBy [String] A comma separated list of sort statements in the format `(fieldname) [ASC|DESC]`, for example `id ASC`.
75
- # @return [Object]
76
- def query_tax_rates(options={})
77
- path = "/api/v2/compliance/taxrates"
78
- get(path, options)
79
- end
80
-
81
-
82
- # Retrieve all tax region jurisdictions.
83
- #
84
- # This API is available by invitation only.
85
- # @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/).
86
- # @param include [String] A comma separated list of objects to fetch underneath this tax region jurisdiction.
87
- # @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.
88
- # @param skip [Integer] If nonzero, skip this number of results before returning data. Used with `$top` to provide pagination for large datasets.
89
- # @param orderBy [String] A comma separated list of sort statements in the format `(fieldname) [ASC|DESC]`, for example `id ASC`.
90
- # @return [Object]
91
- def query_tax_region_jurisdictions(options={})
92
- path = "/api/v2/compliance/taxregionjurisdictions"
93
- get(path, options)
94
- end
95
-
96
-
97
- # Retrieve all tax regions.
98
- #
99
- # This API is available by invitation only.
100
- # @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/).
101
- # @param include [String] A comma separated list of objects to fetch underneath this tax region.
102
- # @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.
103
- # @param skip [Integer] If nonzero, skip this number of results before returning data. Used with `$top` to provide pagination for large datasets.
104
- # @param orderBy [String] A comma separated list of sort statements in the format `(fieldname) [ASC|DESC]`, for example `id ASC`.
105
- # @return [Object]
106
- def query_tax_regions(options={})
107
- path = "/api/v2/compliance/taxregions"
108
- get(path, options)
109
- end
110
-
111
-
112
6
  # API to modify the reference fields at the document and the line level.
113
7
  #
114
8
  #
@@ -76,6 +76,7 @@ module AvaTax
76
76
  #
77
77
  # * Certificates - Fetch a list of certificates linked to this customer.
78
78
  # * CustomFields - Fetch a list of custom fields associated to this customer.
79
+ # * attributes - Retrieves all attributes applied to the customer.
79
80
  #
80
81
  # Using exemption certificates endpoints requires setup of an auditable document storage for each company that will use certificates.
81
82
  # Companies that do not have this storage system set up will receive the error `CertCaptureNotConfiguredError` when they call exemption
@@ -96,6 +97,38 @@ module AvaTax
96
97
  end
97
98
 
98
99
 
100
+ # Link attributes to a customer
101
+ #
102
+ # Link one or many attributes to a customer.
103
+ #
104
+ # A customer may have multiple attributes that control its behavior. You may link or unlink attributes to a
105
+ # customer at any time. The full list of defined attributes may be found using `QueryCompanyCustomerAttributes` API.
106
+ #
107
+ # A customer object defines information about a person or business that purchases products from your
108
+ # company. When you create a tax transaction in AvaTax, you can use the `customerCode` from this
109
+ # record in your `CreateTransaction` API call. AvaTax will search for this `customerCode` value and
110
+ # identify any certificates linked to this customer object. If any certificate applies to the transaction,
111
+ # AvaTax will record the appropriate elements of the transaction as exempt and link it to the `certificate`.
112
+ #
113
+ # Using exemption certificates endpoints requires setup of an auditable document storage for each company that will use certificates.
114
+ # Companies that do not have this storage system set up will receive the error `CertCaptureNotConfiguredError` when they call exemption
115
+ # certificate related APIs. To check if this company is set up, call `GetCertificateSetup`. To request setup of the auditable document
116
+ # storage for this company, call `RequestCertificateSetup`.
117
+ #
118
+ # ### Security Policies
119
+ #
120
+ # * This API requires one of the following user roles: AccountAdmin, AccountOperator, AccountUser, CompanyAdmin, CompanyUser, CSPTester, SSTAdmin, TechnicalSupportAdmin.
121
+ # * This API depends on the following active services<br />*Required* (all): AvaTaxPro.
122
+ # @param companyId [Integer] The unique ID number of the company that recorded the provided customer
123
+ # @param customerCode [String] The unique code representing the current customer
124
+ # @param model [CustomerAttributeModel[]] The list of attributes to link to the customer.
125
+ # @return [FetchResult]
126
+ def link_attributes_to_customer(companyId, customerCode, model)
127
+ path = "/api/v2/companies/#{companyId}/customers/#{customerCode}/attributes/link"
128
+ put(path, model)
129
+ end
130
+
131
+
99
132
  # Link certificates to a customer
100
133
  #
101
134
  # Link one or more certificates to a customer.
@@ -155,6 +188,37 @@ module AvaTax
155
188
  end
156
189
 
157
190
 
191
+ # Retrieve a customer's attributes
192
+ #
193
+ # Retrieve the attributes linked to the customer identified by this URL.
194
+ #
195
+ # A customer may have multiple attributes that control its behavior. You may link or unlink attributes to a
196
+ # customer at any time. The full list of defined attributes may be found using `QueryCompanyCustomerAttributes` API.
197
+ #
198
+ # A customer object defines information about a person or business that purchases products from your
199
+ # company. When you create a tax transaction in AvaTax, you can use the `customerCode` from this
200
+ # record in your `CreateTransaction` API call. AvaTax will search for this `customerCode` value and
201
+ # identify any certificates linked to this customer object. If any certificate applies to the transaction,
202
+ # AvaTax will record the appropriate elements of the transaction as exempt and link it to the `certificate`.
203
+ #
204
+ # Using exemption certificates endpoints requires setup of an auditable document storage for each company that will use certificates.
205
+ # Companies that do not have this storage system set up will receive the error `CertCaptureNotConfiguredError` when they call exemption
206
+ # certificate related APIs. To check if this company is set up, call `GetCertificateSetup`. To request setup of the auditable document
207
+ # storage for this company, call `RequestCertificateSetup`.
208
+ #
209
+ # ### Security Policies
210
+ #
211
+ # * This API requires one of the following user roles: AccountAdmin, AccountOperator, AccountUser, CompanyAdmin, CompanyUser, CSPTester, SSTAdmin, TechnicalSupportAdmin, TechnicalSupportUser.
212
+ # * This API depends on the following active services<br />*Required* (all): AvaTaxPro.
213
+ # @param companyId [Integer] The unique ID number of the company that recorded the provided customer
214
+ # @param customerCode [String] The unique code representing the current customer
215
+ # @return [FetchResult]
216
+ def list_attributes_for_customer(companyId, customerCode)
217
+ path = "/api/v2/companies/#{companyId}/customers/#{customerCode}/attributes"
218
+ get(path)
219
+ end
220
+
221
+
158
222
  # List certificates linked to a customer
159
223
  #
160
224
  # List all certificates linked to a customer.
@@ -177,7 +241,7 @@ module AvaTax
177
241
  # @param companyId [Integer] The unique ID number of the company that recorded this customer
178
242
  # @param customerCode [String] The unique code representing this customer
179
243
  # @param include [String] 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.
180
- # @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:* status, pdf, pages
244
+ # @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:* exemptionNumber, status, ecmsId, ecmsStatus, pdf, pages
181
245
  # @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.
182
246
  # @param skip [Integer] If nonzero, skip this number of results before returning data. Used with `$top` to provide pagination for large datasets.
183
247
  # @param orderBy [String] A comma separated list of sort statements in the format `(fieldname) [ASC|DESC]`, for example `id ASC`.
@@ -188,7 +252,7 @@ module AvaTax
188
252
  end
189
253
 
190
254
 
191
- # List active certificates for a location
255
+ # List valid certificates for a location
192
256
  #
193
257
  # List valid certificates linked to a customer in a particular country and region.
194
258
  #
@@ -234,6 +298,7 @@ module AvaTax
234
298
  # You can use the `$include` parameter to fetch the following additional objects for expansion:
235
299
  #
236
300
  # * Certificates - Fetch a list of certificates linked to this customer.
301
+ # * attributes - Retrieves all attributes applied to the customer.
237
302
  #
238
303
  # Using exemption certificates endpoints requires setup of an auditable document storage for each company that will use certificates.
239
304
  # Companies that do not have this storage system set up will receive the error `CertCaptureNotConfiguredError` when they call exemption
@@ -257,6 +322,38 @@ module AvaTax
257
322
  end
258
323
 
259
324
 
325
+ # Unlink attributes from a customer
326
+ #
327
+ # Unlink one or many attributes from a customer.
328
+ #
329
+ # A customer may have multiple attributes that control its behavior. You may link or unlink attributes to a
330
+ # customer at any time. The full list of defined attributes may be found using `QueryCompanyCustomerAttributes` API.
331
+ #
332
+ # A customer object defines information about a person or business that purchases products from your
333
+ # company. When you create a tax transaction in AvaTax, you can use the `customerCode` from this
334
+ # record in your `CreateTransaction` API call. AvaTax will search for this `customerCode` value and
335
+ # identify any certificates linked to this customer object. If any certificate applies to the transaction,
336
+ # AvaTax will record the appropriate elements of the transaction as exempt and link it to the `certificate`.
337
+ #
338
+ # Using exemption certificates endpoints requires setup of an auditable document storage for each company that will use certificates.
339
+ # Companies that do not have this storage system set up will receive the error `CertCaptureNotConfiguredError` when they call exemption
340
+ # certificate related APIs. To check if this company is set up, call `GetCertificateSetup`. To request setup of the auditable document
341
+ # storage for this company, call `RequestCertificateSetup`.
342
+ #
343
+ # ### Security Policies
344
+ #
345
+ # * This API requires one of the following user roles: AccountAdmin, AccountOperator, AccountUser, CompanyAdmin, CompanyUser, CSPTester, SSTAdmin, TechnicalSupportAdmin.
346
+ # * This API depends on the following active services<br />*Required* (all): AvaTaxPro.
347
+ # @param companyId [Integer] The unique ID number of the company that recorded the customer
348
+ # @param customerCode [String] The unique code representing the current customer
349
+ # @param model [CustomerAttributeModel[]] The list of attributes to unlink from the customer.
350
+ # @return [FetchResult]
351
+ def unlink_attributes_from_customer(companyId, customerCode, model)
352
+ path = "/api/v2/companies/#{companyId}/customers/#{customerCode}/attributes/unlink"
353
+ put(path, model)
354
+ end
355
+
356
+
260
357
  # Unlink certificates from a customer
261
358
  #
262
359
  # Remove one or more certificates to a customer.