Skip to content

Commit

Permalink
fix: ensure service name and carrier consistency with other provider …
Browse files Browse the repository at this point in the history
…packages and eShipper XML
  • Loading branch information
jacobshilitz committed Sep 4, 2024
1 parent a2a5fd7 commit 2f5839a
Showing 1 changed file with 4 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -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),
Expand Down Expand Up @@ -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,
Expand Down

0 comments on commit 2f5839a

Please sign in to comment.