avatax 21.9.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 +22 -11
  16. data/lib/avatax/client/addresses.rb +4 -2
  17. data/lib/avatax/client/advancedrules.rb +10 -5
  18. data/lib/avatax/client/ageverification.rb +29 -0
  19. data/lib/avatax/client/avafileforms.rb +10 -5
  20. data/lib/avatax/client/batches.rb +16 -8
  21. data/lib/avatax/client/certexpressinvites.rb +6 -3
  22. data/lib/avatax/client/certificates.rb +30 -15
  23. data/lib/avatax/client/companies.rb +61 -21
  24. data/lib/avatax/client/compliance.rb +25 -14
  25. data/lib/avatax/client/contacts.rb +12 -6
  26. data/lib/avatax/client/customers.rb +26 -13
  27. data/lib/avatax/client/datasources.rb +12 -6
  28. data/lib/avatax/client/definitions.rb +140 -70
  29. data/lib/avatax/client/distancethresholds.rb +12 -6
  30. data/lib/avatax/client/ecms.rb +73 -73
  31. data/lib/avatax/client/ecommercetoken.rb +4 -2
  32. data/lib/avatax/client/errortransactions.rb +61 -61
  33. data/lib/avatax/client/filingcalendars.rb +9 -4
  34. data/lib/avatax/client/filings.rb +6 -2
  35. data/lib/avatax/client/firmclientlinkages.rb +18 -9
  36. data/lib/avatax/client/free.rb +2 -1
  37. data/lib/avatax/client/fundingrequests.rb +4 -2
  38. data/lib/avatax/client/items.rb +50 -25
  39. data/lib/avatax/client/jurisdictionoverrides.rb +12 -6
  40. data/lib/avatax/client/locations.rb +24 -12
  41. data/lib/avatax/client/multidocument.rb +20 -10
  42. data/lib/avatax/client/nexus.rb +30 -15
  43. data/lib/avatax/client/notices.rb +8 -4
  44. data/lib/avatax/client/notifications.rb +6 -3
  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 +4 -2
  48. data/lib/avatax/client/registrar.rb +22 -11
  49. data/lib/avatax/client/reports.rb +8 -4
  50. data/lib/avatax/client/settings.rb +12 -6
  51. data/lib/avatax/client/shippingverification.rb +66 -0
  52. data/lib/avatax/client/subscriptions.rb +6 -3
  53. data/lib/avatax/client/taxcodes.rb +12 -6
  54. data/lib/avatax/client/taxcontent.rb +10 -5
  55. data/lib/avatax/client/taxprofiles.rb +42 -42
  56. data/lib/avatax/client/taxrules.rb +12 -6
  57. data/lib/avatax/client/transactions.rb +42 -21
  58. data/lib/avatax/client/upcs.rb +12 -6
  59. data/lib/avatax/client/userdefinedfields.rb +52 -0
  60. data/lib/avatax/client/users.rb +16 -8
  61. data/lib/avatax/client/utilities.rb +6 -3
  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
@@ -32,10 +32,11 @@ module AvaTax
32
32
  # ### Security Policies
33
33
  #
34
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
37
  # @return [String]
37
38
  def certify_integration(id) path = "/api/v2/companies/#{id}/certify"
38
- get(path) end
39
+ get(path, {}, "22.2.0") end
39
40
 
40
41
  # Change the filing status of this company
41
42
  #
@@ -56,11 +57,12 @@ module AvaTax
56
57
  # ### Security Policies
57
58
  #
58
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
63
  # @return [String]
62
64
  def change_filing_status(id, model) path = "/api/v2/companies/#{id}/filingstatus"
63
- post(path, model) end
65
+ post(path, model, {}, "22.2.0") end
64
66
 
65
67
  # Quick setup for a company with a single physical address
66
68
  #
@@ -80,10 +82,11 @@ module AvaTax
80
82
  # ### Security Policies
81
83
  #
82
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
87
  # @return [Object]
85
88
  def company_initialize(model) path = "/api/v2/companies/initialize"
86
- post(path, model) end
89
+ post(path, model, {}, "22.2.0") end
87
90
 
88
91
  # Create new companies
89
92
  #
@@ -96,10 +99,11 @@ module AvaTax
96
99
  # ### Security Policies
97
100
  #
98
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
104
  # @return [CompanyModel[]]
101
105
  def create_companies(model) path = "/api/v2/companies"
102
- post(path, model) end
106
+ post(path, model, {}, "22.2.0") end
103
107
 
104
108
  # Add parameters to a company.
105
109
  #
@@ -118,11 +122,12 @@ module AvaTax
118
122
  # ### Security Policies
119
123
  #
120
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
128
  # @return [CompanyParameterDetailModel[]]
124
129
  def create_company_parameters(companyId, model) path = "/api/v2/companies/#{companyId}/parameters"
125
- post(path, model) end
130
+ post(path, model, {}, "22.2.0") end
126
131
 
127
132
  # Request managed returns funding setup for a company
128
133
  #
@@ -141,11 +146,12 @@ module AvaTax
141
146
  #
142
147
  # * This API depends on the following active services:*Returns* (at least one of): Mrs, MRSComplianceManager, AvaTaxCsp.
143
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
152
  # @return [Object]
147
153
  def create_funding_request(id, model) path = "/api/v2/companies/#{id}/funding/setup"
148
- post(path, model) end
154
+ post(path, model, {}, "22.2.0") end
149
155
 
150
156
  # Delete a single company
151
157
  #
@@ -154,10 +160,11 @@ module AvaTax
154
160
  # ### Security Policies
155
161
  #
156
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
165
  # @return [ErrorDetail[]]
159
166
  def delete_company(id) path = "/api/v2/companies/#{id}"
160
- delete(path) end
167
+ delete(path, {}, "22.2.0") end
161
168
 
162
169
  # Delete a single company parameter
163
170
  #
@@ -171,11 +178,12 @@ module AvaTax
171
178
  # ### Security Policies
172
179
  #
173
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
184
  # @return [ErrorDetail[]]
177
185
  def delete_company_parameter(companyId, id) path = "/api/v2/companies/#{companyId}/parameters/#{id}"
178
- delete(path) end
186
+ delete(path, {}, "22.2.0") end
179
187
 
180
188
  # Check the funding configuration of a company
181
189
  #
@@ -188,10 +196,11 @@ module AvaTax
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
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
201
  # @return [Object]
193
202
  def funding_configuration_by_company(companyId) path = "/api/v2/companies/#{companyId}/funding/configuration"
194
- get(path) end
203
+ get(path, {}, "22.2.0") end
195
204
 
196
205
  # Check the funding configuration of a company
197
206
  #
@@ -204,11 +213,12 @@ module AvaTax
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
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
219
  # @return [FundingConfigurationModel[]]
210
220
  def funding_configurations_by_company_and_currency(companyId, options={}) path = "/api/v2/companies/#{companyId}/funding/configurations"
211
- get(path, options) end
221
+ get(path, options, "22.2.0") end
212
222
 
213
223
  # Retrieve a single company
214
224
  #
@@ -229,11 +239,12 @@ module AvaTax
229
239
  # ### Security Policies
230
240
  #
231
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
245
  # @return [Object]
235
246
  def get_company(id, options={}) path = "/api/v2/companies/#{id}"
236
- get(path, options) end
247
+ get(path, options, "22.2.0") end
237
248
 
238
249
  # Get configuration settings for this company
239
250
  #
@@ -253,10 +264,11 @@ module AvaTax
253
264
  # ### Security Policies
254
265
  #
255
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
269
  # @return [CompanyConfigurationModel[]]
258
270
  def get_company_configuration(id) path = "/api/v2/companies/#{id}/configuration"
259
- get(path) end
271
+ get(path, {}, "22.2.0") end
260
272
 
261
273
  # Retrieve a single company parameter
262
274
  #
@@ -271,11 +283,12 @@ module AvaTax
271
283
  # ### Security Policies
272
284
  #
273
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
289
  # @return [Object]
277
290
  def get_company_parameter_detail(companyId, id) path = "/api/v2/companies/#{companyId}/parameters/#{id}"
278
- get(path) end
291
+ get(path, {}, "22.2.0") end
279
292
 
280
293
  # Get this company's filing status
281
294
  #
@@ -297,10 +310,30 @@ module AvaTax
297
310
  # ### Security Policies
298
311
  #
299
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
315
  # @return [String]
302
316
  def get_filing_status(id) path = "/api/v2/companies/#{id}/filingstatus"
303
- get(path) end
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.
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
304
337
 
305
338
  # Retrieve parameters for a company
306
339
  #
@@ -318,6 +351,7 @@ module AvaTax
318
351
  # ### Security Policies
319
352
  #
320
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.
@@ -325,7 +359,7 @@ module AvaTax
325
359
  # @param orderBy [String] A comma separated list of sort statements in the format `(fieldname) [ASC|DESC]`, for example `id ASC`.
326
360
  # @return [FetchResult]
327
361
  def list_company_parameter_details(companyId, options={}) path = "/api/v2/companies/#{companyId}/parameters"
328
- get(path, options) end
362
+ get(path, options, "22.2.0") end
329
363
 
330
364
  # Check managed returns funding status for a company
331
365
  #
@@ -338,10 +372,11 @@ module AvaTax
338
372
  #
339
373
  # * This API depends on the following active services:*Returns* (at least one of): Mrs, MRSComplianceManager, AvaTaxCsp.
340
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
377
  # @return [FundingStatusModel[]]
343
378
  def list_funding_requests_by_company(id) path = "/api/v2/companies/#{id}/funding"
344
- get(path) end
379
+ get(path, {}, "22.2.0") end
345
380
 
346
381
  # Retrieve a list of MRS Companies with account
347
382
  #
@@ -352,9 +387,10 @@ module AvaTax
352
387
  # ### Security Policies
353
388
  #
354
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
355
391
  # @return [FetchResult]
356
392
  def list_mrs_companies() path = "/api/v2/companies/mrs"
357
- get(path) end
393
+ get(path, {}, "22.2.0") end
358
394
 
359
395
  # Retrieve all companies
360
396
  #
@@ -379,6 +415,7 @@ module AvaTax
379
415
  # ### Security Policies
380
416
  #
381
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.
@@ -386,7 +423,7 @@ module AvaTax
386
423
  # @param orderBy [String] A comma separated list of sort statements in the format `(fieldname) [ASC|DESC]`, for example `id ASC`.
387
424
  # @return [FetchResult]
388
425
  def query_companies(options={}) path = "/api/v2/companies"
389
- get(path, options) end
426
+ get(path, options, "22.2.0") end
390
427
 
391
428
  # Change configuration settings for this company
392
429
  #
@@ -406,11 +443,12 @@ module AvaTax
406
443
  # ### Security Policies
407
444
  #
408
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
449
  # @return [CompanyConfigurationModel[]]
412
450
  def set_company_configuration(id, model) path = "/api/v2/companies/#{id}/configuration"
413
- post(path, model) end
451
+ post(path, model, {}, "22.2.0") end
414
452
 
415
453
  # Update a single company
416
454
  #
@@ -429,11 +467,12 @@ module AvaTax
429
467
  # ### Security Policies
430
468
  #
431
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
473
  # @return [Object]
435
474
  def update_company(id, model) path = "/api/v2/companies/#{id}"
436
- put(path, model) end
475
+ put(path, model, {}, "22.2.0") end
437
476
 
438
477
  # Update a company parameter
439
478
  #
@@ -448,12 +487,13 @@ module AvaTax
448
487
  # ### Security Policies
449
488
  #
450
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
494
  # @return [Object]
455
495
  def update_company_parameter_detail(companyId, id, model) path = "/api/v2/companies/#{companyId}/parameters/#{id}"
456
- put(path, model) end
496
+ put(path, model, {}, "22.2.0") end
457
497
  end
458
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
@@ -12,11 +12,12 @@ module AvaTax
12
12
  # ### Security Policies
13
13
  #
14
14
  # * This API requires one of the following user roles: AccountAdmin, CompanyAdmin, CSPTester, FirmAdmin, SSTAdmin, TechnicalSupportAdmin.
15
+ # Swagger Name: AvaTaxClient
15
16
  # @param companyId [Integer] The ID of the company that owns this contact.
16
17
  # @param model [ContactModel[]] The contacts you wish to create.
17
18
  # @return [ContactModel[]]
18
19
  def create_contacts(companyId, model) path = "/api/v2/companies/#{companyId}/contacts"
19
- post(path, model) end
20
+ post(path, model, {}, "22.2.0") end
20
21
 
21
22
  # Delete a single contact
22
23
  #
@@ -25,11 +26,12 @@ module AvaTax
25
26
  # ### Security Policies
26
27
  #
27
28
  # * This API requires one of the following user roles: AccountAdmin, CompanyAdmin, CSPTester, FirmAdmin, SSTAdmin, TechnicalSupportAdmin.
29
+ # Swagger Name: AvaTaxClient
28
30
  # @param companyId [Integer] The ID of the company that owns this contact.
29
31
  # @param id [Integer] The ID of the contact you wish to delete.
30
32
  # @return [ErrorDetail[]]
31
33
  def delete_contact(companyId, id) path = "/api/v2/companies/#{companyId}/contacts/#{id}"
32
- delete(path) end
34
+ delete(path, {}, "22.2.0") end
33
35
 
34
36
  # Retrieve a single contact
35
37
  #
@@ -40,11 +42,12 @@ module AvaTax
40
42
  # ### Security Policies
41
43
  #
42
44
  # * This API requires one of the following user roles: AccountAdmin, AccountUser, CompanyAdmin, CompanyUser, CSPAdmin, CSPTester, FirmAdmin, SiteAdmin, SSTAdmin, SystemAdmin, TechnicalSupportAdmin, TechnicalSupportUser, TreasuryAdmin, TreasuryUser.
45
+ # Swagger Name: AvaTaxClient
43
46
  # @param companyId [Integer] The ID of the company for this contact
44
47
  # @param id [Integer] The primary key of this contact
45
48
  # @return [Object]
46
49
  def get_contact(companyId, id) path = "/api/v2/companies/#{companyId}/contacts/#{id}"
47
- get(path) end
50
+ get(path, {}, "22.2.0") end
48
51
 
49
52
  # Retrieve contacts for this company
50
53
  #
@@ -56,6 +59,7 @@ module AvaTax
56
59
  # ### Security Policies
57
60
  #
58
61
  # * This API requires one of the following user roles: AccountAdmin, AccountUser, CompanyAdmin, CompanyUser, CSPAdmin, CSPTester, FirmAdmin, SiteAdmin, SSTAdmin, SystemAdmin, TechnicalSupportAdmin, TechnicalSupportUser, TreasuryAdmin, TreasuryUser.
62
+ # Swagger Name: AvaTaxClient
59
63
  # @param companyId [Integer] The ID of the company that owns these contacts
60
64
  # @param filter [String] A filter statement to identify specific records to retrieve. For more information on filtering, see [Filtering in REST](http://developer.avalara.com/avatax/filtering-in-rest/).
61
65
  # @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.
@@ -63,7 +67,7 @@ module AvaTax
63
67
  # @param orderBy [String] A comma separated list of sort statements in the format `(fieldname) [ASC|DESC]`, for example `id ASC`.
64
68
  # @return [FetchResult]
65
69
  def list_contacts_by_company(companyId, options={}) path = "/api/v2/companies/#{companyId}/contacts"
66
- get(path, options) end
70
+ get(path, options, "22.2.0") end
67
71
 
68
72
  # Retrieve all contacts
69
73
  #
@@ -77,13 +81,14 @@ module AvaTax
77
81
  # ### Security Policies
78
82
  #
79
83
  # * This API requires one of the following user roles: AccountAdmin, AccountUser, CompanyAdmin, CompanyUser, CSPAdmin, CSPTester, FirmAdmin, SiteAdmin, SSTAdmin, SystemAdmin, TechnicalSupportAdmin, TechnicalSupportUser, TreasuryAdmin, TreasuryUser.
84
+ # Swagger Name: AvaTaxClient
80
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/).
81
86
  # @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.
82
87
  # @param skip [Integer] If nonzero, skip this number of results before returning data. Used with `$top` to provide pagination for large datasets.
83
88
  # @param orderBy [String] A comma separated list of sort statements in the format `(fieldname) [ASC|DESC]`, for example `id ASC`.
84
89
  # @return [FetchResult]
85
90
  def query_contacts(options={}) path = "/api/v2/contacts"
86
- get(path, options) end
91
+ get(path, options, "22.2.0") end
87
92
 
88
93
  # Update a single contact
89
94
  #
@@ -96,12 +101,13 @@ module AvaTax
96
101
  # ### Security Policies
97
102
  #
98
103
  # * This API requires one of the following user roles: AccountAdmin, CompanyAdmin, CSPTester, FirmAdmin, SSTAdmin, TechnicalSupportAdmin.
104
+ # Swagger Name: AvaTaxClient
99
105
  # @param companyId [Integer] The ID of the company that this contact belongs to.
100
106
  # @param id [Integer] The ID of the contact you wish to update
101
107
  # @param model [Object] The contact you wish to update.
102
108
  # @return [Object]
103
109
  def update_contact(companyId, id, model) path = "/api/v2/companies/#{companyId}/contacts/#{id}"
104
- put(path, model) end
110
+ put(path, model, {}, "22.2.0") end
105
111
  end
106
112
  end
107
113
  end
@@ -25,11 +25,12 @@ module AvaTax
25
25
  #
26
26
  # * This API requires one of the following user roles: AccountAdmin, AccountOperator, AccountUser, CompanyAdmin, CompanyUser, CSPTester, SSTAdmin, TechnicalSupportAdmin.
27
27
  # * This API depends on the following active services:*Required* (all): AvaTaxPro.
28
+ # Swagger Name: AvaTaxClient
28
29
  # @param companyId [Integer] The unique ID number of the company that recorded this customer
29
30
  # @param model [CustomerModel[]] The list of customer objects to be created
30
31
  # @return [CustomerModel[]]
31
32
  def create_customers(companyId, model) path = "/api/v2/companies/#{companyId}/customers"
32
- post(path, model) end
33
+ post(path, model, {}, "22.2.0") end
33
34
 
34
35
  # Delete a customer record
35
36
  #
@@ -50,11 +51,12 @@ module AvaTax
50
51
  #
51
52
  # * This API requires one of the following user roles: AccountAdmin, AccountOperator, AccountUser, CompanyAdmin, CompanyUser, CSPTester, SSTAdmin, TechnicalSupportAdmin.
52
53
  # * This API depends on the following active services:*Required* (all): AvaTaxPro.
54
+ # Swagger Name: AvaTaxClient
53
55
  # @param companyId [Integer] The unique ID number of the company that recorded this customer
54
56
  # @param customerCode [String] The unique code representing this customer
55
57
  # @return [Object]
56
58
  def delete_customer(companyId, customerCode) path = "/api/v2/companies/#{companyId}/customers/#{customerCode}"
57
- delete(path) end
59
+ delete(path, {}, "22.2.0") end
58
60
 
59
61
  # Retrieve a single customer
60
62
  #
@@ -81,12 +83,13 @@ module AvaTax
81
83
  #
82
84
  # * This API requires one of the following user roles: AccountAdmin, AccountOperator, AccountUser, CompanyAdmin, CompanyUser, CSPTester, SSTAdmin, TechnicalSupportAdmin, TechnicalSupportUser.
83
85
  # * This API depends on the following active services:*Required* (all): AvaTaxPro.
86
+ # Swagger Name: AvaTaxClient
84
87
  # @param companyId [Integer] The unique ID number of the company that recorded this customer
85
88
  # @param customerCode [String] The unique code representing this customer
86
89
  # @param include [String] Specify optional additional objects to include in this fetch request
87
90
  # @return [Object]
88
91
  def get_customer(companyId, customerCode, options={}) path = "/api/v2/companies/#{companyId}/customers/#{customerCode}"
89
- get(path, options) end
92
+ get(path, options, "22.2.0") end
90
93
 
91
94
  # Link attributes to a customer
92
95
  #
@@ -110,12 +113,13 @@ module AvaTax
110
113
  #
111
114
  # * This API requires one of the following user roles: AccountAdmin, AccountOperator, AccountUser, CompanyAdmin, CompanyUser, CSPTester, SSTAdmin, TechnicalSupportAdmin.
112
115
  # * This API depends on the following active services:*Required* (all): AvaTaxPro.
116
+ # Swagger Name: AvaTaxClient
113
117
  # @param companyId [Integer] The unique ID number of the company that recorded the provided customer
114
118
  # @param customerCode [String] The unique code representing the current customer
115
119
  # @param model [CustomerAttributeModel[]] The list of attributes to link to the customer.
116
120
  # @return [FetchResult]
117
121
  def link_attributes_to_customer(companyId, customerCode, model) path = "/api/v2/companies/#{companyId}/customers/#{customerCode}/attributes/link"
118
- put(path, model) end
122
+ put(path, model, {}, "22.2.0") end
119
123
 
120
124
  # Link certificates to a customer
121
125
  #
@@ -136,12 +140,13 @@ module AvaTax
136
140
  #
137
141
  # * This API requires one of the following user roles: AccountAdmin, AccountOperator, AccountUser, CompanyAdmin, CompanyUser, CSPTester, SSTAdmin, TechnicalSupportAdmin, TechnicalSupportUser.
138
142
  # * This API depends on the following active services:*Required* (all): AvaTaxPro.
143
+ # Swagger Name: AvaTaxClient
139
144
  # @param companyId [Integer] The unique ID number of the company that recorded this customer
140
145
  # @param customerCode [String] The unique code representing this customer
141
146
  # @param model [Object] The list of certificates to link to this customer
142
147
  # @return [FetchResult]
143
148
  def link_certificates_to_customer(companyId, customerCode, model) path = "/api/v2/companies/#{companyId}/customers/#{customerCode}/certificates/link"
144
- post(path, model) end
149
+ post(path, model, {}, "22.2.0") end
145
150
 
146
151
  # Link two customer records together
147
152
  #
@@ -163,12 +168,13 @@ module AvaTax
163
168
  #
164
169
  # * This API requires one of the following user roles: AccountAdmin, AccountOperator, AccountUser, CompanyAdmin, CompanyUser, CSPTester, SSTAdmin, TechnicalSupportAdmin, TechnicalSupportUser.
165
170
  # * This API depends on the following active services:*Required* (all): AvaTaxPro.
171
+ # Swagger Name: AvaTaxClient
166
172
  # @param companyId [Integer] The unique ID number of the company defining customers.
167
173
  # @param code [String] The code of the bill-to customer to link.
168
174
  # @param model [Object] A list of information about ship-to customers to link to this bill-to customer.
169
175
  # @return [Object]
170
176
  def link_ship_to_customers_to_bill_customer(companyId, code, model) path = "/api/v2/companies/#{companyId}/customers/billto/#{code}/shipto/link"
171
- post(path, model) end
177
+ post(path, model, {}, "22.2.0") end
172
178
 
173
179
  # Retrieve a customer's attributes
174
180
  #
@@ -192,11 +198,12 @@ module AvaTax
192
198
  #
193
199
  # * This API requires one of the following user roles: AccountAdmin, AccountOperator, AccountUser, CompanyAdmin, CompanyUser, CSPTester, SSTAdmin, TechnicalSupportAdmin, TechnicalSupportUser.
194
200
  # * This API depends on the following active services:*Required* (all): AvaTaxPro.
201
+ # Swagger Name: AvaTaxClient
195
202
  # @param companyId [Integer] The unique ID number of the company that recorded the provided customer
196
203
  # @param customerCode [String] The unique code representing the current customer
197
204
  # @return [FetchResult]
198
205
  def list_attributes_for_customer(companyId, customerCode) path = "/api/v2/companies/#{companyId}/customers/#{customerCode}/attributes"
199
- get(path) end
206
+ get(path, {}, "22.2.0") end
200
207
 
201
208
  # List certificates linked to a customer
202
209
  #
@@ -217,6 +224,7 @@ module AvaTax
217
224
  #
218
225
  # * This API requires one of the following user roles: AccountAdmin, AccountOperator, AccountUser, CompanyAdmin, CompanyUser, CSPTester, SSTAdmin, TechnicalSupportAdmin, TechnicalSupportUser.
219
226
  # * This API depends on the following active services:*Required* (all): AvaTaxPro.
227
+ # Swagger Name: AvaTaxClient
220
228
  # @param companyId [Integer] The unique ID number of the company that recorded this customer
221
229
  # @param customerCode [String] The unique code representing this customer
222
230
  # @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.
@@ -226,7 +234,7 @@ module AvaTax
226
234
  # @param orderBy [String] A comma separated list of sort statements in the format `(fieldname) [ASC|DESC]`, for example `id ASC`.
227
235
  # @return [FetchResult]
228
236
  def list_certificates_for_customer(companyId, customerCode, options={}) path = "/api/v2/companies/#{companyId}/customers/#{customerCode}/certificates"
229
- get(path, options) end
237
+ get(path, options, "22.2.0") end
230
238
 
231
239
  # List valid certificates for a location
232
240
  #
@@ -250,13 +258,14 @@ module AvaTax
250
258
  #
251
259
  # * This API requires one of the following user roles: AccountAdmin, AccountOperator, AccountUser, CompanyAdmin, CompanyUser, CSPTester, SSTAdmin, TechnicalSupportAdmin, TechnicalSupportUser.
252
260
  # * This API depends on the following active services:*Required* (all): AvaTaxPro.
261
+ # Swagger Name: AvaTaxClient
253
262
  # @param companyId [Integer] The unique ID number of the company that recorded this customer
254
263
  # @param customerCode [String] The unique code representing this customer
255
264
  # @param country [String] Search for certificates matching this country. Uses the ISO 3166 two character country code.
256
265
  # @param region [String] Search for certificates matching this region. Uses the ISO 3166 two or three character state, region, or province code.
257
266
  # @return [Object]
258
267
  def list_valid_certificates_for_customer(companyId, customerCode, country, region) path = "/api/v2/companies/#{companyId}/customers/#{customerCode}/certificates/#{country}/#{region}"
259
- get(path) end
268
+ get(path, {}, "22.2.0") end
260
269
 
261
270
  # List all customers for this company
262
271
  #
@@ -282,6 +291,7 @@ module AvaTax
282
291
  #
283
292
  # * This API requires one of the following user roles: AccountAdmin, AccountOperator, AccountUser, CompanyAdmin, CompanyUser, CSPTester, SSTAdmin, TechnicalSupportAdmin, TechnicalSupportUser.
284
293
  # * This API depends on the following active services:*Required* (all): AvaTaxPro.
294
+ # Swagger Name: AvaTaxClient
285
295
  # @param companyId [Integer] The unique ID number of the company that recorded this customer
286
296
  # @param include [String] OPTIONAL - You can specify the value `certificates` to fetch information about certificates linked to the customer.
287
297
  # @param filter [String] A filter statement to identify specific records to retrieve. For more information on filtering, see [Filtering in REST](http://developer.avalara.com/avatax/filtering-in-rest/).<br />*Not filterable:* shipTos
@@ -290,7 +300,7 @@ module AvaTax
290
300
  # @param orderBy [String] A comma separated list of sort statements in the format `(fieldname) [ASC|DESC]`, for example `id ASC`.
291
301
  # @return [FetchResult]
292
302
  def query_customers(companyId, options={}) path = "/api/v2/companies/#{companyId}/customers"
293
- get(path, options) end
303
+ get(path, options, "22.2.0") end
294
304
 
295
305
  # Unlink attributes from a customer
296
306
  #
@@ -314,12 +324,13 @@ module AvaTax
314
324
  #
315
325
  # * This API requires one of the following user roles: AccountAdmin, AccountOperator, AccountUser, CompanyAdmin, CompanyUser, CSPTester, SSTAdmin, TechnicalSupportAdmin.
316
326
  # * This API depends on the following active services:*Required* (all): AvaTaxPro.
327
+ # Swagger Name: AvaTaxClient
317
328
  # @param companyId [Integer] The unique ID number of the company that recorded the customer
318
329
  # @param customerCode [String] The unique code representing the current customer
319
330
  # @param model [CustomerAttributeModel[]] The list of attributes to unlink from the customer.
320
331
  # @return [FetchResult]
321
332
  def unlink_attributes_from_customer(companyId, customerCode, model) path = "/api/v2/companies/#{companyId}/customers/#{customerCode}/attributes/unlink"
322
- put(path, model) end
333
+ put(path, model, {}, "22.2.0") end
323
334
 
324
335
  # Unlink certificates from a customer
325
336
  #
@@ -340,12 +351,13 @@ module AvaTax
340
351
  #
341
352
  # * This API requires one of the following user roles: AccountAdmin, AccountOperator, AccountUser, CompanyAdmin, CompanyUser, CSPTester, SSTAdmin, TechnicalSupportAdmin, TechnicalSupportUser.
342
353
  # * This API depends on the following active services:*Required* (all): AvaTaxPro.
354
+ # Swagger Name: AvaTaxClient
343
355
  # @param companyId [Integer] The unique ID number of the company that recorded this customer
344
356
  # @param customerCode [String] The unique code representing this customer
345
357
  # @param model [Object] The list of certificates to link to this customer
346
358
  # @return [FetchResult]
347
359
  def unlink_certificates_from_customer(companyId, customerCode, model) path = "/api/v2/companies/#{companyId}/customers/#{customerCode}/certificates/unlink"
348
- post(path, model) end
360
+ post(path, model, {}, "22.2.0") end
349
361
 
350
362
  # Update a single customer
351
363
  #
@@ -366,12 +378,13 @@ module AvaTax
366
378
  #
367
379
  # * This API requires one of the following user roles: AccountAdmin, AccountOperator, AccountUser, CompanyAdmin, CompanyUser, CSPTester, SSTAdmin, TechnicalSupportAdmin.
368
380
  # * This API depends on the following active services:*Required* (all): AvaTaxPro.
381
+ # Swagger Name: AvaTaxClient
369
382
  # @param companyId [Integer] The unique ID number of the company that recorded this customer
370
383
  # @param customerCode [String] The unique code representing this customer
371
384
  # @param model [Object] The new customer model that will replace the existing record at this URL
372
385
  # @return [Object]
373
386
  def update_customer(companyId, customerCode, model) path = "/api/v2/companies/#{companyId}/customers/#{customerCode}"
374
- put(path, model) end
387
+ put(path, model, {}, "22.2.0") end
375
388
  end
376
389
  end
377
390
  end