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,10 +1,10 @@
1
- module AvaTax
2
- class Client
3
- module Companies
4
-
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
- #
1
+ module AvaTax
2
+ class Client
3
+ module Companies
4
+
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
8
  # Examines the most recent 100 transactions or data from the last month when verifying transaction-related integrations.
9
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
10
  # written integrations for a company are sufficient enough to be delivered to the respective customers to start using it.
@@ -31,14 +31,15 @@ module AvaTax
31
31
  #
32
32
  # ### Security Policies
33
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.
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
+ # Swagger Name: AvaTaxClient
35
36
  # @param id [Integer] The ID of the company to check if its integration is certified.
36
- # @return [String]
37
- def certify_integration(id) path = "/api/v2/companies/#{id}/certify"
38
- get(path) end
39
-
40
- # Change the filing status of this company
41
- #
37
+ # @return [String]
38
+ def certify_integration(id) path = "/api/v2/companies/#{id}/certify"
39
+ get(path, {}, "22.2.0") end
40
+
41
+ # Change the filing status of this company
42
+ #
42
43
  # Changes the current filing status of this company.
43
44
  #
44
45
  # For customers using Avalara's Managed Returns Service, each company within their account can request
@@ -55,15 +56,16 @@ module AvaTax
55
56
  #
56
57
  # ### Security Policies
57
58
  #
58
- # * 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.
59
+ # * 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.
60
+ # Swagger Name: AvaTaxClient
59
61
  # @param id [Integer]
60
62
  # @param model [Object]
61
- # @return [String]
62
- def change_filing_status(id, model) path = "/api/v2/companies/#{id}/filingstatus"
63
- post(path, model) end
64
-
65
- # Quick setup for a company with a single physical address
66
- #
63
+ # @return [String]
64
+ def change_filing_status(id, model) path = "/api/v2/companies/#{id}/filingstatus"
65
+ post(path, model, {}, "22.2.0") end
66
+
67
+ # Quick setup for a company with a single physical address
68
+ #
67
69
  # Shortcut to quickly setup a single-physical-location company with critical information and activate it.
68
70
  # This API provides quick and simple company setup functionality and does the following things:
69
71
  #
@@ -79,14 +81,15 @@ module AvaTax
79
81
  #
80
82
  # ### Security Policies
81
83
  #
82
- # * This API requires one of the following user roles: AccountAdmin, CompanyAdmin, CSPTester, FirmAdmin, Registrar, SiteAdmin, SSTAdmin, SystemAdmin, TechnicalSupportAdmin.
84
+ # * This API requires one of the following user roles: AccountAdmin, CompanyAdmin, CSPTester, FirmAdmin, Registrar, SiteAdmin, SSTAdmin, SystemAdmin, TechnicalSupportAdmin.
85
+ # Swagger Name: AvaTaxClient
83
86
  # @param model [Object] Information about the company you wish to create.
84
- # @return [Object]
85
- def company_initialize(model) path = "/api/v2/companies/initialize"
86
- post(path, model) end
87
-
88
- # Create new companies
89
- #
87
+ # @return [Object]
88
+ def company_initialize(model) path = "/api/v2/companies/initialize"
89
+ post(path, model, {}, "22.2.0") end
90
+
91
+ # Create new companies
92
+ #
90
93
  # Create one or more new company objects.
91
94
  # A 'company' represents a single corporation or individual that is registered to handle transactional taxes.
92
95
  # You may attach nested data objects such as contacts, locations, and nexus with this CREATE call, and those objects will be created with the company.
@@ -95,14 +98,15 @@ module AvaTax
95
98
  #
96
99
  # ### Security Policies
97
100
  #
98
- # * This API requires one of the following user roles: AccountAdmin, CompanyAdmin, CSPTester, FirmAdmin, Registrar, SiteAdmin, SSTAdmin, SystemAdmin, TechnicalSupportAdmin.
101
+ # * This API requires one of the following user roles: AccountAdmin, CompanyAdmin, CSPTester, FirmAdmin, Registrar, SiteAdmin, SSTAdmin, SystemAdmin, TechnicalSupportAdmin.
102
+ # Swagger Name: AvaTaxClient
99
103
  # @param model [CompanyModel[]] Either a single company object or an array of companies to create
100
- # @return [CompanyModel[]]
101
- def create_companies(model) path = "/api/v2/companies"
102
- post(path, model) end
103
-
104
- # Add parameters to a company.
105
- #
104
+ # @return [CompanyModel[]]
105
+ def create_companies(model) path = "/api/v2/companies"
106
+ post(path, model, {}, "22.2.0") end
107
+
108
+ # Add parameters to a company.
109
+ #
106
110
  # Add parameters to a company.
107
111
  #
108
112
  # Some companies can be taxed and reported differently depending on the properties of the company, such as IsPrimaryAddress. In AvaTax, these tax-affecting properties are called "parameters".
@@ -117,15 +121,16 @@ module AvaTax
117
121
  #
118
122
  # ### Security Policies
119
123
  #
120
- # * This API requires one of the following user roles: AccountAdmin, CompanyAdmin, CSPTester, FirmAdmin, Registrar, SiteAdmin, SSTAdmin, SystemAdmin, TechnicalSupportAdmin.
124
+ # * This API requires one of the following user roles: AccountAdmin, CompanyAdmin, CSPTester, FirmAdmin, Registrar, SiteAdmin, SSTAdmin, SystemAdmin, TechnicalSupportAdmin.
125
+ # Swagger Name: AvaTaxClient
121
126
  # @param companyId [Integer] The ID of the company that owns this company parameter.
122
127
  # @param model [CompanyParameterDetailModel[]] The company parameters you wish to create.
123
- # @return [CompanyParameterDetailModel[]]
124
- def create_company_parameters(companyId, model) path = "/api/v2/companies/#{companyId}/parameters"
125
- post(path, model) end
126
-
127
- # Request managed returns funding setup for a company
128
- #
128
+ # @return [CompanyParameterDetailModel[]]
129
+ def create_company_parameters(companyId, model) path = "/api/v2/companies/#{companyId}/parameters"
130
+ post(path, model, {}, "22.2.0") end
131
+
132
+ # Request managed returns funding setup for a company
133
+ #
129
134
  # This API is available by invitation only.
130
135
  # Companies that use the Avalara Managed Returns or the SST Certified Service Provider services are
131
136
  # required to setup their funding configuration before Avalara can begin filing tax returns on their
@@ -140,27 +145,29 @@ module AvaTax
140
145
  # ### Security Policies
141
146
  #
142
147
  # * This API depends on the following active services:*Returns* (at least one of): Mrs, MRSComplianceManager, AvaTaxCsp.
143
- # * 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.
148
+ # * 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.
149
+ # Swagger Name: AvaTaxClient
144
150
  # @param id [Integer] The unique identifier of the company
145
151
  # @param model [Object] The funding initialization request
146
- # @return [Object]
147
- def create_funding_request(id, model) path = "/api/v2/companies/#{id}/funding/setup"
148
- post(path, model) end
149
-
150
- # Delete a single company
151
- #
152
+ # @return [Object]
153
+ def create_funding_request(id, model) path = "/api/v2/companies/#{id}/funding/setup"
154
+ post(path, model, {}, "22.2.0") end
155
+
156
+ # Delete a single company
157
+ #
152
158
  # Deleting a company will delete all child companies, and all users attached to this company.
153
159
  #
154
160
  # ### Security Policies
155
161
  #
156
- # * This API requires one of the following user roles: AccountAdmin, CompanyAdmin, CSPTester, FirmAdmin, SSTAdmin, TechnicalSupportAdmin.
162
+ # * This API requires one of the following user roles: AccountAdmin, CompanyAdmin, CSPTester, FirmAdmin, SSTAdmin, TechnicalSupportAdmin.
163
+ # Swagger Name: AvaTaxClient
157
164
  # @param id [Integer] The ID of the company you wish to delete.
158
- # @return [ErrorDetail[]]
159
- def delete_company(id) path = "/api/v2/companies/#{id}"
160
- delete(path) end
161
-
162
- # Delete a single company parameter
163
- #
165
+ # @return [ErrorDetail[]]
166
+ def delete_company(id) path = "/api/v2/companies/#{id}"
167
+ delete(path, {}, "22.2.0") end
168
+
169
+ # Delete a single company parameter
170
+ #
164
171
  # Delete a parameter of a company.
165
172
  # Some companies can be taxed and reported differently depending on the properties of the company, such as IsPrimaryAddress. In AvaTax, these tax-affecting properties are called "parameters".
166
173
  #
@@ -170,15 +177,16 @@ module AvaTax
170
177
  #
171
178
  # ### Security Policies
172
179
  #
173
- # * This API requires one of the following user roles: AccountAdmin, CompanyAdmin, CSPTester, FirmAdmin, SSTAdmin, TechnicalSupportAdmin.
180
+ # * This API requires one of the following user roles: AccountAdmin, CompanyAdmin, CSPTester, FirmAdmin, SSTAdmin, TechnicalSupportAdmin.
181
+ # Swagger Name: AvaTaxClient
174
182
  # @param companyId [Integer] The company id
175
183
  # @param id [Integer] The parameter id
176
- # @return [ErrorDetail[]]
177
- def delete_company_parameter(companyId, id) path = "/api/v2/companies/#{companyId}/parameters/#{id}"
178
- delete(path) end
179
-
180
- # Check the funding configuration of a company
181
- #
184
+ # @return [ErrorDetail[]]
185
+ def delete_company_parameter(companyId, id) path = "/api/v2/companies/#{companyId}/parameters/#{id}"
186
+ delete(path, {}, "22.2.0") end
187
+
188
+ # Check the funding configuration of a company
189
+ #
182
190
  # This API is available by invitation only.
183
191
  # Requires a subscription to Avalara Managed Returns or SST Certified Service Provider.
184
192
  # Returns the funding configuration of the requested company.
@@ -187,14 +195,15 @@ module AvaTax
187
195
  # ### Security Policies
188
196
  #
189
197
  # * 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.
190
- # * 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.
198
+ # * 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.
199
+ # Swagger Name: AvaTaxClient
191
200
  # @param companyId [Integer] The unique identifier of the company
192
- # @return [Object]
193
- def funding_configuration_by_company(companyId) path = "/api/v2/companies/#{companyId}/funding/configuration"
194
- get(path) end
195
-
196
- # Check the funding configuration of a company
197
- #
201
+ # @return [Object]
202
+ def funding_configuration_by_company(companyId) path = "/api/v2/companies/#{companyId}/funding/configuration"
203
+ get(path, {}, "22.2.0") end
204
+
205
+ # Check the funding configuration of a company
206
+ #
198
207
  # This API is available by invitation only.
199
208
  # Requires a subscription to Avalara Managed Returns or SST Certified Service Provider.
200
209
  # Returns the funding configuration of the requested company.
@@ -203,15 +212,16 @@ module AvaTax
203
212
  # ### Security Policies
204
213
  #
205
214
  # * 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.
206
- # * 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.
215
+ # * 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.
216
+ # Swagger Name: AvaTaxClient
207
217
  # @param companyId [Integer] The unique identifier of the company
208
218
  # @param currency [String] The currency of the funding. USD and CAD are the only valid currencies
209
- # @return [FundingConfigurationModel[]]
210
- def funding_configurations_by_company_and_currency(companyId, options={}) path = "/api/v2/companies/#{companyId}/funding/configurations"
211
- get(path, options) end
212
-
213
- # Retrieve a single company
214
- #
219
+ # @return [FundingConfigurationModel[]]
220
+ def funding_configurations_by_company_and_currency(companyId, options={}) path = "/api/v2/companies/#{companyId}/funding/configurations"
221
+ get(path, options, "22.2.0") end
222
+
223
+ # Retrieve a single company
224
+ #
215
225
  # Get the company object identified by this URL.
216
226
  # A 'company' represents a single corporation or individual that is registered to handle transactional taxes.
217
227
  # 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:
@@ -228,15 +238,16 @@ module AvaTax
228
238
  #
229
239
  # ### Security Policies
230
240
  #
231
- # * 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.
241
+ # * 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.
242
+ # Swagger Name: AvaTaxClient
232
243
  # @param id [Integer] The ID of the company to retrieve.
233
244
  # @param include [String] OPTIONAL: A comma separated list of special fetch options. * Child objects - Specify one or more of the following to retrieve objects related to each company: "Contacts", "FilingCalendars", "Items", "Locations", "Nexus", "TaxCodes", "NonReportingChildren" or "TaxRules". * Deleted objects - Specify "FetchDeleted" to retrieve information about previously deleted objects.
234
- # @return [Object]
235
- def get_company(id, options={}) path = "/api/v2/companies/#{id}"
236
- get(path, options) end
237
-
238
- # Get configuration settings for this company
239
- #
245
+ # @return [Object]
246
+ def get_company(id, options={}) path = "/api/v2/companies/#{id}"
247
+ get(path, options, "22.2.0") end
248
+
249
+ # Get configuration settings for this company
250
+ #
240
251
  # Retrieve a list of all configuration settings tied to this company.
241
252
  #
242
253
  # Configuration settings provide you with the ability to control features of your account and of your
@@ -252,14 +263,15 @@ module AvaTax
252
263
  #
253
264
  # ### Security Policies
254
265
  #
255
- # * This API requires one of the following user roles: AccountAdmin, AccountUser, CompanyAdmin, CompanyUser, CSPAdmin, CSPTester, SiteAdmin, SSTAdmin, SystemAdmin, TechnicalSupportAdmin, TechnicalSupportUser.
266
+ # * This API requires one of the following user roles: AccountAdmin, AccountUser, CompanyAdmin, CompanyUser, CSPAdmin, CSPTester, SiteAdmin, SSTAdmin, SystemAdmin, TechnicalSupportAdmin, TechnicalSupportUser.
267
+ # Swagger Name: AvaTaxClient
256
268
  # @param id [Integer]
257
- # @return [CompanyConfigurationModel[]]
258
- def get_company_configuration(id) path = "/api/v2/companies/#{id}/configuration"
259
- get(path) end
260
-
261
- # Retrieve a single company parameter
262
- #
269
+ # @return [CompanyConfigurationModel[]]
270
+ def get_company_configuration(id) path = "/api/v2/companies/#{id}/configuration"
271
+ get(path, {}, "22.2.0") end
272
+
273
+ # Retrieve a single company parameter
274
+ #
263
275
  # Retrieves a single parameter of a company.
264
276
  #
265
277
  # Some companies can be taxed and reported differently depending on the properties of the company, such as IsPrimaryAddress. In AvaTax, these tax-affecting properties are called "parameters".
@@ -270,15 +282,16 @@ module AvaTax
270
282
  #
271
283
  # ### Security Policies
272
284
  #
273
- # * 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.
285
+ # * 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.
286
+ # Swagger Name: AvaTaxClient
274
287
  # @param companyId [Integer]
275
288
  # @param id [Integer]
276
- # @return [Object]
277
- def get_company_parameter_detail(companyId, id) path = "/api/v2/companies/#{companyId}/parameters/#{id}"
278
- get(path) end
279
-
280
- # Get this company's filing status
281
- #
289
+ # @return [Object]
290
+ def get_company_parameter_detail(companyId, id) path = "/api/v2/companies/#{companyId}/parameters/#{id}"
291
+ get(path, {}, "22.2.0") end
292
+
293
+ # Get this company's filing status
294
+ #
282
295
  # Retrieve the current filing status of this company.
283
296
  #
284
297
  # For customers using Avalara's Managed Returns Service, each company within their account can request
@@ -296,14 +309,34 @@ module AvaTax
296
309
  #
297
310
  # ### Security Policies
298
311
  #
299
- # * 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.
312
+ # * 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.
313
+ # Swagger Name: AvaTaxClient
300
314
  # @param id [Integer]
301
- # @return [String]
302
- def get_filing_status(id) path = "/api/v2/companies/#{id}/filingstatus"
303
- get(path) end
304
-
305
- # Retrieve parameters for a company
315
+ # @return [String]
316
+ def get_filing_status(id) path = "/api/v2/companies/#{id}/filingstatus"
317
+ get(path, {}, "22.2.0") end
318
+
319
+ # Get ACH entry detail report for company and period
320
+ #
321
+ # This API is available by invitation only.
322
+ # Requires a subscription to Avalara Managed Returns or SST Certified Service Provider.
323
+ # Returns a list of ACH entry details for the given company and period.
324
+ # Each object in the result is an ach entry trace record for a payment made on behalf of this company.
306
325
  #
326
+ # ### Security Policies
327
+ #
328
+ # * This API depends on the following active services:*Returns* (at least one of): Mrs, MRSComplianceManager, AvaTaxCsp.
329
+ # * 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.
330
+ # Swagger Name: AvaTaxClient
331
+ # @param id [Integer] The unique identifier of the company
332
+ # @param periodyear [Integer] The period year
333
+ # @param periodmonth [Integer] The period month
334
+ # @return [ACHEntryDetailModel[]]
335
+ def list_a_c_h_entry_details_for_company(id, periodyear, periodmonth) path = "/api/v2/companies/#{id}/paymentdetails/#{periodyear}/#{periodmonth}"
336
+ get(path, {}, "22.2.0") end
337
+
338
+ # Retrieve parameters for a company
339
+ #
307
340
  # Retrieve all parameters of a company.
308
341
  #
309
342
  # Some companies can be taxed and reported differently depending on the properties of the company, such as IsPrimaryAddress. In AvaTax, these tax-affecting properties are called "parameters".
@@ -317,18 +350,19 @@ module AvaTax
317
350
  #
318
351
  # ### Security Policies
319
352
  #
320
- # * 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.
353
+ # * 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.
354
+ # Swagger Name: AvaTaxClient
321
355
  # @param companyId [Integer] The company id
322
356
  # @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
323
357
  # @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.
324
358
  # @param skip [Integer] If nonzero, skip this number of results before returning data. Used with `$top` to provide pagination for large datasets.
325
359
  # @param orderBy [String] A comma separated list of sort statements in the format `(fieldname) [ASC|DESC]`, for example `id ASC`.
326
- # @return [FetchResult]
327
- def list_company_parameter_details(companyId, options={}) path = "/api/v2/companies/#{companyId}/parameters"
328
- get(path, options) end
329
-
330
- # Check managed returns funding status for a company
331
- #
360
+ # @return [FetchResult]
361
+ def list_company_parameter_details(companyId, options={}) path = "/api/v2/companies/#{companyId}/parameters"
362
+ get(path, options, "22.2.0") end
363
+
364
+ # Check managed returns funding status for a company
365
+ #
332
366
  # This API is available by invitation only.
333
367
  # Requires a subscription to Avalara Managed Returns or SST Certified Service Provider.
334
368
  # Returns a list of funding setup requests and their current status.
@@ -337,27 +371,29 @@ module AvaTax
337
371
  # ### Security Policies
338
372
  #
339
373
  # * This API depends on the following active services:*Returns* (at least one of): Mrs, MRSComplianceManager, AvaTaxCsp.
340
- # * 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.
374
+ # * 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.
375
+ # Swagger Name: AvaTaxClient
341
376
  # @param id [Integer] The unique identifier of the company
342
- # @return [FundingStatusModel[]]
343
- def list_funding_requests_by_company(id) path = "/api/v2/companies/#{id}/funding"
344
- get(path) end
345
-
346
- # Retrieve a list of MRS Companies with account
347
- #
377
+ # @return [FundingStatusModel[]]
378
+ def list_funding_requests_by_company(id) path = "/api/v2/companies/#{id}/funding"
379
+ get(path, {}, "22.2.0") end
380
+
381
+ # Retrieve a list of MRS Companies with account
382
+ #
348
383
  # This API is available by invitation only.
349
384
  #
350
385
  # Get a list of companies with an active MRS service.
351
386
  #
352
387
  # ### Security Policies
353
388
  #
354
- # * 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.
355
- # @return [FetchResult]
356
- def list_mrs_companies() path = "/api/v2/companies/mrs"
357
- get(path) end
358
-
359
- # Retrieve all companies
360
- #
389
+ # * 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.
390
+ # Swagger Name: AvaTaxClient
391
+ # @return [FetchResult]
392
+ def list_mrs_companies() path = "/api/v2/companies/mrs"
393
+ get(path, {}, "22.2.0") end
394
+
395
+ # Retrieve all companies
396
+ #
361
397
  # Get multiple company objects.
362
398
  #
363
399
  # A `company` represents a single corporation or individual that is registered to handle transactional taxes.
@@ -378,18 +414,19 @@ module AvaTax
378
414
  #
379
415
  # ### Security Policies
380
416
  #
381
- # * 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.
417
+ # * 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.
418
+ # Swagger Name: AvaTaxClient
382
419
  # @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.
383
420
  # @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, parameters, supplierandcustomers
384
421
  # @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.
385
422
  # @param skip [Integer] If nonzero, skip this number of results before returning data. Used with `$top` to provide pagination for large datasets.
386
423
  # @param orderBy [String] A comma separated list of sort statements in the format `(fieldname) [ASC|DESC]`, for example `id ASC`.
387
- # @return [FetchResult]
388
- def query_companies(options={}) path = "/api/v2/companies"
389
- get(path, options) end
390
-
391
- # Change configuration settings for this company
392
- #
424
+ # @return [FetchResult]
425
+ def query_companies(options={}) path = "/api/v2/companies"
426
+ get(path, options, "22.2.0") end
427
+
428
+ # Change configuration settings for this company
429
+ #
393
430
  # Update configuration settings tied to this company.
394
431
  #
395
432
  # Configuration settings provide you with the ability to control features of your account and of your
@@ -405,15 +442,16 @@ module AvaTax
405
442
  #
406
443
  # ### Security Policies
407
444
  #
408
- # * This API requires one of the following user roles: AccountAdmin, CompanyAdmin, CSPTester, SSTAdmin, TechnicalSupportAdmin.
445
+ # * This API requires one of the following user roles: AccountAdmin, CompanyAdmin, CSPTester, SSTAdmin, TechnicalSupportAdmin.
446
+ # Swagger Name: AvaTaxClient
409
447
  # @param id [Integer]
410
448
  # @param model [CompanyConfigurationModel[]]
411
- # @return [CompanyConfigurationModel[]]
412
- def set_company_configuration(id, model) path = "/api/v2/companies/#{id}/configuration"
413
- post(path, model) end
414
-
415
- # Update a single company
416
- #
449
+ # @return [CompanyConfigurationModel[]]
450
+ def set_company_configuration(id, model) path = "/api/v2/companies/#{id}/configuration"
451
+ post(path, model, {}, "22.2.0") end
452
+
453
+ # Update a single company
454
+ #
417
455
  # Replace the existing company object at this URL with an updated object.
418
456
  #
419
457
  # A `CompanyModel` represents a single corporation or individual that is registered to handle transactional taxes.
@@ -428,15 +466,16 @@ module AvaTax
428
466
  #
429
467
  # ### Security Policies
430
468
  #
431
- # * This API requires one of the following user roles: AccountAdmin, CompanyAdmin, CSPTester, FirmAdmin, Registrar, SiteAdmin, SSTAdmin, SystemAdmin, TechnicalSupportAdmin.
469
+ # * This API requires one of the following user roles: AccountAdmin, CompanyAdmin, CSPTester, FirmAdmin, Registrar, SiteAdmin, SSTAdmin, SystemAdmin, TechnicalSupportAdmin.
470
+ # Swagger Name: AvaTaxClient
432
471
  # @param id [Integer] The ID of the company you wish to update.
433
472
  # @param model [Object] The company object you wish to update.
434
- # @return [Object]
435
- def update_company(id, model) path = "/api/v2/companies/#{id}"
436
- put(path, model) end
437
-
438
- # Update a company parameter
439
- #
473
+ # @return [Object]
474
+ def update_company(id, model) path = "/api/v2/companies/#{id}"
475
+ put(path, model, {}, "22.2.0") end
476
+
477
+ # Update a company parameter
478
+ #
440
479
  # Update a parameter of a company.
441
480
  #
442
481
  # Some companies can be taxed and reported differently depending on the properties of the company, such as IsPrimaryAddress. In AvaTax, these tax-affecting properties are called "parameters".
@@ -447,13 +486,14 @@ module AvaTax
447
486
  #
448
487
  # ### Security Policies
449
488
  #
450
- # * This API requires one of the following user roles: AccountAdmin, CompanyAdmin, CSPTester, FirmAdmin, Registrar, SiteAdmin, SSTAdmin, SystemAdmin, TechnicalSupportAdmin.
489
+ # * This API requires one of the following user roles: AccountAdmin, CompanyAdmin, CSPTester, FirmAdmin, Registrar, SiteAdmin, SSTAdmin, SystemAdmin, TechnicalSupportAdmin.
490
+ # Swagger Name: AvaTaxClient
451
491
  # @param companyId [Integer] The company id.
452
492
  # @param id [Integer] The company parameter id
453
493
  # @param model [Object] The company parameter object you wish to update.
454
- # @return [Object]
455
- def update_company_parameter_detail(companyId, id, model) path = "/api/v2/companies/#{companyId}/parameters/#{id}"
456
- put(path, model) end
457
- end
458
- end
494
+ # @return [Object]
495
+ def update_company_parameter_detail(companyId, id, model) path = "/api/v2/companies/#{companyId}/parameters/#{id}"
496
+ put(path, model, {}, "22.2.0") end
497
+ end
498
+ end
459
499
  end
@@ -1,16 +1,27 @@
1
- module AvaTax
2
- class Client
3
- module Compliance
4
-
5
-
6
- # API to modify the reference fields at the document and the line level.
1
+ module AvaTax
2
+ class Client
3
+ module Compliance
4
+
5
+
6
+ # Retrieve jurisdiction rate information for tax authority
7
+ #
8
+ # This API is available by invitation only.
7
9
  #
8
- #
9
- # @param companyId [Integer]
10
- # @param model [TransactionReferenceFieldModel[]]
11
- # @return [FetchResult]
12
- def tag_transaction(companyId, model) path = "/api/v2/companies/#{companyId}/transactions/tag"
13
- put(path, model) end
14
- end
15
- end
10
+ # ### Security Policies
11
+ #
12
+ # * This API depends on the following active services:*Returns* (at least one of): Mrs, MRSComplianceManager, AvaTaxCsp.*Firm Managed* (for accounts managed by a firm): ARA, ARAManaged.
13
+ # Swagger Name: AvaTaxClient
14
+ # @param taxAuthorityId [Integer] Used to limit the jurisdictions returned.
15
+ # @param effectiveDate [DateTime] Used to limit the jurisdictions returned.
16
+ # @param endDate [DateTime] Used to limit the jurisdictions returned.
17
+ # @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/).
18
+ # @param include [String] A comma separated list of objects to fetch underneath this jurisdiction.
19
+ # @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.
20
+ # @param skip [Integer] If nonzero, skip this number of results before returning data. Used with `$top` to provide pagination for large datasets.
21
+ # @param orderBy [String] A comma separated list of sort statements in the format `(fieldname) [ASC|DESC]`, for example `id ASC`.
22
+ # @return [Object]
23
+ def query_tax_authority_jurisdiction_rates(options={}) path = "/api/v2/compliance/taxauthorityjurisdictionrates"
24
+ get(path, options, "22.2.0") end
25
+ end
26
+ end
16
27
  end