Skip to content

Commit

Permalink
change fallback rates: remove international, update domestic states
Browse files Browse the repository at this point in the history
  • Loading branch information
jcain3389 committed Jan 8, 2025
1 parent 3480167 commit 6a72a0b
Show file tree
Hide file tree
Showing 5 changed files with 19 additions and 46 deletions.
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
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

0 comments on commit 6a72a0b

Please sign in to comment.