avatax 22.2.0 → 22.5.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (46) hide show
  1. checksums.yaml +4 -4
  2. data/lib/avatax/client/accounts.rb +11 -11
  3. data/lib/avatax/client/addresses.rb +2 -2
  4. data/lib/avatax/client/advancedrules.rb +5 -5
  5. data/lib/avatax/client/avafileforms.rb +5 -5
  6. data/lib/avatax/client/batches.rb +8 -8
  7. data/lib/avatax/client/certexpressinvites.rb +3 -3
  8. data/lib/avatax/client/certificates.rb +15 -15
  9. data/lib/avatax/client/companies.rb +22 -22
  10. data/lib/avatax/client/compliance.rb +1 -1
  11. data/lib/avatax/client/contacts.rb +6 -6
  12. data/lib/avatax/client/customers.rb +13 -13
  13. data/lib/avatax/client/datasources.rb +6 -6
  14. data/lib/avatax/client/definitions.rb +75 -72
  15. data/lib/avatax/client/distancethresholds.rb +6 -6
  16. data/lib/avatax/client/ecommercetoken.rb +2 -2
  17. data/lib/avatax/client/filingcalendars.rb +3 -3
  18. data/lib/avatax/client/filings.rb +2 -2
  19. data/lib/avatax/client/firmclientlinkages.rb +9 -9
  20. data/lib/avatax/client/free.rb +1 -1
  21. data/lib/avatax/client/fundingrequests.rb +2 -2
  22. data/lib/avatax/client/items.rb +189 -28
  23. data/lib/avatax/client/jurisdictionoverrides.rb +6 -6
  24. data/lib/avatax/client/locations.rb +12 -12
  25. data/lib/avatax/client/multidocument.rb +10 -10
  26. data/lib/avatax/client/nexus.rb +15 -15
  27. data/lib/avatax/client/notices.rb +4 -4
  28. data/lib/avatax/client/notifications.rb +3 -3
  29. data/lib/avatax/client/provisioning.rb +2 -2
  30. data/lib/avatax/client/registrar.rb +11 -22
  31. data/lib/avatax/client/reports.rb +4 -4
  32. data/lib/avatax/client/settings.rb +6 -6
  33. data/lib/avatax/client/shippingverification.rb +25 -9
  34. data/lib/avatax/client/subscriptions.rb +3 -3
  35. data/lib/avatax/client/taxcodes.rb +6 -6
  36. data/lib/avatax/client/taxcontent.rb +5 -5
  37. data/lib/avatax/client/taxrules.rb +6 -6
  38. data/lib/avatax/client/transactions.rb +22 -23
  39. data/lib/avatax/client/upcs.rb +6 -6
  40. data/lib/avatax/client/userdefinedfields.rb +3 -3
  41. data/lib/avatax/client/users.rb +8 -8
  42. data/lib/avatax/client/utilities.rb +3 -3
  43. data/lib/avatax/connection.rb +5 -1
  44. data/lib/avatax/request.rb +10 -9
  45. data/lib/avatax/version.rb +1 -1
  46. metadata +2 -2
@@ -6,25 +6,26 @@ require "erb"
6
6
  module AvaTax
7
7
  module Request
8
8
 
9
- def get(path, options={}, apiversion="")
10
- request(:get, path, nil, options, apiversion)
9
+ def get(path, options={}, apiversion="", headers=Hash.new)
10
+ request(:get, path, nil, options, apiversion, headers)
11
11
  end
12
12
 
13
- def post(path, model, options={}, apiversion="")
14
- request(:post, path, model, options, apiversion)
13
+ def post(path, model, options={}, apiversion="", headers=Hash.new)
14
+ request(:post, path, model, options, apiversion, headers)
15
15
  end
16
16
 
17
- def put(path, model, options={}, apiversion="")
18
- request(:put, path, model, options, apiversion)
17
+ def put(path, model, options={}, apiversion="", headers=Hash.new)
18
+ request(:put, path, model, options, apiversion, headers)
19
19
  end
20
20
 
21
- def delete(path, options={}, apiversion="")
22
- request(:delete, path, nil, options, apiversion)
21
+ def delete(path, options={}, apiversion="", headers=Hash.new)
22
+ request(:delete, path, nil, options, apiversion, headers)
23
23
  end
24
24
 
25
- def request(method, path, model, options={}, apiversion="")
25
+ def request(method, path, model, options={}, apiversion="", headers=Hash.new )
26
26
  response = connection.send(method) do |request|
27
27
  request.headers['X-Avalara-Client'] = request.headers['X-Avalara-Client'].gsub("API_VERSION", apiversion)
28
+ request.headers=request.headers.merge(headers) unless headers.empty?
28
29
  case method
29
30
  when :get, :delete
30
31
  request.url("#{encode_path(path)}?#{URI.encode_www_form(options)}")
@@ -1,3 +1,3 @@
1
1
  module AvaTax
2
- VERSION = '22.2.0'.freeze unless defined?(::AvaTax::VERSION)
2
+ VERSION = '22.5.0'.freeze unless defined?(::AvaTax::VERSION)
3
3
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: avatax
3
3
  version: !ruby/object:Gem::Version
4
- version: 22.2.0
4
+ version: 22.5.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Marcus Vorwaller
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2022-01-28 00:00:00.000000000 Z
11
+ date: 2022-05-27 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: rake