avatax 20.1.0 → 20.9.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (44) hide show
  1. checksums.yaml +4 -4
  2. data/avatax.gemspec +0 -1
  3. data/lib/avatax/client/accounts.rb +236 -172
  4. data/lib/avatax/client/addresses.rb +54 -54
  5. data/lib/avatax/client/advancedrules.rb +63 -162
  6. data/lib/avatax/client/avafileforms.rb +78 -78
  7. data/lib/avatax/client/batches.rb +223 -170
  8. data/lib/avatax/client/certexpressinvites.rb +97 -97
  9. data/lib/avatax/client/certificates.rb +424 -424
  10. data/lib/avatax/client/companies.rb +457 -350
  11. data/lib/avatax/client/compliance.rb +15 -15
  12. data/lib/avatax/client/contacts.rb +106 -106
  13. data/lib/avatax/client/customers.rb +376 -376
  14. data/lib/avatax/client/datasources.rb +99 -99
  15. data/lib/avatax/client/definitions.rb +862 -847
  16. data/lib/avatax/client/distancethresholds.rb +122 -122
  17. data/lib/avatax/client/ecommercetoken.rb +37 -0
  18. data/lib/avatax/client/filingcalendars.rb +20 -508
  19. data/lib/avatax/client/filings.rb +37 -26
  20. data/lib/avatax/client/firmclientlinkages.rb +123 -123
  21. data/lib/avatax/client/free.rb +100 -100
  22. data/lib/avatax/client/fundingrequests.rb +52 -52
  23. data/lib/avatax/client/items.rb +423 -423
  24. data/lib/avatax/client/jurisdictionoverrides.rb +118 -118
  25. data/lib/avatax/client/locations.rb +253 -139
  26. data/lib/avatax/client/multidocument.rb +390 -310
  27. data/lib/avatax/client/nexus.rb +341 -201
  28. data/lib/avatax/client/notifications.rb +75 -75
  29. data/lib/avatax/client/provisioning.rb +49 -49
  30. data/lib/avatax/client/registrar.rb +198 -198
  31. data/lib/avatax/client/reports.rb +97 -97
  32. data/lib/avatax/client/settings.rb +156 -156
  33. data/lib/avatax/client/subscriptions.rb +62 -62
  34. data/lib/avatax/client/taxcodes.rb +120 -120
  35. data/lib/avatax/client/taxcontent.rb +133 -133
  36. data/lib/avatax/client/taxrules.rb +170 -170
  37. data/lib/avatax/client/transactions.rb +836 -791
  38. data/lib/avatax/client/upcs.rb +111 -111
  39. data/lib/avatax/client/users.rb +183 -183
  40. data/lib/avatax/client/utilities.rb +61 -61
  41. data/lib/avatax/connection.rb +3 -3
  42. data/lib/avatax/request.rb +2 -0
  43. data/lib/avatax/version.rb +1 -1
  44. metadata +4 -17
@@ -1,62 +1,62 @@
1
- module AvaTax
2
- class Client
3
- module Utilities
4
-
5
-
6
- # Checks if the current user is subscribed to a specific service
7
- #
8
- # Returns a subscription object for the current account, or 404 Not Found if this subscription is not enabled for this account.
9
- #
10
- # This API will return an error if it is called with invalid authentication credentials.
11
- #
12
- # This API is intended to help you determine whether you have the necessary subscription to use certain API calls
13
- # within AvaTax. You can examine the subscriptions returned from this API call to look for a particular product
14
- # or subscription to provide useful information to the current user as to whether they are entitled to use
15
- # specific features of AvaTax.
16
- # @param serviceTypeId [String] The service to check
17
- # @return [Object]
18
- def get_my_subscription(serviceTypeId) path = "/api/v2/utilities/subscriptions/#{serviceTypeId}"
19
- get(path) end
20
-
21
- # List all services to which the current user is subscribed
22
- #
23
- # Returns the list of all subscriptions enabled for the currently logged in user.
24
- #
25
- # This API will return an error if it is called with invalid authentication credentials.
26
- #
27
- # This API is intended to help you determine whether you have the necessary subscription to use certain API calls
28
- # within AvaTax. You can examine the subscriptions returned from this API call to look for a particular product
29
- # or subscription to provide useful information to the current user as to whether they are entitled to use
30
- # specific features of AvaTax.
31
- # @return [FetchResult]
32
- def list_my_subscriptions() path = "/api/v2/utilities/subscriptions"
33
- get(path) end
34
-
35
- # Tests connectivity and version of the service
36
- #
37
- # Check connectivity to AvaTax and return information about the AvaTax API server.
38
- #
39
- # This API is intended to help you verify that your connection is working. This API will always succeed and will
40
- # never return a error. It provides basic information about the server you connect to:
41
- #
42
- # * `version` - The version number of the AvaTax API server that responded to your request. The AvaTax API version number is updated once per month during Avalara's update process.
43
- # * `authenticated` - A boolean flag indicating whether or not you sent valid credentials with your API request.
44
- # * `authenticationType` - If you provided valid credentials to the API, this field will tell you whether you used Bearer, Username, or LicenseKey authentication.
45
- # * `authenticatedUserName` - If you provided valid credentials to the API, this field will tell you the username of the currently logged in user.
46
- # * `authenticatedUserId` - If you provided valid credentials to the API, this field will tell you the user ID of the currently logged in user.
47
- # * `authenticatedAccountId` - If you provided valid credentials to the API, this field will contain the account ID of the currently logged in user.
48
- #
49
- # This API helps diagnose connectivity problems between your application and AvaTax; you may call this API even
50
- # if you do not have verified connection credentials. If this API fails, either your computer is not connected to
51
- # the internet, or there is a routing problem between your office and Avalara, or the Avalara server is not available.
52
- # For more information on the uptime of AvaTax, please see [Avalara's AvaTax Status Page](https://status.avalara.com/).
53
- #
54
- # ### Security Policies
55
- #
56
- # * This API may be called without providing authentication credentials.
57
- # @return [Object]
58
- def ping() path = "/api/v2/utilities/ping"
59
- get(path) end
60
- end
61
- end
1
+ module AvaTax
2
+ class Client
3
+ module Utilities
4
+
5
+
6
+ # Checks if the current user is subscribed to a specific service
7
+ #
8
+ # Returns a subscription object for the current account, or 404 Not Found if this subscription is not enabled for this account.
9
+ #
10
+ # This API will return an error if it is called with invalid authentication credentials.
11
+ #
12
+ # This API is intended to help you determine whether you have the necessary subscription to use certain API calls
13
+ # within AvaTax. You can examine the subscriptions returned from this API call to look for a particular product
14
+ # or subscription to provide useful information to the current user as to whether they are entitled to use
15
+ # specific features of AvaTax.
16
+ # @param serviceTypeId [String] The service to check
17
+ # @return [Object]
18
+ def get_my_subscription(serviceTypeId) path = "/api/v2/utilities/subscriptions/#{serviceTypeId}"
19
+ get(path) end
20
+
21
+ # List all services to which the current user is subscribed
22
+ #
23
+ # Returns the list of all subscriptions enabled for the currently logged in user.
24
+ #
25
+ # This API will return an error if it is called with invalid authentication credentials.
26
+ #
27
+ # This API is intended to help you determine whether you have the necessary subscription to use certain API calls
28
+ # within AvaTax. You can examine the subscriptions returned from this API call to look for a particular product
29
+ # or subscription to provide useful information to the current user as to whether they are entitled to use
30
+ # specific features of AvaTax.
31
+ # @return [FetchResult]
32
+ def list_my_subscriptions() path = "/api/v2/utilities/subscriptions"
33
+ get(path) end
34
+
35
+ # Tests connectivity and version of the service
36
+ #
37
+ # Check connectivity to AvaTax and return information about the AvaTax API server.
38
+ #
39
+ # This API is intended to help you verify that your connection is working. This API will always succeed and will
40
+ # never return a error. It provides basic information about the server you connect to:
41
+ #
42
+ # * `version` - The version number of the AvaTax API server that responded to your request. The AvaTax API version number is updated once per month during Avalara's update process.
43
+ # * `authenticated` - A boolean flag indicating whether or not you sent valid credentials with your API request.
44
+ # * `authenticationType` - If you provided valid credentials to the API, this field will tell you whether you used Bearer, Username, or LicenseKey authentication.
45
+ # * `authenticatedUserName` - If you provided valid credentials to the API, this field will tell you the username of the currently logged in user.
46
+ # * `authenticatedUserId` - If you provided valid credentials to the API, this field will tell you the user ID of the currently logged in user.
47
+ # * `authenticatedAccountId` - If you provided valid credentials to the API, this field will contain the account ID of the currently logged in user.
48
+ #
49
+ # This API helps diagnose connectivity problems between your application and AvaTax; you may call this API even
50
+ # if you do not have verified connection credentials. If this API fails, either your computer is not connected to
51
+ # the internet, or there is a routing problem between your office and Avalara, or the Avalara server is not available.
52
+ # For more information on the uptime of AvaTax, please see [Avalara's AvaTax Status Page](https://status.avalara.com/).
53
+ #
54
+ # ### Security Policies
55
+ #
56
+ # * This API may be called without providing authentication credentials.
57
+ # @return [Object]
58
+ def ping() path = "/api/v2/utilities/ping"
59
+ get(path) end
60
+ end
61
+ end
62
62
  end
@@ -1,4 +1,4 @@
1
- require 'faraday_middleware/parse_oj'
1
+ require 'faraday_middleware'
2
2
 
3
3
  module AvaTax
4
4
 
@@ -17,7 +17,7 @@ module AvaTax
17
17
  'X-Avalara-Client' => client_id
18
18
  },
19
19
  :url => endpoint,
20
- :proxy => proxy,
20
+ :proxy => proxy
21
21
  }.merge(connection_options)
22
22
 
23
23
  Faraday.new(options) do |faraday|
@@ -27,7 +27,7 @@ module AvaTax
27
27
  }
28
28
  end
29
29
 
30
- faraday.response :oj, content_type: /\bjson$/
30
+ faraday.response :json, content_type: /\bjson$/
31
31
  faraday.basic_auth(username, password)
32
32
 
33
33
  if logger
@@ -22,6 +22,8 @@ module AvaTax
22
22
 
23
23
  def request(method, path, model, options={})
24
24
  response = connection.send(method) do |request|
25
+ # timeout in seconds
26
+ request.options['timeout'] = 1200
25
27
  case method
26
28
  when :get, :delete
27
29
  request.url("#{URI.encode(path)}?#{URI.encode_www_form(options)}")
@@ -1,3 +1,3 @@
1
1
  module AvaTax
2
- VERSION = '20.1.0'.freeze unless defined?(::AvaTax::VERSION)
2
+ VERSION = '20.9.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: 20.1.0
4
+ version: 20.9.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: 2020-02-07 00:00:00.000000000 Z
11
+ date: 2020-09-14 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: rake
@@ -94,20 +94,6 @@ dependencies:
94
94
  - - ">="
95
95
  - !ruby/object:Gem::Version
96
96
  version: 1.0.3
97
- - !ruby/object:Gem::Dependency
98
- name: faraday_middleware-parse_oj
99
- requirement: !ruby/object:Gem::Requirement
100
- requirements:
101
- - - "~>"
102
- - !ruby/object:Gem::Version
103
- version: 0.3.2
104
- type: :runtime
105
- prerelease: false
106
- version_requirements: !ruby/object:Gem::Requirement
107
- requirements:
108
- - - "~>"
109
- - !ruby/object:Gem::Version
110
- version: 0.3.2
111
97
  description: A Ruby wrapper for the AvaTax REST and Search APIs
112
98
  email:
113
99
  - marcus.vorwaller@avalara.com
@@ -147,6 +133,7 @@ files:
147
133
  - lib/avatax/client/definitions.rb
148
134
  - lib/avatax/client/distancethresholds.rb
149
135
  - lib/avatax/client/ecms.rb
136
+ - lib/avatax/client/ecommercetoken.rb
150
137
  - lib/avatax/client/errortransactions.rb
151
138
  - lib/avatax/client/filingcalendars.rb
152
139
  - lib/avatax/client/filings.rb
@@ -218,7 +205,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
218
205
  - !ruby/object:Gem::Version
219
206
  version: 2.0.0
220
207
  requirements: []
221
- rubygems_version: 3.0.3
208
+ rubygems_version: 3.0.8
222
209
  signing_key:
223
210
  specification_version: 4
224
211
  summary: Ruby wrapper for the AvaTax API