Skip to content

Commit 9c95fb5

Browse files
authored
Merge pull request #78 from customink/dwheeler/vertex-client-cleanup
Review and update the Domestic Fallback Rates as needed, and eliminate the International Fallback Rates.
2 parents e71ce1c + 7552ba6 commit 9c95fb5

11 files changed

+32
-49
lines changed

.github/workflows/ci.yml

+1-1
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@ jobs:
2525
BUNDLE_PATH_RELATIVE_TO_CWD: true
2626
steps:
2727
- name: Checkout code
28-
uses: actions/checkout@v3
28+
uses: actions/checkout@v4
2929
# Add or replace dependency steps here
3030
- name: Install Ruby and gems
3131
uses: ruby/setup-ruby@v1

CHANGELOG.md

+8
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,14 @@
22

33
This file tracks all the changes (https://keepachangelog.com/en/1.0.0/) made to the client. This allows parsers such as Dependabot to provide a clean overview in pull requests.
44

5+
## [v0.11.1] - 2024-12-05
6+
7+
#### Changed
8+
9+
- Remove international quotation fallback rates to match Vertex level discontinuation of international sales tax collection
10+
- Adjust domestic quotation fallback rates to better match current Vertex rates
11+
- Fix GitHub Actions CI test failures (lock Rack version, require OpenStruct, use `underscore` instead of `snakecase`, use Checkout V4 instead of V3)
12+
513
## [v0.11.0] - 2024-04-03
614

715
#### Changed

lib/vertex_client/rates.rb

+6-33
Original file line numberDiff line numberDiff line change
@@ -5,8 +5,8 @@ module VertexClient
55
'AE' => '0.0',
66
'AL' => '0.0914',
77
'AK' => '0.0',
8-
'AZ' => '0.0',
9-
'AR' => '0.0',
8+
'AZ' => '0.086',
9+
'AR' => '0.0935',
1010
'CA' => '0.0856',
1111
'CO' => '0.0763',
1212
'CT' => '0.0635',
@@ -18,7 +18,7 @@ module VertexClient
1818
'IL' => '0.0874',
1919
'IN' => '0.07',
2020
'IA' => '0.0682',
21-
'KS' => '0.0',
21+
'KS' => '0.0865',
2222
'KY' => '0.06',
2323
'LA' => '0.0945',
2424
'ME' => '0.055',
@@ -27,13 +27,13 @@ module VertexClient
2727
'MI' => '0.06',
2828
'MN' => '0.0743',
2929
'MS' => '0.0707',
30-
'MO' => '0.0',
30+
'MO' => '0.0845',
3131
'MT' => '0.0',
3232
'NE' => '0.0685',
3333
'NV' => '0.0814',
3434
'NH' => '0.0',
3535
'NJ' => '0.066',
36-
'NM' => '0.0',
36+
'NM' => '0.0515',
3737
'NY' => '0.0849',
3838
'NC' => '0.0697',
3939
'ND' => '0.0685',
@@ -54,33 +54,6 @@ module VertexClient
5454
'WI' => '0.0544',
5555
'WY' => '0.0536',
5656
'DC' => '0.06'
57-
},
58-
'GB' => '0.2',
59-
'DE' => '0.19',
60-
'SE' => '0.25',
61-
'NL' => '0.21',
62-
'FR' => '0.2',
63-
'DK' => '0.25',
64-
'BE' => '0.21',
65-
'FI' => '0.24',
66-
'IT' => '0.22',
67-
'AT' => '0.2',
68-
'PL' => '0.23',
69-
'CZ' => '0.21',
70-
'IE' => '0.23',
71-
'ES' => '0.21',
72-
'HU' => '0.27',
73-
'RO' => '0.19',
74-
'PT' => '0.23',
75-
'SK' => '0.2',
76-
'GR' => '0.24',
77-
'SI' => '0.22',
78-
'HR' => '0.25',
79-
'LT' => '0.21',
80-
'EE' => '0.2',
81-
'LV' => '0.21',
82-
'BG' => '0.2',
83-
'LU' => '0.17',
84-
'MT' => '0.18'
57+
}
8558
}.freeze
8659
end

lib/vertex_client/version.rb

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,3 @@
11
module VertexClient
2-
VERSION = '0.11.0'
2+
VERSION = '0.11.1'
33
end

test/cassettes/eu_quotation.yml

+5-5
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

test/cassettes/single_line_item_eu_quotation.yml

+5-5
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

test/integration_test.rb

+2-2
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@
2929
it 'does a quotation' do
3030
VCR.use_cassette('eu_quotation', :match_requests_on => []) do
3131
response = VertexClient.quotation(working_eu_quote_params)
32-
assert_equal 12.54, response.total_tax
32+
assert_equal 0.0, response.total_tax
3333
assert_equal '4600', response.line_items.first.product.product_code
3434
assert_equal '53103000', response.line_items.first.product.product_class
3535
end
@@ -38,7 +38,7 @@
3838
it 'does a quotation for a quote with a single line_item' do
3939
VCR.use_cassette('single_line_item_eu_quotation', :match_requests_on => []) do
4040
response = VertexClient.quotation(single_line_item_eu_quotation_params)
41-
assert_equal 5.08, response.line_items.first.total_tax
41+
assert_equal 0.0, response.line_items.first.total_tax
4242
end
4343
end
4444
end

test/responses/quotation_fallback_test.rb

+1-1
Original file line numberDiff line numberDiff line change
@@ -61,7 +61,7 @@
6161
let(:payload) { VertexClient::Payload::QuotationFallback.new(working_eu_quote_params) }
6262

6363
it 'is the sum of total_tax from line_items' do
64-
assert_equal 12.54, response.total_tax.to_f
64+
assert_equal 0.0, response.total_tax.to_f
6565
end
6666
end
6767

test/responses/quotation_test.rb

+1-1
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@
2525
end
2626

2727
let(:empty_product_response) do
28-
parser = Nori.new(:convert_tags_to => lambda { |tag| tag.snakecase.to_sym })
28+
parser = Nori.new(:convert_tags_to => lambda { |tag| tag.underscore.to_sym })
2929
lip = parser.parse('<product productClass="my_awesome_class" />')
3030
resp = vertex_quotation_response.dup
3131
resp.body[:vertex_envelope][:quotation_response][:line_item] = [lip]

test/test_helper.rb

+1
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,7 @@
99
require 'byebug'
1010
require "mocha/minitest"
1111
require 'minitest-ci' if ENV.fetch('CI') { false }
12+
require 'ostruct'
1213

1314
VertexClient.configuration # make sure the client is configured
1415

vertex_client.gemspec

+1
Original file line numberDiff line numberDiff line change
@@ -37,6 +37,7 @@ Gem::Specification.new do |spec|
3737
spec.require_paths = ["lib"]
3838

3939
spec.add_dependency "activesupport"
40+
spec.add_dependency "rack", "~> 2.2"
4041
spec.add_dependency "savon", ">= 2.11"
4142
spec.add_development_dependency "appraisal"
4243
spec.add_development_dependency "awesome_print"

0 commit comments

Comments
 (0)