Skip to content

Commit facb4b6

Browse files
committed
fix: update duty tax recipient mapping in Freightcom shipment creation
- Map duty paid_by field to API-compatible recipient type with a fallback to "receiver".
1 parent 4bab8cd commit facb4b6

1 file changed

Lines changed: 5 additions & 6 deletions

File tree

  • plugins/freightcom_rest/karrio/providers/freightcom_rest/shipment

plugins/freightcom_rest/karrio/providers/freightcom_rest/shipment/create.py

Lines changed: 5 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -350,12 +350,11 @@ def shipment_request(
350350
) for item in customs.commodities
351351
],
352352
tax_recipient=freightcom_rest_req.TaxRecipientType(
353-
# they require it to be receiver
354-
# type=provider_units.PaymentType.map(
355-
# customs.duty.paid_by
356-
# ).value
357-
# or "shipper",
358-
type = "receiver",
353+
# they require it to be receiver, has to be enabled in the api
354+
type=provider_units.PaymentType.map(
355+
customs.duty.paid_by
356+
).value
357+
or "receiver",
359358
name=customs.duty_billing_address.company_name or customs.duty.person_name,
360359
address=freightcom_rest_req.AddressType(
361360
address_line_1=customs.duty_billing_address.address_line1,

0 commit comments

Comments
 (0)