Skip to content

Commit

Permalink
chore: make ups upper case for uniform charges details
Browse files Browse the repository at this point in the history
  • Loading branch information
danh91 committed Sep 11, 2024
1 parent 3ae1bf9 commit b87a724
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 8 deletions.
2 changes: 1 addition & 1 deletion modules/connectors/ups/karrio/providers/ups/rate.py
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ def _extract_details(
itemized_charges = [*effective_rate.ItemizedCharges, *taxes]

charges = [
("Base charge", effective_rate.BaseServiceCharge.MonetaryValue),
("BASE CHARGE", effective_rate.BaseServiceCharge.MonetaryValue),
*lib.identity(
[]
if any(itemized_charges)
Expand Down
14 changes: 7 additions & 7 deletions modules/connectors/ups/tests/ups/test_rate.py
Original file line number Diff line number Diff line change
Expand Up @@ -131,7 +131,7 @@ def test_parse_fr_rate_response(self):
"carrier_name": "ups",
"currency": "CAD",
"extra_charges": [
{"amount": 116.35, "currency": "CAD", "name": "Base charge"},
{"amount": 116.35, "currency": "CAD", "name": "BASE CHARGE"},
{"amount": 21.52, "currency": "CAD", "name": "FUEL SURCHARGE"},
{"amount": 20.68, "currency": "CAD", "name": "HST"},
],
Expand All @@ -145,7 +145,7 @@ def test_parse_fr_rate_response(self):
"carrier_name": "ups",
"currency": "CAD",
"extra_charges": [
{"amount": 71.95, "currency": "CAD", "name": "Base charge"},
{"amount": 71.95, "currency": "CAD", "name": "BASE CHARGE"},
{"amount": 13.31, "currency": "CAD", "name": "FUEL SURCHARGE"},
{"amount": 12.79, "currency": "CAD", "name": "HST"},
],
Expand All @@ -159,7 +159,7 @@ def test_parse_fr_rate_response(self):
"carrier_name": "ups",
"currency": "CAD",
"extra_charges": [
{"amount": 70.90, "currency": "CAD", "name": "Base charge"},
{"amount": 70.90, "currency": "CAD", "name": "BASE CHARGE"},
{"amount": 13.12, "currency": "CAD", "name": "FUEL SURCHARGE"},
{"amount": 12.6, "currency": "CAD", "name": "HST"},
],
Expand All @@ -173,7 +173,7 @@ def test_parse_fr_rate_response(self):
"carrier_name": "ups",
"currency": "CAD",
"extra_charges": [
{"amount": 67.10, "currency": "CAD", "name": "Base charge"},
{"amount": 67.10, "currency": "CAD", "name": "BASE CHARGE"},
{"amount": 12.41, "currency": "CAD", "name": "FUEL SURCHARGE"},
{"amount": 11.93, "currency": "CAD", "name": "HST"},
],
Expand All @@ -193,7 +193,7 @@ def test_parse_fr_rate_response(self):
"carrier_name": "ups",
"currency": "EUR",
"extra_charges": [
{"amount": 12.37, "currency": "EUR", "name": "Base charge"},
{"amount": 12.37, "currency": "EUR", "name": "BASE CHARGE"},
{"amount": 2.74, "currency": "EUR", "name": "FUEL SURCHARGE"},
{"amount": 3.02, "currency": "EUR", "name": "TVA"},
],
Expand All @@ -207,7 +207,7 @@ def test_parse_fr_rate_response(self):
"carrier_name": "ups",
"currency": "EUR",
"extra_charges": [
{"amount": 10.21, "currency": "EUR", "name": "Base charge"},
{"amount": 10.21, "currency": "EUR", "name": "BASE CHARGE"},
{"amount": 2.26, "currency": "EUR", "name": "FUEL SURCHARGE"},
{"amount": 2.49, "currency": "EUR", "name": "TVA"},
],
Expand All @@ -221,7 +221,7 @@ def test_parse_fr_rate_response(self):
"carrier_name": "ups",
"currency": "EUR",
"extra_charges": [
{"amount": 8.22, "currency": "EUR", "name": "Base charge"},
{"amount": 8.22, "currency": "EUR", "name": "BASE CHARGE"},
{"amount": 1.16, "currency": "EUR", "name": "FUEL SURCHARGE"},
{"amount": 1.87, "currency": "EUR", "name": "TVA"},
],
Expand Down

0 comments on commit b87a724

Please sign in to comment.