Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ jobs:
BUNDLE_PATH_RELATIVE_TO_CWD: true
steps:
- name: Checkout code
uses: actions/checkout@v3
uses: actions/checkout@v4
# Add or replace dependency steps here
- name: Install Ruby and gems
uses: ruby/setup-ruby@v1
Expand Down
8 changes: 8 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,14 @@

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.

## [v0.11.1] - 2024-12-05

#### Changed

- Remove international quotation fallback rates to match Vertex level discontinuation of international sales tax collection
- Adjust domestic quotation fallback rates to better match current Vertex rates
- Fix GitHub Actions CI test failures (lock Rack version, require OpenStruct, use `underscore` instead of `snakecase`, use Checkout V4 instead of V3)

## [v0.11.0] - 2024-04-03

#### Changed
Expand Down
39 changes: 6 additions & 33 deletions lib/vertex_client/rates.rb
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,8 @@ module VertexClient
'AE' => '0.0',
'AL' => '0.0914',
'AK' => '0.0',
'AZ' => '0.0',
'AR' => '0.0',
'AZ' => '0.086',
'AR' => '0.0935',
'CA' => '0.0856',
'CO' => '0.0763',
'CT' => '0.0635',
Expand All @@ -18,7 +18,7 @@ module VertexClient
'IL' => '0.0874',
'IN' => '0.07',
'IA' => '0.0682',
'KS' => '0.0',
'KS' => '0.0865',
'KY' => '0.06',
'LA' => '0.0945',
'ME' => '0.055',
Expand All @@ -27,13 +27,13 @@ module VertexClient
'MI' => '0.06',
'MN' => '0.0743',
'MS' => '0.0707',
'MO' => '0.0',
'MO' => '0.0845',
'MT' => '0.0',
'NE' => '0.0685',
'NV' => '0.0814',
'NH' => '0.0',
'NJ' => '0.066',
'NM' => '0.0',
'NM' => '0.0515',
'NY' => '0.0849',
'NC' => '0.0697',
'ND' => '0.0685',
Expand All @@ -54,33 +54,6 @@ module VertexClient
'WI' => '0.0544',
'WY' => '0.0536',
'DC' => '0.06'
},
'GB' => '0.2',
'DE' => '0.19',
'SE' => '0.25',
'NL' => '0.21',
'FR' => '0.2',
'DK' => '0.25',
'BE' => '0.21',
'FI' => '0.24',
'IT' => '0.22',
'AT' => '0.2',
'PL' => '0.23',
'CZ' => '0.21',
'IE' => '0.23',
'ES' => '0.21',
'HU' => '0.27',
'RO' => '0.19',
'PT' => '0.23',
'SK' => '0.2',
'GR' => '0.24',
'SI' => '0.22',
'HR' => '0.25',
'LT' => '0.21',
'EE' => '0.2',
'LV' => '0.21',
'BG' => '0.2',
'LU' => '0.17',
'MT' => '0.18'
}
}.freeze
end
2 changes: 1 addition & 1 deletion lib/vertex_client/version.rb
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
module VertexClient
VERSION = '0.11.0'
VERSION = '0.11.1'
end
10 changes: 5 additions & 5 deletions test/cassettes/eu_quotation.yml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

10 changes: 5 additions & 5 deletions test/cassettes/single_line_item_eu_quotation.yml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

4 changes: 2 additions & 2 deletions test/integration_test.rb
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@
it 'does a quotation' do
VCR.use_cassette('eu_quotation', :match_requests_on => []) do
response = VertexClient.quotation(working_eu_quote_params)
assert_equal 12.54, response.total_tax
assert_equal 0.0, response.total_tax
assert_equal '4600', response.line_items.first.product.product_code
assert_equal '53103000', response.line_items.first.product.product_class
end
Expand All @@ -38,7 +38,7 @@
it 'does a quotation for a quote with a single line_item' do
VCR.use_cassette('single_line_item_eu_quotation', :match_requests_on => []) do
response = VertexClient.quotation(single_line_item_eu_quotation_params)
assert_equal 5.08, response.line_items.first.total_tax
assert_equal 0.0, response.line_items.first.total_tax
end
end
end
Expand Down
2 changes: 1 addition & 1 deletion test/responses/quotation_fallback_test.rb
Original file line number Diff line number Diff line change
Expand Up @@ -61,7 +61,7 @@
let(:payload) { VertexClient::Payload::QuotationFallback.new(working_eu_quote_params) }

it 'is the sum of total_tax from line_items' do
assert_equal 12.54, response.total_tax.to_f
assert_equal 0.0, response.total_tax.to_f
end
end

Expand Down
2 changes: 1 addition & 1 deletion test/responses/quotation_test.rb
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@
end

let(:empty_product_response) do
parser = Nori.new(:convert_tags_to => lambda { |tag| tag.snakecase.to_sym })
parser = Nori.new(:convert_tags_to => lambda { |tag| tag.underscore.to_sym })
lip = parser.parse('<product productClass="my_awesome_class" />')
resp = vertex_quotation_response.dup
resp.body[:vertex_envelope][:quotation_response][:line_item] = [lip]
Expand Down
1 change: 1 addition & 0 deletions test/test_helper.rb
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@
require 'byebug'
require "mocha/minitest"
require 'minitest-ci' if ENV.fetch('CI') { false }
require 'ostruct'

VertexClient.configuration # make sure the client is configured

Expand Down
1 change: 1 addition & 0 deletions vertex_client.gemspec
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,7 @@ Gem::Specification.new do |spec|
spec.require_paths = ["lib"]

spec.add_dependency "activesupport"
spec.add_dependency "rack", "~> 2.2"
spec.add_dependency "savon", ">= 2.11"
spec.add_development_dependency "appraisal"
spec.add_development_dependency "awesome_print"
Expand Down