Skip to content

Conversation

@jacobshilitz
Copy link

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.

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)
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
Extract is_rate_guaranteed from shipment.rate.customs_charge_data and include
it in shipment meta to indicate if customs charges are guaranteed.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant