Skip to content

Commit

Permalink
(revert) non-dutiable flag on rating request for shipments within EU.…
Browse files Browse the repository at this point in the history
… only apply exclusion during shipment creation
  • Loading branch information
danh91 committed Nov 24, 2023
1 parent 34dcd62 commit 628dc32
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 9 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -102,14 +102,7 @@ def rate_request(
raise errors.DestinationNotServicedError(payload.shipper.country_code)

is_document = all([parcel.is_document for parcel in payload.parcels])
is_dutiable = (
is_international and
not is_document and
(
units.EUCountry.map(payload.shipper.country_code).value is None and
units.EUCountry.map(payload.recipient.country_code).value is None
)
)
is_dutiable = is_international and not is_document

services = lib.to_services(
payload.services,
Expand Down
11 changes: 10 additions & 1 deletion sdk/extensions/dhl_express/tests/dhl_express/test_rate.py
Original file line number Diff line number Diff line change
Expand Up @@ -391,13 +391,22 @@ def test_parse_rate_vol_weight_higher_response(self):
</Piece>
</Pieces>
<PaymentAccountNumber>123456789</PaymentAccountNumber>
<IsDutiable>N</IsDutiable>
<IsDutiable>Y</IsDutiable>
<NetworkTypeCode>AL</NetworkTypeCode>
<QtdShp>
<QtdShpExChrg>
<SpecialServiceType>WY</SpecialServiceType>
</QtdShpExChrg>
</QtdShp>
</BkgDetails>
<To>
<CountryCode>NL</CountryCode>
<Postalcode>76131</Postalcode>
</To>
<Dutiable>
<DeclaredCurrency>EUR</DeclaredCurrency>
<DeclaredValue>1.</DeclaredValue>
</Dutiable>
</GetQuote>
</p:DCTRequest>
"""
Expand Down

0 comments on commit 628dc32

Please sign in to comment.