-
Notifications
You must be signed in to change notification settings - Fork 3
Add Freightcom Rest shipping integration plugin #4
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Open
jacobshilitz
wants to merge
17
commits into
karrioapi:main
Choose a base branch
from
jacobshilitz:freightcom
base: main
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
43cc493 to
facb4b6
Compare
This commit introduces a new Karrio plugin for Freightcom Rest API, including mappers, schemas, and provider implementations for rate, shipment, and cancellation functionalities. It also adds support for Freightcom-specific settings, utilities, and unit mappings to enable seamless integration and plugin registration.
- Add package-data configuration to ensure metadata.json is included when the package is built and installed - This fixes the missing file error during package installation
- Add failsafe handling for empty responses to prevent errors in shipment ID extraction. - Ensure deserialization fallback to empty JSON if response is missing.
… Freightcom shipment creation - Set duty tax recipient type to "receiver" as required by the API. - Adjust commodity value calculation to ensure formatting meets API expectations.
- Map duty paid_by field to API-compatible recipient type with a fallback to "receiver".
- Update error message construction to include details or data values if available, improving clarity in error responses.
…ling - Refactor error message construction to format details and data values more clearly, enhancing the readability of error responses.
… documents - Add fields for customs data, product composition, and paperless customs documentation. - Align schemas with Freightcom API Version 2.6.2 changes.
…ent requests - Introduce checks for Canadian to US shipments to ensure proper customs processing. - Update conditions to include packaging type validation for customs commodities in both rate and shipment request functions.
…ipments - Refactor customs data construction to improve clarity and maintainability. - Ensure proper inclusion of product details while maintaining existing functionality for customs processing.
- Simplify conditions for CA to US shipments by removing unnecessary `is_package_or_courierpak` validation. - Ensure customs commodity checks are streamlined for both rate and shipment requests.
- Introduce logic for handling Delivered Duty Paid (DDP) shipments, including determining appropriate payment methods. - Add support for selecting customs and duties payment method, with built-in caching for efficiency. - Ensure accurate mapping of tax recipients and guarantee customs charges for DDP shipments.
- Add level parameter to error messages (defaults to 'error') - Add _get_level() helper function - Freightcom API v2 does not provide level field, so defaults to 'error' - Required for upstream sync with karrio-community (commit 1a1b158)
6f3088b to
655d2fe
Compare
Add guaranteed rate flag to rate metadata in Freightcom API v2 integration. Extracts is_rate_guaranteed from customs_charge_data and stores it in rate meta dict.
- Add USMCA detection for US, CA, MX routes (bidirectional) - Add use_usmca option to control USMCA handling (defaults to true) - Set cusma_included=True for USMCA-eligible shipments - Add usmca_number option for certification number - Implement PDF document upload via paperless_customs_documents - Fix customs_and_duties_payment_method_id for all DDP shipments - Support non_auto_parts option for products
5a3354f to
9411a40
Compare
Extract is_rate_guaranteed from shipment.rate.customs_charge_data and include it in shipment meta to indicate if customs charges are guaranteed.
831a541 to
e29cccd
Compare
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
This commit introduces a new Karrio plugin for Freightcom Rest API, including mappers, schemas, and provider implementations for rate, shipment, and cancellation functionalities. It also adds support for Freightcom-specific settings, utilities, and unit mappings to enable seamless integration and plugin registration.