From 4a6817ca903d763fbc4a4bf96895f036228b8d58 Mon Sep 17 00:00:00 2001 From: Jacob Shilitz Date: Wed, 4 Sep 2024 18:14:21 -0400 Subject: [PATCH] fix: ensure service name and carrier consistency with other provider packages and eShipper XML --- .../connectors/eshipper/karrio/providers/eshipper/rate.py | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/modules/connectors/eshipper/karrio/providers/eshipper/rate.py b/modules/connectors/eshipper/karrio/providers/eshipper/rate.py index 3a295586fe..09c8eccf7e 100644 --- a/modules/connectors/eshipper/karrio/providers/eshipper/rate.py +++ b/modules/connectors/eshipper/karrio/providers/eshipper/rate.py @@ -29,6 +29,8 @@ def _extract_details( service = provider_units.ShippingService.map(str(rate.serviceId)) carrierId = provider_units.ShippingService.carrier_id(service.value_or_key) rate_provider = provider_units.ShippingService.carrier(service.value_or_key).lower() + service_name = service.name.replace("eshipper_", "") + charges = [ ("baseCharge", rate.baseCharge), ("fuelSurcharge", rate.fuelSurcharge), @@ -56,8 +58,9 @@ def _extract_details( if amount ], meta=dict( + carrier=rate_provider, rate_provider=rate_provider, - service_name=rate.serviceName or service.name, + service_name=service_name, carrierId=carrierId, serviceName=rate.serviceName, carrierName=rate.carrierName,