avatax 20.9.0 → 21.10.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (48) hide show
  1. checksums.yaml +4 -4
  2. data/.vs/slnx.sqlite +0 -0
  3. data/lib/avatax/client/accounts.rb +83 -83
  4. data/lib/avatax/client/addresses.rb +21 -21
  5. data/lib/avatax/client/advancedrules.rb +41 -51
  6. data/lib/avatax/client/avafileforms.rb +41 -41
  7. data/lib/avatax/client/batches.rb +62 -62
  8. data/lib/avatax/client/certexpressinvites.rb +39 -39
  9. data/lib/avatax/client/certificates.rb +163 -163
  10. data/lib/avatax/client/companies.rb +157 -156
  11. data/lib/avatax/client/contacts.rb +48 -48
  12. data/lib/avatax/client/customers.rb +145 -145
  13. data/lib/avatax/client/datasources.rb +48 -48
  14. data/lib/avatax/client/definitions.rb +591 -422
  15. data/lib/avatax/client/distancethresholds.rb +48 -48
  16. data/lib/avatax/client/ecms.rb +26 -31
  17. data/lib/avatax/client/ecommercetoken.rb +17 -17
  18. data/lib/avatax/client/errortransactions.rb +27 -15
  19. data/lib/avatax/client/filingcalendars.rb +48 -12
  20. data/lib/avatax/client/filings.rb +23 -21
  21. data/lib/avatax/client/firmclientlinkages.rb +69 -69
  22. data/lib/avatax/client/free.rb +13 -86
  23. data/lib/avatax/client/fundingrequests.rb +20 -20
  24. data/lib/avatax/client/items.rb +255 -137
  25. data/lib/avatax/client/jurisdictionoverrides.rb +48 -48
  26. data/lib/avatax/client/locations.rb +92 -92
  27. data/lib/avatax/client/multidocument.rb +78 -78
  28. data/lib/avatax/client/nexus.rb +133 -105
  29. data/lib/avatax/client/notices.rb +43 -504
  30. data/lib/avatax/client/notifications.rb +27 -27
  31. data/lib/avatax/client/provisioning.rb +20 -20
  32. data/lib/avatax/client/registrar.rb +85 -75
  33. data/lib/avatax/client/reports.rb +44 -35
  34. data/lib/avatax/client/settings.rb +55 -50
  35. data/lib/avatax/client/subscriptions.rb +27 -27
  36. data/lib/avatax/client/taxcodes.rb +48 -48
  37. data/lib/avatax/client/taxcontent.rb +90 -27
  38. data/lib/avatax/client/taxprofiles.rb +14 -10
  39. data/lib/avatax/client/taxrules.rb +50 -50
  40. data/lib/avatax/client/transactions.rb +155 -155
  41. data/lib/avatax/client/upcs.rb +48 -48
  42. data/lib/avatax/client/users.rb +64 -64
  43. data/lib/avatax/client/utilities.rb +27 -27
  44. data/lib/avatax/configuration.rb +1 -1
  45. data/lib/avatax/request.rb +11 -5
  46. data/lib/avatax/version.rb +1 -1
  47. data/spec/avatax/request_spec.rb +25 -0
  48. metadata +12 -4
@@ -1,22 +1,22 @@
1
- module AvaTax
2
- class Client
3
- module FirmClientLinkages
4
-
5
-
6
- # Approves linkage to a firm for a client account
7
- #
1
+ module AvaTax
2
+ class Client
3
+ module FirmClientLinkages
4
+
5
+
6
+ # Approves linkage to a firm for a client account
7
+ #
8
8
  # This API enables the account admin of a client account to approve linkage request by a firm.
9
9
  #
10
10
  # ### Security Policies
11
11
  #
12
- # * This API requires one of the following user roles: AccountAdmin, FirmAdmin, Registrar, SiteAdmin, SSTAdmin, SystemAdmin, TechnicalSupportAdmin.
12
+ # * This API requires one of the following user roles: AccountAdmin, FirmAdmin, Registrar, SiteAdmin, SSTAdmin, SystemAdmin, TechnicalSupportAdmin.
13
13
  # @param id [Integer]
14
- # @return [Object]
15
- def approve_firm_client_linkage(id) path = "/api/v2/firmclientlinkages/#{id}/approve"
16
- post(path) end
17
-
18
- # Request a new FirmClient account and create an approved linkage to it
19
- #
14
+ # @return [Object]
15
+ def approve_firm_client_linkage(id) path = "/api/v2/firmclientlinkages/#{id}/approve"
16
+ post(path) end
17
+
18
+ # Request a new FirmClient account and create an approved linkage to it
19
+ #
20
20
  # This API is for use by Firms only.
21
21
  #
22
22
  # Avalara allows firms to manage returns for clients without the clients needing to use AvaTax service.
@@ -30,95 +30,95 @@ module AvaTax
30
30
  #
31
31
  # ### Security Policies
32
32
  #
33
- # * This API requires one of the following user roles: FirmAdmin, Registrar, SiteAdmin, SystemAdmin.
33
+ # * This API requires one of the following user roles: FirmAdmin, Registrar, SiteAdmin, SystemAdmin.
34
34
  # @param model [Object] Information about the account you wish to create.
35
- # @return [Object]
36
- def create_and_link_new_firm_client_account(model) path = "/api/v2/firmclientlinkages/createandlinkclient"
37
- post(path, model) end
38
-
39
- # Links a firm account with the client account
40
- #
35
+ # @return [Object]
36
+ def create_and_link_new_firm_client_account(model) path = "/api/v2/firmclientlinkages/createandlinkclient"
37
+ post(path, model) end
38
+
39
+ # Links a firm account with the client account
40
+ #
41
41
  # This API enables the firm admins/firm users to request the linkage of a firm account and a client account.
42
42
  #
43
43
  # ### Security Policies
44
44
  #
45
- # * This API requires one of the following user roles: FirmAdmin, Registrar, SiteAdmin, SSTAdmin, SystemAdmin, TechnicalSupportAdmin.
45
+ # * This API requires one of the following user roles: FirmAdmin, Registrar, SiteAdmin, SSTAdmin, SystemAdmin, TechnicalSupportAdmin.
46
46
  # @param model [Object] FirmClientLinkageInputModel
47
- # @return [Object]
48
- def create_firm_client_linkage(model) path = "/api/v2/firmclientlinkages"
49
- post(path, model) end
50
-
51
- # Delete a linkage
52
- #
47
+ # @return [Object]
48
+ def create_firm_client_linkage(model) path = "/api/v2/firmclientlinkages"
49
+ post(path, model) end
50
+
51
+ # Delete a linkage
52
+ #
53
53
  # This API marks a linkage between a firm and client as deleted.
54
54
  #
55
55
  # ### Security Policies
56
56
  #
57
- # * This API requires one of the following user roles: FirmAdmin, Registrar, SiteAdmin, SSTAdmin, SystemAdmin, TechnicalSupportAdmin.
57
+ # * This API requires one of the following user roles: FirmAdmin, Registrar, SiteAdmin, SSTAdmin, SystemAdmin, TechnicalSupportAdmin.
58
58
  # @param id [Integer]
59
- # @return [ErrorDetail[]]
60
- def delete_firm_client_linkage(id) path = "/api/v2/firmclientlinkages/#{id}"
61
- delete(path) end
62
-
63
- # Get linkage between a firm and client by id
64
- #
59
+ # @return [ErrorDetail[]]
60
+ def delete_firm_client_linkage(id) path = "/api/v2/firmclientlinkages/#{id}"
61
+ delete(path) end
62
+
63
+ # Get linkage between a firm and client by id
64
+ #
65
65
  # This API enables the firm admins/firm users to request the linkage of a firm account and a client account.
66
66
  #
67
67
  # ### Security Policies
68
68
  #
69
- # * This API requires one of the following user roles: AccountAdmin, AccountUser, CompanyAdmin, CompanyUser, Compliance Root User, ComplianceAdmin, ComplianceUser, CSPAdmin, CSPTester, FirmAdmin, FirmUser, Registrar, SiteAdmin, SSTAdmin, SystemAdmin, TechnicalSupportAdmin, TechnicalSupportUser, TreasuryAdmin, TreasuryUser.
69
+ # * This API requires one of the following user roles: AccountAdmin, AccountUser, CompanyAdmin, CompanyUser, Compliance Root User, ComplianceAdmin, ComplianceUser, CSPAdmin, CSPTester, FirmAdmin, FirmUser, Registrar, SiteAdmin, SSTAdmin, SystemAdmin, TechnicalSupportAdmin, TechnicalSupportUser, TreasuryAdmin, TreasuryUser.
70
70
  # @param id [Integer]
71
- # @return [Object]
72
- def get_firm_client_linkage(id) path = "/api/v2/firmclientlinkages/#{id}"
73
- get(path) end
74
-
75
- # List client linkages for a firm or client
76
- #
71
+ # @return [Object]
72
+ def get_firm_client_linkage(id) path = "/api/v2/firmclientlinkages/#{id}"
73
+ get(path) end
74
+
75
+ # List client linkages for a firm or client
76
+ #
77
77
  # This API enables the firm or account users to request the associated linkages to the account.
78
78
  #
79
79
  # ### Security Policies
80
80
  #
81
- # * This API requires one of the following user roles: AccountAdmin, AccountUser, CompanyAdmin, CompanyUser, Compliance Root User, ComplianceAdmin, ComplianceUser, CSPAdmin, CSPTester, FirmAdmin, FirmUser, Registrar, SiteAdmin, SSTAdmin, SystemAdmin, TechnicalSupportAdmin, TechnicalSupportUser, TreasuryAdmin, TreasuryUser.
81
+ # * This API requires one of the following user roles: AccountAdmin, AccountUser, CompanyAdmin, CompanyUser, Compliance Root User, ComplianceAdmin, ComplianceUser, CSPAdmin, CSPTester, FirmAdmin, FirmUser, Registrar, SiteAdmin, SSTAdmin, SystemAdmin, TechnicalSupportAdmin, TechnicalSupportUser, TreasuryAdmin, TreasuryUser.
82
82
  # @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:* firmAccountName, clientAccountName
83
- # @return [FetchResult]
84
- def list_firm_client_linkage(options={}) path = "/api/v2/firmclientlinkages"
85
- get(path, options) end
86
-
87
- # Rejects linkage to a firm for a client account
88
- #
83
+ # @return [FetchResult]
84
+ def list_firm_client_linkage(options={}) path = "/api/v2/firmclientlinkages"
85
+ get(path, options) end
86
+
87
+ # Rejects linkage to a firm for a client account
88
+ #
89
89
  # This API enables the account admin of a client account to reject linkage request by a firm.
90
90
  #
91
91
  # ### Security Policies
92
92
  #
93
- # * This API requires one of the following user roles: AccountAdmin, FirmAdmin, Registrar, SiteAdmin, SSTAdmin, SystemAdmin, TechnicalSupportAdmin.
93
+ # * This API requires one of the following user roles: AccountAdmin, FirmAdmin, Registrar, SiteAdmin, SSTAdmin, SystemAdmin, TechnicalSupportAdmin.
94
94
  # @param id [Integer]
95
- # @return [Object]
96
- def reject_firm_client_linkage(id) path = "/api/v2/firmclientlinkages/#{id}/reject"
97
- post(path) end
98
-
99
- # Reset linkage status between a client and firm back to requested
100
- #
95
+ # @return [Object]
96
+ def reject_firm_client_linkage(id) path = "/api/v2/firmclientlinkages/#{id}/reject"
97
+ post(path) end
98
+
99
+ # Reset linkage status between a client and firm back to requested
100
+ #
101
101
  # This API enables the firm admin of a client account to reset a previously created linkage request by a firm.
102
102
  #
103
103
  # ### Security Policies
104
104
  #
105
- # * This API requires one of the following user roles: FirmAdmin, Registrar, SiteAdmin, SSTAdmin, SystemAdmin, TechnicalSupportAdmin.
105
+ # * This API requires one of the following user roles: FirmAdmin, Registrar, SiteAdmin, SSTAdmin, SystemAdmin, TechnicalSupportAdmin.
106
106
  # @param id [Integer]
107
- # @return [Object]
108
- def reset_firm_client_linkage(id) path = "/api/v2/firmclientlinkages/#{id}/reset"
109
- post(path) end
110
-
111
- # Revokes previously approved linkage to a firm for a client account
112
- #
107
+ # @return [Object]
108
+ def reset_firm_client_linkage(id) path = "/api/v2/firmclientlinkages/#{id}/reset"
109
+ post(path) end
110
+
111
+ # Revokes previously approved linkage to a firm for a client account
112
+ #
113
113
  # This API enables the account admin of a client account to revoke a previously approved linkage request by a firm.
114
114
  #
115
115
  # ### Security Policies
116
116
  #
117
- # * This API requires one of the following user roles: AccountAdmin, FirmAdmin, Registrar, SiteAdmin, SSTAdmin, SystemAdmin, TechnicalSupportAdmin.
117
+ # * This API requires one of the following user roles: AccountAdmin, FirmAdmin, Registrar, SiteAdmin, SSTAdmin, SystemAdmin, TechnicalSupportAdmin.
118
118
  # @param id [Integer]
119
- # @return [Object]
120
- def revoke_firm_client_linkage(id) path = "/api/v2/firmclientlinkages/#{id}/revoke"
121
- post(path) end
122
- end
123
- end
119
+ # @return [Object]
120
+ def revoke_firm_client_linkage(id) path = "/api/v2/firmclientlinkages/#{id}/revoke"
121
+ post(path) end
122
+ end
123
+ end
124
124
  end
@@ -1,10 +1,10 @@
1
- module AvaTax
2
- class Client
3
- module Free
4
-
5
-
6
- # FREE API - Request a free trial of AvaTax
7
- #
1
+ module AvaTax
2
+ class Client
3
+ module Free
4
+
5
+
6
+ # FREE API - Request a free trial of AvaTax
7
+ #
8
8
  # Call this API to obtain a free AvaTax account.
9
9
  #
10
10
  # This API is free to use. No authentication credentials are required to call this API. You must read and
@@ -18,84 +18,11 @@ module AvaTax
18
18
  #
19
19
  # ### Security Policies
20
20
  #
21
- # * This API may be called without providing authentication credentials.
21
+ # * This API may be called without providing authentication credentials.
22
22
  # @param model [Object] Required information to provision a free trial account.
23
- # @return [Object]
24
- def request_free_trial(model) path = "/api/v2/accounts/freetrials/request"
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
- end
100
- end
23
+ # @return [Object]
24
+ def request_free_trial(model) path = "/api/v2/accounts/freetrials/request"
25
+ post(path, model) end
26
+ end
27
+ end
101
28
  end
@@ -1,10 +1,10 @@
1
- module AvaTax
2
- class Client
3
- module FundingRequests
4
-
5
-
6
- # Request the javascript for a funding setup widget
7
- #
1
+ module AvaTax
2
+ class Client
3
+ module FundingRequests
4
+
5
+
6
+ # Request the javascript for a funding setup widget
7
+ #
8
8
  # This API is available by invitation only.
9
9
  # Companies that use the Avalara Managed Returns or the SST Certified Service Provider services are
10
10
  # required to setup their funding configuration before Avalara can begin filing tax returns on their
@@ -21,14 +21,14 @@ 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
- # @return [Object]
27
- def activate_funding_request(id) path = "/api/v2/fundingrequests/#{id}/widget"
28
- get(path) end
29
-
30
- # Retrieve status about a funding setup request
31
- #
26
+ # @return [Object]
27
+ def activate_funding_request(id) path = "/api/v2/fundingrequests/#{id}/widget"
28
+ get(path) end
29
+
30
+ # Retrieve status about a funding setup request
31
+ #
32
32
  # This API is available by invitation only.
33
33
  # Companies that use the Avalara Managed Returns or the SST Certified Service Provider services are
34
34
  # required to setup their funding configuration before Avalara can begin filing tax returns on their
@@ -43,11 +43,11 @@ 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
- # @return [Object]
49
- def funding_request_status(id) path = "/api/v2/fundingrequests/#{id}"
50
- get(path) end
51
- end
52
- end
48
+ # @return [Object]
49
+ def funding_request_status(id) path = "/api/v2/fundingrequests/#{id}"
50
+ get(path) end
51
+ end
52
+ end
53
53
  end