karrio-seko 2025.5rc7__py3-none-any.whl → 2025.5rc9__py3-none-any.whl
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- karrio/providers/seko/shipment/create.py +26 -14
- {karrio_seko-2025.5rc7.dist-info → karrio_seko-2025.5rc9.dist-info}/METADATA +1 -1
- {karrio_seko-2025.5rc7.dist-info → karrio_seko-2025.5rc9.dist-info}/RECORD +6 -6
- {karrio_seko-2025.5rc7.dist-info → karrio_seko-2025.5rc9.dist-info}/WHEEL +0 -0
- {karrio_seko-2025.5rc7.dist-info → karrio_seko-2025.5rc9.dist-info}/entry_points.txt +0 -0
- {karrio_seko-2025.5rc7.dist-info → karrio_seko-2025.5rc9.dist-info}/top_level.txt +0 -0
|
@@ -34,6 +34,7 @@ def _extract_details(
|
|
|
34
34
|
ctx: dict = None,
|
|
35
35
|
) -> models.ShipmentDetails:
|
|
36
36
|
details = lib.to_object(shipping.ShippingResponseType, data)
|
|
37
|
+
service = provider_units.ShippingService.map(ctx.get("service"))
|
|
37
38
|
Connotes = [_.Connote for _ in details.Consignments]
|
|
38
39
|
TrackingUrls = [_.TrackingUrl for _ in details.Consignments]
|
|
39
40
|
ConsignmentIds = [_.ConsignmentId for _ in details.Consignments]
|
|
@@ -49,17 +50,23 @@ def _extract_details(
|
|
|
49
50
|
models.RateDetails(
|
|
50
51
|
carrier_id=settings.carrier_id,
|
|
51
52
|
carrier_name=settings.carrier_name,
|
|
52
|
-
service=
|
|
53
|
-
total_charge=lib.to_money(
|
|
54
|
-
|
|
53
|
+
service=service.name_or_key,
|
|
54
|
+
total_charge=lib.to_money(
|
|
55
|
+
lib.failsafe(lambda: details.Consignments[0].Cost)
|
|
56
|
+
),
|
|
57
|
+
currency=settings.connection_config.currency.state or "USD",
|
|
55
58
|
meta=dict(
|
|
56
|
-
|
|
59
|
+
service_name=service.value_or_key,
|
|
57
60
|
rate_provider=details.CarrierName,
|
|
58
|
-
|
|
59
|
-
|
|
61
|
+
seko_carrier=details.CarrierName,
|
|
62
|
+
CarrierType=details.CarrierType,
|
|
63
|
+
IsRuralDelivery=details.IsRural,
|
|
64
|
+
IsSaturdayDelivery=details.IsSaturdayDelivery,
|
|
65
|
+
IsFreightForward=details.IsFreightForward,
|
|
60
66
|
),
|
|
61
67
|
)
|
|
62
|
-
if any(details.Consignments or [])
|
|
68
|
+
if any(details.Consignments or [])
|
|
69
|
+
and lib.failsafe(lambda: details.Consignments[0].Cost) is not None
|
|
63
70
|
else None
|
|
64
71
|
)
|
|
65
72
|
|
|
@@ -116,11 +123,15 @@ def shipment_request(
|
|
|
116
123
|
)
|
|
117
124
|
commercial_invoice = lib.identity(
|
|
118
125
|
options.seko_invoice_data.state
|
|
119
|
-
or next(
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
126
|
+
or next(
|
|
127
|
+
(
|
|
128
|
+
_["doc_file"]
|
|
129
|
+
for _ in options.doc_files.state or []
|
|
130
|
+
if _["doc_type"] == "commercial_invoice"
|
|
131
|
+
and _.get("doc_format", "PDF").lower() == "pdf"
|
|
132
|
+
),
|
|
133
|
+
None,
|
|
134
|
+
)
|
|
124
135
|
)
|
|
125
136
|
|
|
126
137
|
# map data to convert karrio model to seko specific type
|
|
@@ -174,7 +185,8 @@ def shipment_request(
|
|
|
174
185
|
Commodities=[
|
|
175
186
|
seko.CommodityType(
|
|
176
187
|
Description=lib.identity(
|
|
177
|
-
lib.text(commodity.description or commodity.title, max=200)
|
|
188
|
+
lib.text(commodity.description or commodity.title, max=200)
|
|
189
|
+
or "item"
|
|
178
190
|
),
|
|
179
191
|
HarmonizedCode=commodity.hs_code or "0000.00.00",
|
|
180
192
|
Units=commodity.quantity,
|
|
@@ -275,5 +287,5 @@ def shipment_request(
|
|
|
275
287
|
return lib.Serializable(
|
|
276
288
|
request,
|
|
277
289
|
lib.to_dict,
|
|
278
|
-
dict(label_type=label_type, label_format=label_format),
|
|
290
|
+
dict(label_type=label_type, label_format=label_format, service=service),
|
|
279
291
|
)
|
|
@@ -12,7 +12,7 @@ karrio/providers/seko/units.py,sha256=EXwaMmyNwWNnJvtG1Tvct86fOlT_CsR2TnULT0_8Fc
|
|
|
12
12
|
karrio/providers/seko/utils.py,sha256=YWoDTiPqhsi77_NxrBs87fA5yY_O33jwdPiNPt4eoCs,3906
|
|
13
13
|
karrio/providers/seko/shipment/__init__.py,sha256=lmk_JKKObr83IAEeITBbVefCO-FeypZB8_jGIojIatA,225
|
|
14
14
|
karrio/providers/seko/shipment/cancel.py,sha256=O5VsuMidTRgpAikTIA5GbIbVSuIy0UCMk1LO3M9oLzk,1812
|
|
15
|
-
karrio/providers/seko/shipment/create.py,sha256=
|
|
15
|
+
karrio/providers/seko/shipment/create.py,sha256=B9NgqP_oYHxFMJZ9US5m0ZSI6znBavT2qL-sTJWLX3A,11435
|
|
16
16
|
karrio/schemas/seko/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
17
17
|
karrio/schemas/seko/error_response.py,sha256=PEcgmhsyboVfWL8BcYhFT_MppXUK5n3XYAv4ANMVWds,254
|
|
18
18
|
karrio/schemas/seko/manifest_response.py,sha256=KuO0CjtAw9ffhZXMEBQPEfymgsCSnshnPWcR7CTXy48,674
|
|
@@ -21,8 +21,8 @@ karrio/schemas/seko/rating_response.py,sha256=DZJgnP9YJWXy-mABPLD6YcdmE0Z4oVXosM
|
|
|
21
21
|
karrio/schemas/seko/shipping_request.py,sha256=P7vFsGB1IZDfH85mq8pv4qsIL5tYRGsAWWRJcryfv3U,5481
|
|
22
22
|
karrio/schemas/seko/shipping_response.py,sha256=a-cBMrZyUu9y5OOqgt7VWO7-LJ1mWVuZRWm7ygUY12I,5289
|
|
23
23
|
karrio/schemas/seko/tracking_response.py,sha256=vWhaKhWP4ZSor5cVZ2h8CvZMxE3h87e4tDXfPAgCsF4,702
|
|
24
|
-
karrio_seko-2025.
|
|
25
|
-
karrio_seko-2025.
|
|
26
|
-
karrio_seko-2025.
|
|
27
|
-
karrio_seko-2025.
|
|
28
|
-
karrio_seko-2025.
|
|
24
|
+
karrio_seko-2025.5rc9.dist-info/METADATA,sha256=vTvnikyqmYVJD16hl5TrjIa6RvfEsX9AdwKHpScel-4,990
|
|
25
|
+
karrio_seko-2025.5rc9.dist-info/WHEEL,sha256=_zCd3N1l69ArxyTb8rzEoP9TpbYXkqRFSNOD5OuxnTs,91
|
|
26
|
+
karrio_seko-2025.5rc9.dist-info/entry_points.txt,sha256=38t4NWTw7ZuhE4-KYDHI3ZAN-PKrfduhrwTofZuhDxg,53
|
|
27
|
+
karrio_seko-2025.5rc9.dist-info/top_level.txt,sha256=FZCY8Nwft8oEGHdl--xku8P3TrnOxu5dETEU_fWpRSM,20
|
|
28
|
+
karrio_seko-2025.5rc9.dist-info/RECORD,,
|
|
File without changes
|
|
File without changes
|
|
File without changes
|