avatax 21.8.0 → 22.2.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/.gitignore +55 -55
- data/.rspec +1 -1
- data/.travis.yml +18 -18
- data/.vs/VSWorkspaceState.json +5 -5
- data/.yardopts +4 -4
- data/Gemfile +2 -2
- data/LICENSE +201 -201
- data/README.md +98 -98
- data/Rakefile +9 -9
- data/avatax.gemspec +38 -38
- data/example/avatax.rb +47 -47
- data/example/credentials.example.yaml +5 -5
- data/lib/avatax/api.rb +27 -27
- data/lib/avatax/client/accounts.rb +94 -83
- data/lib/avatax/client/addresses.rb +22 -20
- data/lib/avatax/client/advancedrules.rb +46 -41
- data/lib/avatax/client/ageverification.rb +29 -0
- data/lib/avatax/client/avafileforms.rb +46 -41
- data/lib/avatax/client/batches.rb +70 -62
- data/lib/avatax/client/certexpressinvites.rb +30 -27
- data/lib/avatax/client/certificates.rb +126 -111
- data/lib/avatax/client/companies.rb +192 -152
- data/lib/avatax/client/compliance.rb +25 -14
- data/lib/avatax/client/contacts.rb +54 -48
- data/lib/avatax/client/customers.rb +110 -97
- data/lib/avatax/client/datasources.rb +54 -48
- data/lib/avatax/client/definitions.rb +620 -446
- data/lib/avatax/client/distancethresholds.rb +54 -48
- data/lib/avatax/client/ecms.rb +73 -73
- data/lib/avatax/client/ecommercetoken.rb +20 -18
- data/lib/avatax/client/errortransactions.rb +61 -61
- data/lib/avatax/client/filingcalendars.rb +44 -20
- data/lib/avatax/client/filings.rb +24 -20
- data/lib/avatax/client/firmclientlinkages.rb +78 -69
- data/lib/avatax/client/free.rb +14 -13
- data/lib/avatax/client/fundingrequests.rb +22 -20
- data/lib/avatax/client/items.rb +206 -181
- data/lib/avatax/client/jurisdictionoverrides.rb +54 -48
- data/lib/avatax/client/locations.rb +102 -90
- data/lib/avatax/client/multidocument.rb +86 -76
- data/lib/avatax/client/nexus.rb +146 -103
- data/lib/avatax/client/notices.rb +30 -26
- data/lib/avatax/client/notifications.rb +30 -27
- data/lib/avatax/client/onboarding.rb +55 -55
- data/lib/avatax/client/pointofsale.rb +21 -21
- data/lib/avatax/client/provisioning.rb +22 -20
- data/lib/avatax/client/registrar.rb +94 -83
- data/lib/avatax/client/reports.rb +38 -34
- data/lib/avatax/client/settings.rb +54 -48
- data/lib/avatax/client/shippingverification.rb +66 -0
- data/lib/avatax/client/subscriptions.rb +30 -27
- data/lib/avatax/client/taxcodes.rb +54 -48
- data/lib/avatax/client/taxcontent.rb +46 -41
- data/lib/avatax/client/taxprofiles.rb +42 -42
- data/lib/avatax/client/taxrules.rb +56 -50
- data/lib/avatax/client/transactions.rb +174 -153
- data/lib/avatax/client/upcs.rb +54 -48
- data/lib/avatax/client/userdefinedfields.rb +52 -0
- data/lib/avatax/client/users.rb +70 -62
- data/lib/avatax/client/utilities.rb +30 -27
- data/lib/avatax/client.rb +37 -35
- data/lib/avatax/configuration.rb +76 -76
- data/lib/avatax/connection.rb +49 -49
- data/lib/avatax/request.rb +51 -42
- data/lib/avatax/version.rb +3 -3
- data/lib/avatax.rb +26 -26
- data/spec/avatax/client/accounts_spec.rb +13 -13
- data/spec/avatax/client/transactions_spec.rb +80 -80
- data/spec/avatax/request_spec.rb +25 -25
- data/spec/avatax_spec.rb +45 -45
- data/spec/credentials.yaml.example +4 -4
- data/spec/fixtures/accounts.json +15 -15
- data/spec/spec_helper.rb +27 -27
- metadata +9 -13
data/spec/avatax_spec.rb
CHANGED
@@ -1,45 +1,45 @@
|
|
1
|
-
require File.expand_path('../spec_helper', __FILE__)
|
2
|
-
if File.exist?(File.expand_path('../credentials.yaml', __FILE__))
|
3
|
-
credentials = YAML.load_file(File.expand_path('../credentials.yaml', __FILE__))
|
4
|
-
else
|
5
|
-
credentials = {
|
6
|
-
"endpoint" => 'https://sandbox-rest.avatax.com',
|
7
|
-
"username" => ENV['SANDBOX_USERNAME'],
|
8
|
-
"password" => ENV['SANDBOX_PASSWORD'],
|
9
|
-
}
|
10
|
-
end
|
11
|
-
|
12
|
-
describe AvaTax do
|
13
|
-
|
14
|
-
describe ".client" do
|
15
|
-
it "should be a AvaTax::Client" do
|
16
|
-
expect(AvaTax.client).to be_a AvaTax::Client
|
17
|
-
end
|
18
|
-
end
|
19
|
-
|
20
|
-
describe ".endpoint" do
|
21
|
-
it "should return the default endpoint" do
|
22
|
-
expect(AvaTax.endpoint).to eq credentials['endpoint']
|
23
|
-
end
|
24
|
-
end
|
25
|
-
|
26
|
-
describe ".endpoint=" do
|
27
|
-
it "should set the endpoint" do
|
28
|
-
AvaTax.endpoint = 'https://sandbox-rest.avatax.com'
|
29
|
-
expect(AvaTax.endpoint).to eq 'https://sandbox-rest.avatax.com'
|
30
|
-
end
|
31
|
-
end
|
32
|
-
|
33
|
-
describe ".configure" do
|
34
|
-
|
35
|
-
AvaTax::Configuration::VALID_OPTIONS_KEYS.each do |key|
|
36
|
-
|
37
|
-
it "should set the #{key}" do
|
38
|
-
AvaTax.configure do |config|
|
39
|
-
config.send("#{key}=", key)
|
40
|
-
expect(AvaTax.send(key)).to eq key
|
41
|
-
end
|
42
|
-
end
|
43
|
-
end
|
44
|
-
end
|
45
|
-
end
|
1
|
+
require File.expand_path('../spec_helper', __FILE__)
|
2
|
+
if File.exist?(File.expand_path('../credentials.yaml', __FILE__))
|
3
|
+
credentials = YAML.load_file(File.expand_path('../credentials.yaml', __FILE__))
|
4
|
+
else
|
5
|
+
credentials = {
|
6
|
+
"endpoint" => 'https://sandbox-rest.avatax.com',
|
7
|
+
"username" => ENV['SANDBOX_USERNAME'],
|
8
|
+
"password" => ENV['SANDBOX_PASSWORD'],
|
9
|
+
}
|
10
|
+
end
|
11
|
+
|
12
|
+
describe AvaTax do
|
13
|
+
|
14
|
+
describe ".client" do
|
15
|
+
it "should be a AvaTax::Client" do
|
16
|
+
expect(AvaTax.client).to be_a AvaTax::Client
|
17
|
+
end
|
18
|
+
end
|
19
|
+
|
20
|
+
describe ".endpoint" do
|
21
|
+
it "should return the default endpoint" do
|
22
|
+
expect(AvaTax.endpoint).to eq credentials['endpoint']
|
23
|
+
end
|
24
|
+
end
|
25
|
+
|
26
|
+
describe ".endpoint=" do
|
27
|
+
it "should set the endpoint" do
|
28
|
+
AvaTax.endpoint = 'https://sandbox-rest.avatax.com'
|
29
|
+
expect(AvaTax.endpoint).to eq 'https://sandbox-rest.avatax.com'
|
30
|
+
end
|
31
|
+
end
|
32
|
+
|
33
|
+
describe ".configure" do
|
34
|
+
|
35
|
+
AvaTax::Configuration::VALID_OPTIONS_KEYS.each do |key|
|
36
|
+
|
37
|
+
it "should set the #{key}" do
|
38
|
+
AvaTax.configure do |config|
|
39
|
+
config.send("#{key}=", key)
|
40
|
+
expect(AvaTax.send(key)).to eq key
|
41
|
+
end
|
42
|
+
end
|
43
|
+
end
|
44
|
+
end
|
45
|
+
end
|
@@ -1,4 +1,4 @@
|
|
1
|
-
---
|
2
|
-
endpoint: https://sandbox-rest.avatax.com
|
3
|
-
username: ---
|
4
|
-
password: ---
|
1
|
+
---
|
2
|
+
endpoint: https://sandbox-rest.avatax.com
|
3
|
+
username: ---
|
4
|
+
password: ---
|
data/spec/fixtures/accounts.json
CHANGED
@@ -1,16 +1,16 @@
|
|
1
|
-
{
|
2
|
-
"@recordsetCount": 1,
|
3
|
-
"value": [
|
4
|
-
{
|
5
|
-
"id": 200000251,
|
6
|
-
"name": "Avalara",
|
7
|
-
"effectiveDate": "2015-11-05T00:00:00",
|
8
|
-
"endDate": "2999-02-05T00:00:00",
|
9
|
-
"accountStatusId": "Active",
|
10
|
-
"createdDate": "2015-11-05T22:11:17.593",
|
11
|
-
"createdUserId": 46103,
|
12
|
-
"modifiedDate": "2017-01-10T18:55:36.193",
|
13
|
-
"modifiedUserId": 54057
|
14
|
-
}
|
15
|
-
]
|
1
|
+
{
|
2
|
+
"@recordsetCount": 1,
|
3
|
+
"value": [
|
4
|
+
{
|
5
|
+
"id": 200000251,
|
6
|
+
"name": "Avalara",
|
7
|
+
"effectiveDate": "2015-11-05T00:00:00",
|
8
|
+
"endDate": "2999-02-05T00:00:00",
|
9
|
+
"accountStatusId": "Active",
|
10
|
+
"createdDate": "2015-11-05T22:11:17.593",
|
11
|
+
"createdUserId": 46103,
|
12
|
+
"modifiedDate": "2017-01-10T18:55:36.193",
|
13
|
+
"modifiedUserId": 54057
|
14
|
+
}
|
15
|
+
]
|
16
16
|
}
|
data/spec/spec_helper.rb
CHANGED
@@ -1,27 +1,27 @@
|
|
1
|
-
require File.expand_path('../../lib/avatax', __FILE__)
|
2
|
-
require 'rspec'
|
3
|
-
require 'yaml'
|
4
|
-
|
5
|
-
|
6
|
-
AvaTax.configure do |config|
|
7
|
-
if File.exist?(File.expand_path('../credentials.yaml', __FILE__))
|
8
|
-
credentials = YAML.load_file(File.expand_path('../credentials.yaml', __FILE__))
|
9
|
-
config.endpoint = credentials['endpoint']
|
10
|
-
config.username = credentials['username']
|
11
|
-
config.password = credentials['password']
|
12
|
-
else
|
13
|
-
config.endpoint = 'https://sandbox-rest.avatax.com'
|
14
|
-
config.username = ENV['SANDBOX_USERNAME']
|
15
|
-
config.password = ENV['SANDBOX_PASSWORD']
|
16
|
-
end
|
17
|
-
end
|
18
|
-
|
19
|
-
client = AvaTax::Client.new()
|
20
|
-
companies = client.query_companies
|
21
|
-
|
22
|
-
RSpec.configure do |config|
|
23
|
-
config.before {
|
24
|
-
@client = client
|
25
|
-
@company_code = companies["value"][0]["companyCode"]
|
26
|
-
}
|
27
|
-
end
|
1
|
+
require File.expand_path('../../lib/avatax', __FILE__)
|
2
|
+
require 'rspec'
|
3
|
+
require 'yaml'
|
4
|
+
|
5
|
+
|
6
|
+
AvaTax.configure do |config|
|
7
|
+
if File.exist?(File.expand_path('../credentials.yaml', __FILE__))
|
8
|
+
credentials = YAML.load_file(File.expand_path('../credentials.yaml', __FILE__))
|
9
|
+
config.endpoint = credentials['endpoint']
|
10
|
+
config.username = credentials['username']
|
11
|
+
config.password = credentials['password']
|
12
|
+
else
|
13
|
+
config.endpoint = 'https://sandbox-rest.avatax.com'
|
14
|
+
config.username = ENV['SANDBOX_USERNAME']
|
15
|
+
config.password = ENV['SANDBOX_PASSWORD']
|
16
|
+
end
|
17
|
+
end
|
18
|
+
|
19
|
+
client = AvaTax::Client.new()
|
20
|
+
companies = client.query_companies
|
21
|
+
|
22
|
+
RSpec.configure do |config|
|
23
|
+
config.before {
|
24
|
+
@client = client
|
25
|
+
@company_code = companies["value"][0]["companyCode"]
|
26
|
+
}
|
27
|
+
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:
|
4
|
+
version: 22.2.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Marcus Vorwaller
|
8
|
-
autorequire:
|
8
|
+
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date:
|
11
|
+
date: 2022-01-28 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: rake
|
@@ -121,6 +121,7 @@ files:
|
|
121
121
|
- lib/avatax/client/accounts.rb
|
122
122
|
- lib/avatax/client/addresses.rb
|
123
123
|
- lib/avatax/client/advancedrules.rb
|
124
|
+
- lib/avatax/client/ageverification.rb
|
124
125
|
- lib/avatax/client/avafileforms.rb
|
125
126
|
- lib/avatax/client/batches.rb
|
126
127
|
- lib/avatax/client/certexpressinvites.rb
|
@@ -153,6 +154,7 @@ files:
|
|
153
154
|
- lib/avatax/client/registrar.rb
|
154
155
|
- lib/avatax/client/reports.rb
|
155
156
|
- lib/avatax/client/settings.rb
|
157
|
+
- lib/avatax/client/shippingverification.rb
|
156
158
|
- lib/avatax/client/subscriptions.rb
|
157
159
|
- lib/avatax/client/taxContent/README.txt
|
158
160
|
- lib/avatax/client/taxRatesByZip/README.txt
|
@@ -162,6 +164,7 @@ files:
|
|
162
164
|
- lib/avatax/client/taxrules.rb
|
163
165
|
- lib/avatax/client/transactions.rb
|
164
166
|
- lib/avatax/client/upcs.rb
|
167
|
+
- lib/avatax/client/userdefinedfields.rb
|
165
168
|
- lib/avatax/client/users.rb
|
166
169
|
- lib/avatax/client/utilities.rb
|
167
170
|
- lib/avatax/configuration.rb
|
@@ -206,15 +209,8 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
206
209
|
- !ruby/object:Gem::Version
|
207
210
|
version: 2.0.0
|
208
211
|
requirements: []
|
209
|
-
rubygems_version: 3.
|
210
|
-
signing_key:
|
212
|
+
rubygems_version: 3.2.22
|
213
|
+
signing_key:
|
211
214
|
specification_version: 4
|
212
215
|
summary: Ruby wrapper for the AvaTax API
|
213
|
-
test_files:
|
214
|
-
- spec/avatax/client/accounts_spec.rb
|
215
|
-
- spec/avatax/client/transactions_spec.rb
|
216
|
-
- spec/avatax/request_spec.rb
|
217
|
-
- spec/avatax_spec.rb
|
218
|
-
- spec/credentials.yaml.example
|
219
|
-
- spec/fixtures/accounts.json
|
220
|
-
- spec/spec_helper.rb
|
216
|
+
test_files: []
|