avatax 21.8.0 → 22.2.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.
Files changed (75) hide show
  1. checksums.yaml +4 -4
  2. data/.gitignore +55 -55
  3. data/.rspec +1 -1
  4. data/.travis.yml +18 -18
  5. data/.vs/VSWorkspaceState.json +5 -5
  6. data/.yardopts +4 -4
  7. data/Gemfile +2 -2
  8. data/LICENSE +201 -201
  9. data/README.md +98 -98
  10. data/Rakefile +9 -9
  11. data/avatax.gemspec +38 -38
  12. data/example/avatax.rb +47 -47
  13. data/example/credentials.example.yaml +5 -5
  14. data/lib/avatax/api.rb +27 -27
  15. data/lib/avatax/client/accounts.rb +94 -83
  16. data/lib/avatax/client/addresses.rb +22 -20
  17. data/lib/avatax/client/advancedrules.rb +46 -41
  18. data/lib/avatax/client/ageverification.rb +29 -0
  19. data/lib/avatax/client/avafileforms.rb +46 -41
  20. data/lib/avatax/client/batches.rb +70 -62
  21. data/lib/avatax/client/certexpressinvites.rb +30 -27
  22. data/lib/avatax/client/certificates.rb +126 -111
  23. data/lib/avatax/client/companies.rb +192 -152
  24. data/lib/avatax/client/compliance.rb +25 -14
  25. data/lib/avatax/client/contacts.rb +54 -48
  26. data/lib/avatax/client/customers.rb +110 -97
  27. data/lib/avatax/client/datasources.rb +54 -48
  28. data/lib/avatax/client/definitions.rb +620 -446
  29. data/lib/avatax/client/distancethresholds.rb +54 -48
  30. data/lib/avatax/client/ecms.rb +73 -73
  31. data/lib/avatax/client/ecommercetoken.rb +20 -18
  32. data/lib/avatax/client/errortransactions.rb +61 -61
  33. data/lib/avatax/client/filingcalendars.rb +44 -20
  34. data/lib/avatax/client/filings.rb +24 -20
  35. data/lib/avatax/client/firmclientlinkages.rb +78 -69
  36. data/lib/avatax/client/free.rb +14 -13
  37. data/lib/avatax/client/fundingrequests.rb +22 -20
  38. data/lib/avatax/client/items.rb +206 -181
  39. data/lib/avatax/client/jurisdictionoverrides.rb +54 -48
  40. data/lib/avatax/client/locations.rb +102 -90
  41. data/lib/avatax/client/multidocument.rb +86 -76
  42. data/lib/avatax/client/nexus.rb +146 -103
  43. data/lib/avatax/client/notices.rb +30 -26
  44. data/lib/avatax/client/notifications.rb +30 -27
  45. data/lib/avatax/client/onboarding.rb +55 -55
  46. data/lib/avatax/client/pointofsale.rb +21 -21
  47. data/lib/avatax/client/provisioning.rb +22 -20
  48. data/lib/avatax/client/registrar.rb +94 -83
  49. data/lib/avatax/client/reports.rb +38 -34
  50. data/lib/avatax/client/settings.rb +54 -48
  51. data/lib/avatax/client/shippingverification.rb +66 -0
  52. data/lib/avatax/client/subscriptions.rb +30 -27
  53. data/lib/avatax/client/taxcodes.rb +54 -48
  54. data/lib/avatax/client/taxcontent.rb +46 -41
  55. data/lib/avatax/client/taxprofiles.rb +42 -42
  56. data/lib/avatax/client/taxrules.rb +56 -50
  57. data/lib/avatax/client/transactions.rb +174 -153
  58. data/lib/avatax/client/upcs.rb +54 -48
  59. data/lib/avatax/client/userdefinedfields.rb +52 -0
  60. data/lib/avatax/client/users.rb +70 -62
  61. data/lib/avatax/client/utilities.rb +30 -27
  62. data/lib/avatax/client.rb +37 -35
  63. data/lib/avatax/configuration.rb +76 -76
  64. data/lib/avatax/connection.rb +49 -49
  65. data/lib/avatax/request.rb +51 -42
  66. data/lib/avatax/version.rb +3 -3
  67. data/lib/avatax.rb +26 -26
  68. data/spec/avatax/client/accounts_spec.rb +13 -13
  69. data/spec/avatax/client/transactions_spec.rb +80 -80
  70. data/spec/avatax/request_spec.rb +25 -25
  71. data/spec/avatax_spec.rb +45 -45
  72. data/spec/credentials.yaml.example +4 -4
  73. data/spec/fixtures/accounts.json +15 -15
  74. data/spec/spec_helper.rb +27 -27
  75. metadata +9 -13
@@ -1,26 +1,30 @@
1
- module AvaTax
2
- class Client
3
- module Filings
4
-
5
-
6
- # Retrieve a filing containing the return and all its accrual returns.
7
- #
1
+ module AvaTax
2
+ class Client
3
+ module Filings
4
+
5
+
6
+ # Retrieve a filing containing the return and all its accrual returns.
7
+ #
8
8
  # ### Security Policies
9
9
  #
10
- # * This API requires one of the following user roles: AccountAdmin, CompanyAdmin, Compliance Root User, ComplianceAdmin, ComplianceUser, CSPTester, FirmAdmin, FirmUser, SSTAdmin, TechnicalSupportAdmin, TechnicalSupportUser, TreasuryAdmin, TreasuryUser.
10
+ # * This API requires openId bearer token for authentication
11
+ # * This API requires one of the following user roles: AccountAdmin, CompanyAdmin, Compliance Root User, ComplianceAdmin, ComplianceUser, CSPTester, FirmAdmin, FirmUser, SSTAdmin, TechnicalSupportAdmin, TechnicalSupportUser, TreasuryAdmin, TreasuryUser.
12
+ # Swagger Name: AvaTaxClient
11
13
  # @param companyId [Integer] The ID of the company that owns these returns
12
14
  # @param filingReturnId [Integer] The ID of the filing return
13
- # @return [FetchResult]
14
- def get_accrual_filings(companyId, filingReturnId) path = "/api/v2/companies/#{companyId}/filings/accrual/#{filingReturnId}"
15
- get(path) end
16
-
17
- # Retrieve a list of filed returns for the specified company in the year and month of a given filing period.
18
- #
15
+ # @return [FetchResult]
16
+ def get_accrual_filings(companyId, filingReturnId) path = "/api/v2/companies/#{companyId}/filings/accrual/#{filingReturnId}"
17
+ get(path, {}, "22.2.0") end
18
+
19
+ # Retrieve a list of filed returns for the specified company in the year and month of a given filing period.
20
+ #
19
21
  # ### Security Policies
20
22
  #
23
+ # * This API requires openId bearer token for authentication
21
24
  # * 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
25
  # * 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.
26
+ # * 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.
27
+ # Swagger Name: AvaTaxClient
24
28
  # @param companyId [Integer] The ID of the company that owns these batches
25
29
  # @param endPeriodMonth [Integer] The month of the period you are trying to retrieve
26
30
  # @param endPeriodYear [Integer] The year of the period you are trying to retrieve
@@ -30,9 +34,9 @@ module AvaTax
30
34
  # @param region [String] The region of the return(s) you are trying to retrieve
31
35
  # @param filingCalendarId [Integer] The filing calendar id of the return you are trying to retrieve
32
36
  # @param taxformCode [String] The unique tax form code of the form.
33
- # @return [FetchResult]
34
- def get_filed_returns(companyId, options={}) path = "/api/v2/companies/#{companyId}/filings/returns/filed"
35
- get(path, options) end
36
- end
37
- end
37
+ # @return [FetchResult]
38
+ def get_filed_returns(companyId, options={}) path = "/api/v2/companies/#{companyId}/filings/returns/filed"
39
+ get(path, options, "22.2.0") end
40
+ end
41
+ end
38
42
  end
@@ -1,22 +1,23 @@
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
+ # Swagger Name: AvaTaxClient
13
14
  # @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
- #
15
+ # @return [Object]
16
+ def approve_firm_client_linkage(id) path = "/api/v2/firmclientlinkages/#{id}/approve"
17
+ post(path, {}, "22.2.0") end
18
+
19
+ # Request a new FirmClient account and create an approved linkage to it
20
+ #
20
21
  # This API is for use by Firms only.
21
22
  #
22
23
  # Avalara allows firms to manage returns for clients without the clients needing to use AvaTax service.
@@ -30,95 +31,103 @@ module AvaTax
30
31
  #
31
32
  # ### Security Policies
32
33
  #
33
- # * This API requires one of the following user roles: FirmAdmin, Registrar, SiteAdmin, SystemAdmin.
34
+ # * This API requires one of the following user roles: FirmAdmin, Registrar, SiteAdmin, SystemAdmin.
35
+ # Swagger Name: AvaTaxClient
34
36
  # @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
- #
37
+ # @return [Object]
38
+ def create_and_link_new_firm_client_account(model) path = "/api/v2/firmclientlinkages/createandlinkclient"
39
+ post(path, model, {}, "22.2.0") end
40
+
41
+ # Links a firm account with the client account
42
+ #
41
43
  # This API enables the firm admins/firm users to request the linkage of a firm account and a client account.
42
44
  #
43
45
  # ### Security Policies
44
46
  #
45
- # * This API requires one of the following user roles: FirmAdmin, Registrar, SiteAdmin, SSTAdmin, SystemAdmin, TechnicalSupportAdmin.
47
+ # * This API requires one of the following user roles: FirmAdmin, Registrar, SiteAdmin, SSTAdmin, SystemAdmin, TechnicalSupportAdmin.
48
+ # Swagger Name: AvaTaxClient
46
49
  # @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
- #
50
+ # @return [Object]
51
+ def create_firm_client_linkage(model) path = "/api/v2/firmclientlinkages"
52
+ post(path, model, {}, "22.2.0") end
53
+
54
+ # Delete a linkage
55
+ #
53
56
  # This API marks a linkage between a firm and client as deleted.
54
57
  #
55
58
  # ### Security Policies
56
59
  #
57
- # * This API requires one of the following user roles: FirmAdmin, Registrar, SiteAdmin, SSTAdmin, SystemAdmin, TechnicalSupportAdmin.
60
+ # * This API requires one of the following user roles: FirmAdmin, Registrar, SiteAdmin, SSTAdmin, SystemAdmin, TechnicalSupportAdmin.
61
+ # Swagger Name: AvaTaxClient
58
62
  # @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
- #
63
+ # @return [ErrorDetail[]]
64
+ def delete_firm_client_linkage(id) path = "/api/v2/firmclientlinkages/#{id}"
65
+ delete(path, {}, "22.2.0") end
66
+
67
+ # Get linkage between a firm and client by id
68
+ #
65
69
  # This API enables the firm admins/firm users to request the linkage of a firm account and a client account.
66
70
  #
67
71
  # ### Security Policies
68
72
  #
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.
73
+ # * 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.
74
+ # Swagger Name: AvaTaxClient
70
75
  # @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
- #
76
+ # @return [Object]
77
+ def get_firm_client_linkage(id) path = "/api/v2/firmclientlinkages/#{id}"
78
+ get(path, {}, "22.2.0") end
79
+
80
+ # List client linkages for a firm or client
81
+ #
77
82
  # This API enables the firm or account users to request the associated linkages to the account.
78
83
  #
79
84
  # ### Security Policies
80
85
  #
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.
86
+ # * 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.
87
+ # Swagger Name: AvaTaxClient
82
88
  # @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
- #
89
+ # @return [FetchResult]
90
+ def list_firm_client_linkage(options={}) path = "/api/v2/firmclientlinkages"
91
+ get(path, options, "22.2.0") end
92
+
93
+ # Rejects linkage to a firm for a client account
94
+ #
89
95
  # This API enables the account admin of a client account to reject linkage request by a firm.
90
96
  #
91
97
  # ### Security Policies
92
98
  #
93
- # * This API requires one of the following user roles: AccountAdmin, FirmAdmin, Registrar, SiteAdmin, SSTAdmin, SystemAdmin, TechnicalSupportAdmin.
99
+ # * This API requires one of the following user roles: AccountAdmin, FirmAdmin, Registrar, SiteAdmin, SSTAdmin, SystemAdmin, TechnicalSupportAdmin.
100
+ # Swagger Name: AvaTaxClient
94
101
  # @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
- #
102
+ # @return [Object]
103
+ def reject_firm_client_linkage(id) path = "/api/v2/firmclientlinkages/#{id}/reject"
104
+ post(path, {}, "22.2.0") end
105
+
106
+ # Reset linkage status between a client and firm back to requested
107
+ #
101
108
  # This API enables the firm admin of a client account to reset a previously created linkage request by a firm.
102
109
  #
103
110
  # ### Security Policies
104
111
  #
105
- # * This API requires one of the following user roles: FirmAdmin, Registrar, SiteAdmin, SSTAdmin, SystemAdmin, TechnicalSupportAdmin.
112
+ # * This API requires one of the following user roles: FirmAdmin, Registrar, SiteAdmin, SSTAdmin, SystemAdmin, TechnicalSupportAdmin.
113
+ # Swagger Name: AvaTaxClient
106
114
  # @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
- #
115
+ # @return [Object]
116
+ def reset_firm_client_linkage(id) path = "/api/v2/firmclientlinkages/#{id}/reset"
117
+ post(path, {}, "22.2.0") end
118
+
119
+ # Revokes previously approved linkage to a firm for a client account
120
+ #
113
121
  # This API enables the account admin of a client account to revoke a previously approved linkage request by a firm.
114
122
  #
115
123
  # ### Security Policies
116
124
  #
117
- # * This API requires one of the following user roles: AccountAdmin, FirmAdmin, Registrar, SiteAdmin, SSTAdmin, SystemAdmin, TechnicalSupportAdmin.
125
+ # * This API requires one of the following user roles: AccountAdmin, FirmAdmin, Registrar, SiteAdmin, SSTAdmin, SystemAdmin, TechnicalSupportAdmin.
126
+ # Swagger Name: AvaTaxClient
118
127
  # @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
128
+ # @return [Object]
129
+ def revoke_firm_client_linkage(id) path = "/api/v2/firmclientlinkages/#{id}/revoke"
130
+ post(path, {}, "22.2.0") end
131
+ end
132
+ end
124
133
  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,11 +18,12 @@ 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
+ # Swagger Name: AvaTaxClient
22
23
  # @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
- end
27
- end
24
+ # @return [Object]
25
+ def request_free_trial(model) path = "/api/v2/accounts/freetrials/request"
26
+ post(path, model, {}, "22.2.0") end
27
+ end
28
+ end
28
29
  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,15 @@ 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:*Returns* (at least one of): Mrs, MRSComplianceManager, AvaTaxCsp.*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
+ # Swagger Name: AvaTaxClient
25
26
  # @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
- #
27
+ # @return [Object]
28
+ def activate_funding_request(id) path = "/api/v2/fundingrequests/#{id}/widget"
29
+ get(path, {}, "22.2.0") end
30
+
31
+ # Retrieve status about a funding setup request
32
+ #
32
33
  # This API is available by invitation only.
33
34
  # Companies that use the Avalara Managed Returns or the SST Certified Service Provider services are
34
35
  # required to setup their funding configuration before Avalara can begin filing tax returns on their
@@ -43,11 +44,12 @@ module AvaTax
43
44
  # ### Security Policies
44
45
  #
45
46
  # * 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:*Returns* (at least one of): Mrs, MRSComplianceManager, AvaTaxCsp.*Firm Managed* (for accounts managed by a firm): ARA, ARAManaged.
47
+ # * 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.
48
+ # Swagger Name: AvaTaxClient
47
49
  # @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
50
+ # @return [Object]
51
+ def funding_request_status(id) path = "/api/v2/fundingrequests/#{id}"
52
+ get(path, {}, "22.2.0") end
53
+ end
54
+ end
53
55
  end