Fix/easy post service mismatch #12
Open
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Fix EasyPost Service Collisions with Carrier-Aware Resolution
Summary
This PR fixes incorrect EasyPost service resolution caused by service name collisions across carriers by introducing a carrier-aware service lookup. Services are now resolved using both carrier + service name, ensuring the correct service codes are returned.
Problem
EasyPost exposes services from multiple carriers that share the same names (e.g.
Priority,Ground).Service resolution relied only on the service name, which—due to Python enum aliasing—caused services from different carriers to incorrectly map to the same enum.
This resulted in wrong service codes being used, such as:
Carrier name variations returned by the EasyPost API also caused carrier lookups to fail.
Solution
UPSDAP→UPS)easypost_{carrier}_{service})Testing
Impact