corgibytes-tax_cloud 0.9.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +17 -0
- data/.circleci/config.yml +81 -0
- data/.circleci/setup-rubygems.sh +9 -0
- data/.gitignore +67 -0
- data/.rubocop.yml +6 -0
- data/.rubocop_todo.yml +66 -0
- data/.travis.yml +7 -0
- data/CHANGELOG.rdoc +48 -0
- data/CONTRIBUTORS.txt +23 -0
- data/Dockerfile +9 -0
- data/Gemfile +22 -0
- data/LICENSE +23 -0
- data/README.md +190 -0
- data/Rakefile +29 -0
- data/docker-compose.yml +10 -0
- data/examples/.env.example +2 -0
- data/examples/lookup_example.rb +139 -0
- data/lib/config/locales/en.yml +34 -0
- data/lib/hash.rb +8 -0
- data/lib/savon_soap_xml.rb +32 -0
- data/lib/tasks/tax_cloud.rake +18 -0
- data/lib/tasks/tax_code_groups.rake +37 -0
- data/lib/tasks/tax_codes.rake +43 -0
- data/lib/tax_cloud.rb +70 -0
- data/lib/tax_cloud/address.rb +50 -0
- data/lib/tax_cloud/cart_item.rb +26 -0
- data/lib/tax_cloud/client.rb +60 -0
- data/lib/tax_cloud/configuration.rb +28 -0
- data/lib/tax_cloud/errors.rb +6 -0
- data/lib/tax_cloud/errors/api_error.rb +17 -0
- data/lib/tax_cloud/errors/missing_config_error.rb +13 -0
- data/lib/tax_cloud/errors/missing_config_option_error.rb +19 -0
- data/lib/tax_cloud/errors/soap_error.rb +30 -0
- data/lib/tax_cloud/errors/tax_cloud_error.rb +83 -0
- data/lib/tax_cloud/errors/unexpected_soap_response_error.rb +19 -0
- data/lib/tax_cloud/record.rb +14 -0
- data/lib/tax_cloud/responses.rb +13 -0
- data/lib/tax_cloud/responses/authorized.rb +10 -0
- data/lib/tax_cloud/responses/authorized_with_capture.rb +10 -0
- data/lib/tax_cloud/responses/base.rb +82 -0
- data/lib/tax_cloud/responses/captured.rb +10 -0
- data/lib/tax_cloud/responses/cart_item.rb +23 -0
- data/lib/tax_cloud/responses/generic.rb +31 -0
- data/lib/tax_cloud/responses/lookup.rb +38 -0
- data/lib/tax_cloud/responses/ping.rb +10 -0
- data/lib/tax_cloud/responses/returned.rb +10 -0
- data/lib/tax_cloud/responses/tax_code_groups.rb +30 -0
- data/lib/tax_cloud/responses/tax_codes.rb +30 -0
- data/lib/tax_cloud/responses/tax_codes_by_group.rb +30 -0
- data/lib/tax_cloud/responses/verify_address.rb +26 -0
- data/lib/tax_cloud/tax_code.rb +11 -0
- data/lib/tax_cloud/tax_code_constants.rb +560 -0
- data/lib/tax_cloud/tax_code_group.rb +28 -0
- data/lib/tax_cloud/tax_code_group_constants.rb +31 -0
- data/lib/tax_cloud/tax_code_groups.rb +25 -0
- data/lib/tax_cloud/tax_codes.rb +25 -0
- data/lib/tax_cloud/transaction.rb +118 -0
- data/lib/tax_cloud/version.rb +4 -0
- data/tax_cloud.gemspec +23 -0
- data/test/cassettes/authorized.yml +826 -0
- data/test/cassettes/authorized_with_capture.yml +826 -0
- data/test/cassettes/authorized_with_localized_time.yml +826 -0
- data/test/cassettes/captured.yml +872 -0
- data/test/cassettes/get_tic_groups.yml +783 -0
- data/test/cassettes/get_tics.yml +1079 -0
- data/test/cassettes/get_tics_by_group.yml +776 -0
- data/test/cassettes/invalid_soap_call.yml +778 -0
- data/test/cassettes/lookup.yml +780 -0
- data/test/cassettes/lookup_ny.yml +780 -0
- data/test/cassettes/ping.yml +776 -0
- data/test/cassettes/ping_with_invalid_credentials.yml +774 -0
- data/test/cassettes/ping_with_invalid_response.yml +774 -0
- data/test/cassettes/returned.yml +872 -0
- data/test/cassettes/verify_bad_address.yml +772 -0
- data/test/cassettes/verify_good_address.yml +772 -0
- data/test/helper.rb +17 -0
- data/test/test_address.rb +54 -0
- data/test/test_cart_item.rb +15 -0
- data/test/test_client.rb +27 -0
- data/test/test_configuration_optional_keys.rb +42 -0
- data/test/test_configuration_required_keys.rb +31 -0
- data/test/test_lookup_response.rb +20 -0
- data/test/test_setup.rb +17 -0
- data/test/test_soap.rb +11 -0
- data/test/test_tax_code_groups.rb +29 -0
- data/test/test_tax_codes.rb +17 -0
- data/test/test_transaction.rb +78 -0
- data/test/test_transaction_ny.rb +25 -0
- data/test/vcr_setup.rb +9 -0
- metadata +174 -0
data/test/helper.rb
ADDED
@@ -0,0 +1,17 @@
|
|
1
|
+
require 'minitest/autorun'
|
2
|
+
require 'tax_cloud'
|
3
|
+
require 'json'
|
4
|
+
|
5
|
+
# If not included then no test reports are generated
|
6
|
+
# for Circle CI builds.
|
7
|
+
require 'minitest/ci'
|
8
|
+
|
9
|
+
|
10
|
+
Savon.configure do |config|
|
11
|
+
config.log = false
|
12
|
+
end
|
13
|
+
|
14
|
+
HTTPI.log = false
|
15
|
+
|
16
|
+
require 'vcr_setup'
|
17
|
+
require 'test_setup'
|
@@ -0,0 +1,54 @@
|
|
1
|
+
require 'helper'
|
2
|
+
|
3
|
+
class TestAddress < TestSetup
|
4
|
+
def setup
|
5
|
+
super
|
6
|
+
@address = TaxCloud::Address.new address1: '888 6th Ave', city: 'New York', state: 'New York', zip5: '10001'
|
7
|
+
end
|
8
|
+
|
9
|
+
def test_initialize
|
10
|
+
assert_equal '888 6th Ave', @address.address1
|
11
|
+
assert_equal nil, @address.address2
|
12
|
+
assert_equal 'New York', @address.city
|
13
|
+
assert_equal 'New York', @address.state
|
14
|
+
assert_equal '10001', @address.zip5
|
15
|
+
assert_equal nil, @address.zip4
|
16
|
+
end
|
17
|
+
|
18
|
+
def test_zip
|
19
|
+
assert_equal '10001', @address.zip
|
20
|
+
# 9-digit zip
|
21
|
+
@address.zip4 = '1234'
|
22
|
+
assert_equal '10001-1234', @address.zip
|
23
|
+
# only 4-digit zip, which is invalid
|
24
|
+
@address.zip5 = nil
|
25
|
+
assert_equal nil, @address.zip
|
26
|
+
end
|
27
|
+
|
28
|
+
def test_address_respond_to_verify
|
29
|
+
assert_respond_to @address, :verify
|
30
|
+
end
|
31
|
+
|
32
|
+
def test_verify_good_address
|
33
|
+
VCR.use_cassette('verify good address') do
|
34
|
+
verified = @address.verify
|
35
|
+
assert_instance_of TaxCloud::Address, verified
|
36
|
+
assert_equal '888 6TH AVE', verified.address1
|
37
|
+
assert_equal nil, verified.address2
|
38
|
+
assert_equal 'NEW YORK', verified.city
|
39
|
+
assert_equal 'NY', verified.state
|
40
|
+
assert_equal '10001', verified.zip5
|
41
|
+
assert_equal '3502', verified.zip4
|
42
|
+
end
|
43
|
+
end
|
44
|
+
|
45
|
+
def test_verify_bad_address
|
46
|
+
e = assert_raises TaxCloud::Errors::ApiError do
|
47
|
+
VCR.use_cassette('verify bad address') do
|
48
|
+
bad_address = TaxCloud::Address.new address1: '10001 Test Street', city: 'New York', state: 'New York', zip5: '99999'
|
49
|
+
bad_address.verify
|
50
|
+
end
|
51
|
+
end
|
52
|
+
assert_equal e.problem, 'Invalid Zip Code.'
|
53
|
+
end
|
54
|
+
end
|
@@ -0,0 +1,15 @@
|
|
1
|
+
require 'helper'
|
2
|
+
|
3
|
+
class TestCartItem < Minitest::Test
|
4
|
+
def setup
|
5
|
+
@cart_item = TaxCloud::CartItem.new index: 0, item_id: 'SKU-100', tic: '0000', price: 50.00, quantity: 3
|
6
|
+
end
|
7
|
+
|
8
|
+
def test_variables
|
9
|
+
assert_equal 0, @cart_item.index
|
10
|
+
assert_equal 'SKU-100', @cart_item.item_id
|
11
|
+
assert_equal '0000', @cart_item.tic
|
12
|
+
assert_equal 50.00, @cart_item.price
|
13
|
+
assert_equal 3, @cart_item.quantity
|
14
|
+
end
|
15
|
+
end
|
data/test/test_client.rb
ADDED
@@ -0,0 +1,27 @@
|
|
1
|
+
require 'helper'
|
2
|
+
|
3
|
+
class TestClient < TestSetup
|
4
|
+
def test_ping_with_invalid_credentials
|
5
|
+
assert_raises TaxCloud::Errors::ApiError do
|
6
|
+
VCR.use_cassette('ping_with_invalid_credentials') do
|
7
|
+
TaxCloud.client.ping
|
8
|
+
end
|
9
|
+
end
|
10
|
+
end
|
11
|
+
|
12
|
+
def test_ping_with_invalid_response
|
13
|
+
e = assert_raises TaxCloud::Errors::UnexpectedSoapResponse do
|
14
|
+
VCR.use_cassette('ping_with_invalid_response') do
|
15
|
+
TaxCloud.client.ping
|
16
|
+
end
|
17
|
+
end
|
18
|
+
assert_equal 'Expected a value for `ping_result` in `ping_response/ping_result/response_type` in the TaxCloud response.', e.problem
|
19
|
+
end
|
20
|
+
|
21
|
+
def test_ping
|
22
|
+
VCR.use_cassette('ping') do
|
23
|
+
response = TaxCloud.client.ping
|
24
|
+
assert_equal 'OK', response
|
25
|
+
end
|
26
|
+
end
|
27
|
+
end
|
@@ -0,0 +1,42 @@
|
|
1
|
+
require 'helper'
|
2
|
+
|
3
|
+
describe 'TaxCloud::Configuration' do
|
4
|
+
def request
|
5
|
+
TaxCloud.client.instance_variable_get('@wsdl').request
|
6
|
+
end
|
7
|
+
|
8
|
+
def reset_and_configure(options = {})
|
9
|
+
TaxCloud.reset!
|
10
|
+
TaxCloud.configure do |config|
|
11
|
+
config.api_key = 'stubbed_api_key'
|
12
|
+
config.api_login_id = 'stubbed_api_login_id'
|
13
|
+
options.each do |key, value|
|
14
|
+
config.public_send("#{key}=", value)
|
15
|
+
end
|
16
|
+
end
|
17
|
+
end
|
18
|
+
|
19
|
+
describe 'open_timeout option' do
|
20
|
+
it 'has set default to 2' do
|
21
|
+
reset_and_configure
|
22
|
+
assert_equal 2, request.open_timeout
|
23
|
+
end
|
24
|
+
|
25
|
+
it 'can be changed via configuration' do
|
26
|
+
reset_and_configure(open_timeout: 3)
|
27
|
+
assert_equal 3, request.open_timeout
|
28
|
+
end
|
29
|
+
end
|
30
|
+
|
31
|
+
describe 'read_timeout option' do
|
32
|
+
it 'has set default to 2' do
|
33
|
+
reset_and_configure
|
34
|
+
assert_equal 2, request.read_timeout
|
35
|
+
end
|
36
|
+
|
37
|
+
it 'can be changed via configuration' do
|
38
|
+
reset_and_configure(read_timeout: 3)
|
39
|
+
assert_equal 3, request.read_timeout
|
40
|
+
end
|
41
|
+
end
|
42
|
+
end
|
@@ -0,0 +1,31 @@
|
|
1
|
+
require 'helper'
|
2
|
+
|
3
|
+
class TestConfigurationRequiredKeys < Minitest::Test
|
4
|
+
def setup
|
5
|
+
TaxCloud.reset!
|
6
|
+
end
|
7
|
+
|
8
|
+
def test_missing_configuration
|
9
|
+
assert_raises TaxCloud::Errors::MissingConfig do
|
10
|
+
TaxCloud.client.request :dummy, body: {}
|
11
|
+
end
|
12
|
+
end
|
13
|
+
|
14
|
+
def test_mising_api_login_id
|
15
|
+
TaxCloud.configure do |config|
|
16
|
+
config.api_key = 'taxcloud_api_key'
|
17
|
+
end
|
18
|
+
assert_raises TaxCloud::Errors::MissingConfigOption do
|
19
|
+
TaxCloud.client.request :dummy, body: {}
|
20
|
+
end
|
21
|
+
end
|
22
|
+
|
23
|
+
def test_mising_api_key
|
24
|
+
TaxCloud.configure do |config|
|
25
|
+
config.api_login_id = 'taxcloud_api_login_id'
|
26
|
+
end
|
27
|
+
assert_raises TaxCloud::Errors::MissingConfigOption do
|
28
|
+
TaxCloud.client.request :dummy, body: {}
|
29
|
+
end
|
30
|
+
end
|
31
|
+
end
|
@@ -0,0 +1,20 @@
|
|
1
|
+
require 'helper'
|
2
|
+
|
3
|
+
class TestLookupResponse < TestSetup
|
4
|
+
class MockLookup < TaxCloud::Responses::Lookup
|
5
|
+
def initialize; end
|
6
|
+
end
|
7
|
+
|
8
|
+
def test_tax_amount_handles_decimal_addition_properly
|
9
|
+
response = TestLookupResponse::MockLookup.new
|
10
|
+
|
11
|
+
# `tax_amount`s chosen to provoke floating point arithmetic error
|
12
|
+
mock_savon_cart_items = [
|
13
|
+
{ cart_item_index: '0', tax_amount: '0.35' },
|
14
|
+
{ cart_item_index: '1', tax_amount: '0.7' }
|
15
|
+
]
|
16
|
+
response.cart_items = mock_savon_cart_items.map { |i| TaxCloud::Responses::CartItem.new(i) }
|
17
|
+
|
18
|
+
assert_equal 1.05, response.tax_amount
|
19
|
+
end
|
20
|
+
end
|
data/test/test_setup.rb
ADDED
@@ -0,0 +1,17 @@
|
|
1
|
+
class TestSetup < Minitest::Test
|
2
|
+
def default_test
|
3
|
+
# placeholder to avoid error under Ruby 1.8.7
|
4
|
+
end
|
5
|
+
|
6
|
+
def setup
|
7
|
+
TaxCloud.configure do |config|
|
8
|
+
config.api_login_id = ENV['TAXCLOUD_API_LOGIN_ID'] || 'taxcloud_api_login_id'
|
9
|
+
config.api_key = ENV['TAXCLOUD_API_KEY'] || 'taxcloud_api_key'
|
10
|
+
config.usps_username = ENV['TAXCLOUD_USPS_USERNAME'] || 'usps_username'
|
11
|
+
end
|
12
|
+
end
|
13
|
+
|
14
|
+
def teardown
|
15
|
+
TaxCloud.reset!
|
16
|
+
end
|
17
|
+
end
|
data/test/test_soap.rb
ADDED
@@ -0,0 +1,29 @@
|
|
1
|
+
require 'helper'
|
2
|
+
|
3
|
+
class TestTaxCodeGroups < TestSetup
|
4
|
+
def test_all
|
5
|
+
VCR.use_cassette('get_tic_groups') do
|
6
|
+
assert TaxCloud::TaxCode::Groups.all.count > 0
|
7
|
+
end
|
8
|
+
end
|
9
|
+
|
10
|
+
def test_lookup
|
11
|
+
VCR.use_cassette('get_tic_groups') do
|
12
|
+
tax_code_group = TaxCloud::TaxCode::Groups[TaxCloud::TaxCode::Groups::SCHOOL_RELATED_PRODUCTS]
|
13
|
+
assert_equal TaxCloud::TaxCode::Groups::SCHOOL_RELATED_PRODUCTS, tax_code_group.group_id
|
14
|
+
assert_equal 'School Related Products', tax_code_group.description
|
15
|
+
end
|
16
|
+
end
|
17
|
+
|
18
|
+
def test_lookup_tax_codes
|
19
|
+
tax_code_group = VCR.use_cassette('get_tic_groups') do
|
20
|
+
TaxCloud::TaxCode::Groups[TaxCloud::TaxCode::Groups::SCHOOL_RELATED_PRODUCTS]
|
21
|
+
end
|
22
|
+
VCR.use_cassette('get_tics_by_group') do
|
23
|
+
assert tax_code_group.tax_codes.count > 0
|
24
|
+
tax_code = tax_code_group[TaxCloud::TaxCodes::SCHOOL_INSTRUCTIONAL_MATERIAL]
|
25
|
+
assert_equal TaxCloud::TaxCodes::SCHOOL_INSTRUCTIONAL_MATERIAL, tax_code.ticid
|
26
|
+
assert_equal 'School instructional material', tax_code.description
|
27
|
+
end
|
28
|
+
end
|
29
|
+
end
|
@@ -0,0 +1,17 @@
|
|
1
|
+
require 'helper'
|
2
|
+
|
3
|
+
class TestTaxCode < TestSetup
|
4
|
+
def test_all
|
5
|
+
VCR.use_cassette('get_tics') do
|
6
|
+
assert TaxCloud::TaxCodes.all.count > 0
|
7
|
+
end
|
8
|
+
end
|
9
|
+
|
10
|
+
def test_lookup
|
11
|
+
VCR.use_cassette('get_tics') do
|
12
|
+
tax_code = TaxCloud::TaxCodes[TaxCloud::TaxCodes::DIRECT_MAIL_RELATED]
|
13
|
+
assert_equal TaxCloud::TaxCodes::DIRECT_MAIL_RELATED, tax_code.ticid
|
14
|
+
assert_equal 'Direct-mail related', tax_code.description
|
15
|
+
end
|
16
|
+
end
|
17
|
+
end
|
@@ -0,0 +1,78 @@
|
|
1
|
+
require 'helper'
|
2
|
+
|
3
|
+
class TestTransaction < TestSetup
|
4
|
+
def setup
|
5
|
+
super
|
6
|
+
origin = TaxCloud::Address.new(address1: '162 East Avenue', address2: 'Third Floor', city: 'Norwalk', state: 'CT', zip5: '06851')
|
7
|
+
destination = TaxCloud::Address.new(address1: '3121 West Government Way', address2: 'Suite 2B', city: 'Seattle', state: 'WA', zip5: '98199')
|
8
|
+
cart_items = []
|
9
|
+
cart_items << TaxCloud::CartItem.new(index: 0, item_id: 'SKU-TEST', tic: TaxCloud::TaxCodes::GENERAL, quantity: 1, price: 50.00)
|
10
|
+
cart_items << TaxCloud::CartItem.new(index: 1, item_id: 'SKU-TEST1', tic: TaxCloud::TaxCodes::GENERAL, quantity: 1, price: 100.00)
|
11
|
+
@transaction = TaxCloud::Transaction.new(customer_id: 42, cart_id: rand(18_446_744_073_709_551_616), order_id: rand(18_446_744_073_709_551_616), cart_items: cart_items, origin: origin, destination: destination)
|
12
|
+
end
|
13
|
+
|
14
|
+
def test_lookup
|
15
|
+
VCR.use_cassette('lookup') do
|
16
|
+
result = @transaction.lookup
|
17
|
+
assert_instance_of TaxCloud::Responses::Lookup, result
|
18
|
+
assert_equal 2, result.cart_items.count
|
19
|
+
result.cart_items.first.tap do |item|
|
20
|
+
assert_equal 0, item.cart_item_index
|
21
|
+
assert_equal 4.75, item.tax_amount
|
22
|
+
end
|
23
|
+
result.cart_items.last.tap do |item|
|
24
|
+
assert_equal 1, item.cart_item_index
|
25
|
+
assert_equal 9.5, item.tax_amount
|
26
|
+
end
|
27
|
+
assert_equal 14.25, result.tax_amount
|
28
|
+
end
|
29
|
+
end
|
30
|
+
|
31
|
+
def test_authorized
|
32
|
+
VCR.use_cassette('authorized') do
|
33
|
+
@transaction.lookup
|
34
|
+
result = @transaction.authorized
|
35
|
+
assert_equal 'OK', result
|
36
|
+
end
|
37
|
+
end
|
38
|
+
|
39
|
+
class LocalizedDate < Date
|
40
|
+
def to_s
|
41
|
+
strftime '%d/%m/%Y'
|
42
|
+
end
|
43
|
+
end
|
44
|
+
|
45
|
+
def test_authorized_with_localized_date
|
46
|
+
VCR.use_cassette('authorized_with_localized_time') do
|
47
|
+
@transaction.lookup
|
48
|
+
result = @transaction.authorized(date_authorized: LocalizedDate.civil(2013, 2, 1))
|
49
|
+
assert_equal 'OK', result
|
50
|
+
end
|
51
|
+
end
|
52
|
+
|
53
|
+
def test_captured
|
54
|
+
VCR.use_cassette('captured') do
|
55
|
+
@transaction.lookup
|
56
|
+
@transaction.authorized
|
57
|
+
result = @transaction.captured
|
58
|
+
assert_equal 'OK', result
|
59
|
+
end
|
60
|
+
end
|
61
|
+
|
62
|
+
def test_authorized_with_capture
|
63
|
+
VCR.use_cassette('authorized_with_capture') do
|
64
|
+
@transaction.lookup
|
65
|
+
result = @transaction.authorized_with_capture
|
66
|
+
assert_equal 'OK', result
|
67
|
+
end
|
68
|
+
end
|
69
|
+
|
70
|
+
def test_returned
|
71
|
+
VCR.use_cassette('returned') do
|
72
|
+
@transaction.lookup
|
73
|
+
@transaction.authorized_with_capture
|
74
|
+
result = @transaction.returned
|
75
|
+
assert_equal 'OK', result
|
76
|
+
end
|
77
|
+
end
|
78
|
+
end
|
@@ -0,0 +1,25 @@
|
|
1
|
+
require 'helper'
|
2
|
+
|
3
|
+
class TestTransactionNy < TestSetup
|
4
|
+
def setup
|
5
|
+
super
|
6
|
+
origin = TaxCloud::Address.new address1: '888 6th Ave', city: 'New York', state: 'NY', zip5: '10001'
|
7
|
+
destination = TaxCloud::Address.new address1: '888 6th Ave', city: 'New York', state: 'NY', zip5: '10001'
|
8
|
+
cart_items = [TaxCloud::CartItem.new(index: 0, item_id: 'SKU-TEST', tic: TaxCloud::TaxCodes::GENERAL, quantity: 1, price: 50.00)]
|
9
|
+
@transaction = TaxCloud::Transaction.new(customer_id: 42, cart_id: 708, order_id: rand(18_446_744_073_709_551_616), cart_items: cart_items, origin: origin, destination: destination)
|
10
|
+
end
|
11
|
+
|
12
|
+
def test_lookup_non_ssuta_state
|
13
|
+
VCR.use_cassette('lookup_ny') do
|
14
|
+
result = @transaction.lookup
|
15
|
+
assert_instance_of TaxCloud::Responses::Lookup, result
|
16
|
+
assert_equal '708', result.cart_id
|
17
|
+
assert_equal 1, result.cart_items.count
|
18
|
+
result.cart_items.first.tap do |item|
|
19
|
+
assert_equal 0, item.cart_item_index
|
20
|
+
assert_equal 0, item.tax_amount
|
21
|
+
end
|
22
|
+
assert_equal 0, result.tax_amount
|
23
|
+
end
|
24
|
+
end
|
25
|
+
end
|
data/test/vcr_setup.rb
ADDED
@@ -0,0 +1,9 @@
|
|
1
|
+
require 'vcr'
|
2
|
+
|
3
|
+
VCR.configure do |c|
|
4
|
+
c.cassette_library_dir = 'test/cassettes'
|
5
|
+
c.hook_into :webmock
|
6
|
+
c.filter_sensitive_data('api-login-id') { TaxCloud.configuration.api_login_id }
|
7
|
+
c.filter_sensitive_data('api-key') { TaxCloud.configuration.api_key }
|
8
|
+
c.filter_sensitive_data('usps-username') { TaxCloud.configuration.usps_username }
|
9
|
+
end
|
metadata
ADDED
@@ -0,0 +1,174 @@
|
|
1
|
+
--- !ruby/object:Gem::Specification
|
2
|
+
name: corgibytes-tax_cloud
|
3
|
+
version: !ruby/object:Gem::Version
|
4
|
+
version: 0.9.0
|
5
|
+
platform: ruby
|
6
|
+
authors:
|
7
|
+
- Corgibytes
|
8
|
+
autorequire:
|
9
|
+
bindir: bin
|
10
|
+
cert_chain: []
|
11
|
+
date: 2019-03-07 00:00:00.000000000 Z
|
12
|
+
dependencies:
|
13
|
+
- !ruby/object:Gem::Dependency
|
14
|
+
name: activesupport
|
15
|
+
requirement: !ruby/object:Gem::Requirement
|
16
|
+
requirements:
|
17
|
+
- - ! '>='
|
18
|
+
- !ruby/object:Gem::Version
|
19
|
+
version: '3.0'
|
20
|
+
type: :runtime
|
21
|
+
prerelease: false
|
22
|
+
version_requirements: !ruby/object:Gem::Requirement
|
23
|
+
requirements:
|
24
|
+
- - ! '>='
|
25
|
+
- !ruby/object:Gem::Version
|
26
|
+
version: '3.0'
|
27
|
+
- !ruby/object:Gem::Dependency
|
28
|
+
name: i18n
|
29
|
+
requirement: !ruby/object:Gem::Requirement
|
30
|
+
requirements:
|
31
|
+
- - ! '>='
|
32
|
+
- !ruby/object:Gem::Version
|
33
|
+
version: '0'
|
34
|
+
type: :runtime
|
35
|
+
prerelease: false
|
36
|
+
version_requirements: !ruby/object:Gem::Requirement
|
37
|
+
requirements:
|
38
|
+
- - ! '>='
|
39
|
+
- !ruby/object:Gem::Version
|
40
|
+
version: '0'
|
41
|
+
- !ruby/object:Gem::Dependency
|
42
|
+
name: savon
|
43
|
+
requirement: !ruby/object:Gem::Requirement
|
44
|
+
requirements:
|
45
|
+
- - ~>
|
46
|
+
- !ruby/object:Gem::Version
|
47
|
+
version: '1.2'
|
48
|
+
type: :runtime
|
49
|
+
prerelease: false
|
50
|
+
version_requirements: !ruby/object:Gem::Requirement
|
51
|
+
requirements:
|
52
|
+
- - ~>
|
53
|
+
- !ruby/object:Gem::Version
|
54
|
+
version: '1.2'
|
55
|
+
description: Calculate sales tax using the TaxCloud.net API
|
56
|
+
email:
|
57
|
+
- info@corgibytes.com
|
58
|
+
executables: []
|
59
|
+
extensions: []
|
60
|
+
extra_rdoc_files: []
|
61
|
+
files:
|
62
|
+
- .circleci/config.yml
|
63
|
+
- .circleci/setup-rubygems.sh
|
64
|
+
- .gitignore
|
65
|
+
- .rubocop.yml
|
66
|
+
- .rubocop_todo.yml
|
67
|
+
- .travis.yml
|
68
|
+
- CHANGELOG.rdoc
|
69
|
+
- CONTRIBUTORS.txt
|
70
|
+
- Dockerfile
|
71
|
+
- Gemfile
|
72
|
+
- LICENSE
|
73
|
+
- README.md
|
74
|
+
- Rakefile
|
75
|
+
- docker-compose.yml
|
76
|
+
- examples/.env.example
|
77
|
+
- examples/lookup_example.rb
|
78
|
+
- lib/config/locales/en.yml
|
79
|
+
- lib/hash.rb
|
80
|
+
- lib/savon_soap_xml.rb
|
81
|
+
- lib/tasks/tax_cloud.rake
|
82
|
+
- lib/tasks/tax_code_groups.rake
|
83
|
+
- lib/tasks/tax_codes.rake
|
84
|
+
- lib/tax_cloud.rb
|
85
|
+
- lib/tax_cloud/address.rb
|
86
|
+
- lib/tax_cloud/cart_item.rb
|
87
|
+
- lib/tax_cloud/client.rb
|
88
|
+
- lib/tax_cloud/configuration.rb
|
89
|
+
- lib/tax_cloud/errors.rb
|
90
|
+
- lib/tax_cloud/errors/api_error.rb
|
91
|
+
- lib/tax_cloud/errors/missing_config_error.rb
|
92
|
+
- lib/tax_cloud/errors/missing_config_option_error.rb
|
93
|
+
- lib/tax_cloud/errors/soap_error.rb
|
94
|
+
- lib/tax_cloud/errors/tax_cloud_error.rb
|
95
|
+
- lib/tax_cloud/errors/unexpected_soap_response_error.rb
|
96
|
+
- lib/tax_cloud/record.rb
|
97
|
+
- lib/tax_cloud/responses.rb
|
98
|
+
- lib/tax_cloud/responses/authorized.rb
|
99
|
+
- lib/tax_cloud/responses/authorized_with_capture.rb
|
100
|
+
- lib/tax_cloud/responses/base.rb
|
101
|
+
- lib/tax_cloud/responses/captured.rb
|
102
|
+
- lib/tax_cloud/responses/cart_item.rb
|
103
|
+
- lib/tax_cloud/responses/generic.rb
|
104
|
+
- lib/tax_cloud/responses/lookup.rb
|
105
|
+
- lib/tax_cloud/responses/ping.rb
|
106
|
+
- lib/tax_cloud/responses/returned.rb
|
107
|
+
- lib/tax_cloud/responses/tax_code_groups.rb
|
108
|
+
- lib/tax_cloud/responses/tax_codes.rb
|
109
|
+
- lib/tax_cloud/responses/tax_codes_by_group.rb
|
110
|
+
- lib/tax_cloud/responses/verify_address.rb
|
111
|
+
- lib/tax_cloud/tax_code.rb
|
112
|
+
- lib/tax_cloud/tax_code_constants.rb
|
113
|
+
- lib/tax_cloud/tax_code_group.rb
|
114
|
+
- lib/tax_cloud/tax_code_group_constants.rb
|
115
|
+
- lib/tax_cloud/tax_code_groups.rb
|
116
|
+
- lib/tax_cloud/tax_codes.rb
|
117
|
+
- lib/tax_cloud/transaction.rb
|
118
|
+
- lib/tax_cloud/version.rb
|
119
|
+
- tax_cloud.gemspec
|
120
|
+
- test/cassettes/authorized.yml
|
121
|
+
- test/cassettes/authorized_with_capture.yml
|
122
|
+
- test/cassettes/authorized_with_localized_time.yml
|
123
|
+
- test/cassettes/captured.yml
|
124
|
+
- test/cassettes/get_tic_groups.yml
|
125
|
+
- test/cassettes/get_tics.yml
|
126
|
+
- test/cassettes/get_tics_by_group.yml
|
127
|
+
- test/cassettes/invalid_soap_call.yml
|
128
|
+
- test/cassettes/lookup.yml
|
129
|
+
- test/cassettes/lookup_ny.yml
|
130
|
+
- test/cassettes/ping.yml
|
131
|
+
- test/cassettes/ping_with_invalid_credentials.yml
|
132
|
+
- test/cassettes/ping_with_invalid_response.yml
|
133
|
+
- test/cassettes/returned.yml
|
134
|
+
- test/cassettes/verify_bad_address.yml
|
135
|
+
- test/cassettes/verify_good_address.yml
|
136
|
+
- test/helper.rb
|
137
|
+
- test/test_address.rb
|
138
|
+
- test/test_cart_item.rb
|
139
|
+
- test/test_client.rb
|
140
|
+
- test/test_configuration_optional_keys.rb
|
141
|
+
- test/test_configuration_required_keys.rb
|
142
|
+
- test/test_lookup_response.rb
|
143
|
+
- test/test_setup.rb
|
144
|
+
- test/test_soap.rb
|
145
|
+
- test/test_tax_code_groups.rb
|
146
|
+
- test/test_tax_codes.rb
|
147
|
+
- test/test_transaction.rb
|
148
|
+
- test/test_transaction_ny.rb
|
149
|
+
- test/vcr_setup.rb
|
150
|
+
homepage: https://github.com/corgibytes/tax_cloud
|
151
|
+
licenses:
|
152
|
+
- MIT
|
153
|
+
metadata: {}
|
154
|
+
post_install_message:
|
155
|
+
rdoc_options: []
|
156
|
+
require_paths:
|
157
|
+
- lib
|
158
|
+
required_ruby_version: !ruby/object:Gem::Requirement
|
159
|
+
requirements:
|
160
|
+
- - ! '>='
|
161
|
+
- !ruby/object:Gem::Version
|
162
|
+
version: 1.9.3
|
163
|
+
required_rubygems_version: !ruby/object:Gem::Requirement
|
164
|
+
requirements:
|
165
|
+
- - ! '>='
|
166
|
+
- !ruby/object:Gem::Version
|
167
|
+
version: 1.3.6
|
168
|
+
requirements: []
|
169
|
+
rubyforge_project:
|
170
|
+
rubygems_version: 2.7.8
|
171
|
+
signing_key:
|
172
|
+
specification_version: 4
|
173
|
+
summary: Calculate sales tax using TaxCloud
|
174
|
+
test_files: []
|