avatax 19.12.0 → 20.7.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +5 -5
- data/avatax.gemspec +0 -1
- data/lib/avatax/client/accounts.rb +269 -193
- data/lib/avatax/client/addresses.rb +60 -60
- data/lib/avatax/client/advancedrules.rb +81 -162
- data/lib/avatax/client/avafileforms.rb +93 -93
- data/lib/avatax/client/batches.rb +247 -188
- data/lib/avatax/client/certexpressinvites.rb +106 -106
- data/lib/avatax/client/certificates.rb +469 -469
- data/lib/avatax/client/companies.rb +400 -398
- data/lib/avatax/client/compliance.rb +18 -18
- data/lib/avatax/client/contacts.rb +124 -124
- data/lib/avatax/client/customers.rb +415 -415
- data/lib/avatax/client/datasources.rb +117 -117
- data/lib/avatax/client/definitions.rb +1039 -1007
- data/lib/avatax/client/distancethresholds.rb +140 -140
- data/lib/avatax/client/filingcalendars.rb +23 -508
- data/lib/avatax/client/filings.rb +29 -29
- data/lib/avatax/client/firmclientlinkages.rb +150 -150
- data/lib/avatax/client/free.rb +109 -109
- data/lib/avatax/client/fundingrequests.rb +58 -58
- data/lib/avatax/client/items.rb +480 -480
- data/lib/avatax/client/jurisdictionoverrides.rb +136 -136
- data/lib/avatax/client/locations.rb +163 -160
- data/lib/avatax/client/multidocument.rb +420 -340
- data/lib/avatax/client/nexus.rb +240 -225
- data/lib/avatax/client/notifications.rb +84 -84
- data/lib/avatax/client/provisioning.rb +55 -55
- data/lib/avatax/client/registrar.rb +228 -228
- data/lib/avatax/client/reports.rb +109 -109
- data/lib/avatax/client/settings.rb +174 -174
- data/lib/avatax/client/subscriptions.rb +71 -71
- data/lib/avatax/client/taxcodes.rb +138 -138
- data/lib/avatax/client/taxcontent.rb +142 -142
- data/lib/avatax/client/taxrules.rb +188 -188
- data/lib/avatax/client/transactions.rb +899 -854
- data/lib/avatax/client/upcs.rb +129 -129
- data/lib/avatax/client/users.rb +207 -207
- data/lib/avatax/client/utilities.rb +70 -70
- data/lib/avatax/connection.rb +3 -3
- data/lib/avatax/request.rb +2 -0
- data/lib/avatax/version.rb +1 -1
- metadata +4 -25
@@ -1,71 +1,71 @@
|
|
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)
|
19
|
-
path = "/api/v2/utilities/subscriptions/#{serviceTypeId}"
|
20
|
-
get(path)
|
21
|
-
end
|
22
|
-
|
23
|
-
|
24
|
-
# List all services to which the current user is subscribed
|
25
|
-
#
|
26
|
-
# Returns the list of all subscriptions enabled for the currently logged in user.
|
27
|
-
#
|
28
|
-
# This API will return an error if it is called with invalid authentication credentials.
|
29
|
-
#
|
30
|
-
# This API is intended to help you determine whether you have the necessary subscription to use certain API calls
|
31
|
-
# within AvaTax. You can examine the subscriptions returned from this API call to look for a particular product
|
32
|
-
# or subscription to provide useful information to the current user as to whether they are entitled to use
|
33
|
-
# specific features of AvaTax.
|
34
|
-
# @return [FetchResult]
|
35
|
-
def list_my_subscriptions()
|
36
|
-
path = "/api/v2/utilities/subscriptions"
|
37
|
-
get(path)
|
38
|
-
end
|
39
|
-
|
40
|
-
|
41
|
-
# Tests connectivity and version of the service
|
42
|
-
#
|
43
|
-
# Check connectivity to AvaTax and return information about the AvaTax API server.
|
44
|
-
#
|
45
|
-
# This API is intended to help you verify that your connection is working. This API will always succeed and will
|
46
|
-
# never return a error. It provides basic information about the server you connect to:
|
47
|
-
#
|
48
|
-
# * `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.
|
49
|
-
# * `authenticated` - A boolean flag indicating whether or not you sent valid credentials with your API request.
|
50
|
-
# * `authenticationType` - If you provided valid credentials to the API, this field will tell you whether you used Bearer, Username, or LicenseKey authentication.
|
51
|
-
# * `authenticatedUserName` - If you provided valid credentials to the API, this field will tell you the username of the currently logged in user.
|
52
|
-
# * `authenticatedUserId` - If you provided valid credentials to the API, this field will tell you the user ID of the currently logged in user.
|
53
|
-
# * `authenticatedAccountId` - If you provided valid credentials to the API, this field will contain the account ID of the currently logged in user.
|
54
|
-
#
|
55
|
-
# This API helps diagnose connectivity problems between your application and AvaTax; you may call this API even
|
56
|
-
# if you do not have verified connection credentials. If this API fails, either your computer is not connected to
|
57
|
-
# the internet, or there is a routing problem between your office and Avalara, or the Avalara server is not available.
|
58
|
-
# For more information on the uptime of AvaTax, please see [Avalara's AvaTax Status Page](https://status.avalara.com/).
|
59
|
-
#
|
60
|
-
# ### Security Policies
|
61
|
-
#
|
62
|
-
# * This API may be called without providing authentication credentials.
|
63
|
-
# @return [Object]
|
64
|
-
def ping()
|
65
|
-
path = "/api/v2/utilities/ping"
|
66
|
-
get(path)
|
67
|
-
end
|
68
|
-
|
69
|
-
end
|
70
|
-
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)
|
19
|
+
path = "/api/v2/utilities/subscriptions/#{serviceTypeId}"
|
20
|
+
get(path)
|
21
|
+
end
|
22
|
+
|
23
|
+
|
24
|
+
# List all services to which the current user is subscribed
|
25
|
+
#
|
26
|
+
# Returns the list of all subscriptions enabled for the currently logged in user.
|
27
|
+
#
|
28
|
+
# This API will return an error if it is called with invalid authentication credentials.
|
29
|
+
#
|
30
|
+
# This API is intended to help you determine whether you have the necessary subscription to use certain API calls
|
31
|
+
# within AvaTax. You can examine the subscriptions returned from this API call to look for a particular product
|
32
|
+
# or subscription to provide useful information to the current user as to whether they are entitled to use
|
33
|
+
# specific features of AvaTax.
|
34
|
+
# @return [FetchResult]
|
35
|
+
def list_my_subscriptions()
|
36
|
+
path = "/api/v2/utilities/subscriptions"
|
37
|
+
get(path)
|
38
|
+
end
|
39
|
+
|
40
|
+
|
41
|
+
# Tests connectivity and version of the service
|
42
|
+
#
|
43
|
+
# Check connectivity to AvaTax and return information about the AvaTax API server.
|
44
|
+
#
|
45
|
+
# This API is intended to help you verify that your connection is working. This API will always succeed and will
|
46
|
+
# never return a error. It provides basic information about the server you connect to:
|
47
|
+
#
|
48
|
+
# * `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.
|
49
|
+
# * `authenticated` - A boolean flag indicating whether or not you sent valid credentials with your API request.
|
50
|
+
# * `authenticationType` - If you provided valid credentials to the API, this field will tell you whether you used Bearer, Username, or LicenseKey authentication.
|
51
|
+
# * `authenticatedUserName` - If you provided valid credentials to the API, this field will tell you the username of the currently logged in user.
|
52
|
+
# * `authenticatedUserId` - If you provided valid credentials to the API, this field will tell you the user ID of the currently logged in user.
|
53
|
+
# * `authenticatedAccountId` - If you provided valid credentials to the API, this field will contain the account ID of the currently logged in user.
|
54
|
+
#
|
55
|
+
# This API helps diagnose connectivity problems between your application and AvaTax; you may call this API even
|
56
|
+
# if you do not have verified connection credentials. If this API fails, either your computer is not connected to
|
57
|
+
# the internet, or there is a routing problem between your office and Avalara, or the Avalara server is not available.
|
58
|
+
# For more information on the uptime of AvaTax, please see [Avalara's AvaTax Status Page](https://status.avalara.com/).
|
59
|
+
#
|
60
|
+
# ### Security Policies
|
61
|
+
#
|
62
|
+
# * This API may be called without providing authentication credentials.
|
63
|
+
# @return [Object]
|
64
|
+
def ping()
|
65
|
+
path = "/api/v2/utilities/ping"
|
66
|
+
get(path)
|
67
|
+
end
|
68
|
+
|
69
|
+
end
|
70
|
+
end
|
71
71
|
end
|
data/lib/avatax/connection.rb
CHANGED
@@ -1,4 +1,4 @@
|
|
1
|
-
require 'faraday_middleware
|
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 :
|
30
|
+
faraday.response :json, content_type: /\bjson$/
|
31
31
|
faraday.basic_auth(username, password)
|
32
32
|
|
33
33
|
if logger
|
data/lib/avatax/request.rb
CHANGED
@@ -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)}")
|
data/lib/avatax/version.rb
CHANGED
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:
|
4
|
+
version: 20.7.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:
|
11
|
+
date: 2020-07-16 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
|
@@ -218,15 +204,8 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
218
204
|
- !ruby/object:Gem::Version
|
219
205
|
version: 2.0.0
|
220
206
|
requirements: []
|
221
|
-
|
222
|
-
rubygems_version: 2.5.2.3
|
207
|
+
rubygems_version: 3.0.8
|
223
208
|
signing_key:
|
224
209
|
specification_version: 4
|
225
210
|
summary: Ruby wrapper for the AvaTax API
|
226
|
-
test_files:
|
227
|
-
- spec/avatax/client/accounts_spec.rb
|
228
|
-
- spec/avatax/client/transactions_spec.rb
|
229
|
-
- spec/avatax_spec.rb
|
230
|
-
- spec/credentials.yaml.example
|
231
|
-
- spec/fixtures/accounts.json
|
232
|
-
- spec/spec_helper.rb
|
211
|
+
test_files: []
|