karrio-seko 2025.5.6__py3-none-any.whl → 2025.5.7__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/tracking.py +20 -0
- karrio/providers/seko/units.py +31 -0
- {karrio_seko-2025.5.6.dist-info → karrio_seko-2025.5.7.dist-info}/METADATA +1 -1
- {karrio_seko-2025.5.6.dist-info → karrio_seko-2025.5.7.dist-info}/RECORD +7 -7
- {karrio_seko-2025.5.6.dist-info → karrio_seko-2025.5.7.dist-info}/WHEEL +0 -0
- {karrio_seko-2025.5.6.dist-info → karrio_seko-2025.5.7.dist-info}/entry_points.txt +0 -0
- {karrio_seko-2025.5.6.dist-info → karrio_seko-2025.5.7.dist-info}/top_level.txt +0 -0
|
@@ -64,6 +64,26 @@ def _extract_details(
|
|
|
64
64
|
try_formats=["%Y-%m-%dT%H:%M:%S.%f", "%Y-%m-%dT%H:%M:%S"],
|
|
65
65
|
),
|
|
66
66
|
location=event.Location,
|
|
67
|
+
timestamp=lib.fiso_timestamp(
|
|
68
|
+
event.EventDT,
|
|
69
|
+
try_formats=["%Y-%m-%dT%H:%M:%S.%f", "%Y-%m-%dT%H:%M:%S"],
|
|
70
|
+
),
|
|
71
|
+
status=next(
|
|
72
|
+
(
|
|
73
|
+
s.name
|
|
74
|
+
for s in list(provider_units.TrackingStatus)
|
|
75
|
+
if (event.OmniCode or event.Code) in s.value
|
|
76
|
+
),
|
|
77
|
+
None,
|
|
78
|
+
),
|
|
79
|
+
reason=next(
|
|
80
|
+
(
|
|
81
|
+
r.name
|
|
82
|
+
for r in list(provider_units.TrackingIncidentReason)
|
|
83
|
+
if (event.OmniCode or event.Code) in r.value
|
|
84
|
+
),
|
|
85
|
+
None,
|
|
86
|
+
),
|
|
67
87
|
)
|
|
68
88
|
for event in events
|
|
69
89
|
],
|
karrio/providers/seko/units.py
CHANGED
|
@@ -250,3 +250,34 @@ class TrackingStatus(lib.Enum):
|
|
|
250
250
|
"OP-90", # Return processed
|
|
251
251
|
"OP-94", # RTS consolidated
|
|
252
252
|
]
|
|
253
|
+
|
|
254
|
+
|
|
255
|
+
class TrackingIncidentReason(lib.Enum):
|
|
256
|
+
"""Maps SEKO exception codes to normalized TrackingIncidentReason."""
|
|
257
|
+
|
|
258
|
+
# Carrier-caused issues
|
|
259
|
+
carrier_damaged_parcel = ["OP-17", "OP-69"] # Parcel Damaged, RTS - Damaged Parcel
|
|
260
|
+
carrier_parcel_lost = ["OP-15"] # Parcel lost
|
|
261
|
+
carrier_sorting_error = ["OP-13", "OP-35"] # Misdirected, Mis sorted by carrier
|
|
262
|
+
carrier_delay = ["OP-16"] # Parcel Delayed
|
|
263
|
+
|
|
264
|
+
# Consignee-caused issues
|
|
265
|
+
consignee_refused = ["OP-28", "OP-64"] # Refused by customer, RTS - Refused
|
|
266
|
+
consignee_not_home = ["OP-24", "OP-84"] # Receiver carded, Recipient not available
|
|
267
|
+
consignee_not_available = ["OP-59", "OP-65"] # Card Left Never Collected, Unclaimed
|
|
268
|
+
consignee_business_closed = ["OP-43"] # Not collected from store
|
|
269
|
+
consignee_incorrect_address = ["OP-23", "OP-27", "OP-41", "OP-61"] # Invalid/Insufficient Address, Customer not known, Incorrect details, RTS - Invalid Address
|
|
270
|
+
consignee_access_restricted = ["OP-37"] # No access to receivers address
|
|
271
|
+
consignee_identification_failed = ["OP-38"] # Customer Identification failed
|
|
272
|
+
|
|
273
|
+
# Customs-related issues
|
|
274
|
+
customs_delay = ["OP-6"] # Customs held for inspection and clearance
|
|
275
|
+
|
|
276
|
+
# Payment/Delivery issues
|
|
277
|
+
delivery_exception_hold = ["OP-26", "OP-49", "OP-87", "OP-88"] # Held by carrier, Held by Delivery Courier, High Value Unpaid, Additional Payment Required
|
|
278
|
+
delivery_exception_undeliverable = ["OP-30", "OP-70", "OP-91"] # Non delivery, Parcel Blocked, Parcel Blocked - Declared LIT
|
|
279
|
+
delivery_exception_cancelled = ["OP-34", "OP-60", "OP-67"] # Cancelled, RTS - Fraudulent, RTS - Cancelled Order
|
|
280
|
+
delivery_exception_high_value_rejected = ["OP-63"] # RTS - High Value Rejected
|
|
281
|
+
|
|
282
|
+
# Unknown/Other
|
|
283
|
+
unknown = []
|
|
@@ -7,8 +7,8 @@ karrio/providers/seko/__init__.py,sha256=IzIUO4eo-TjsNmZeJ85u4yziUgnVu_uSg4dVct2
|
|
|
7
7
|
karrio/providers/seko/error.py,sha256=MoyMQeVCUImTteJovs6NKsZ6t_zzuKD1AwIMJfGTFk4,3908
|
|
8
8
|
karrio/providers/seko/manifest.py,sha256=1r9yenrHGeQeOhacuHw4U28mE2cK0fanR-9pRKEH83w,1915
|
|
9
9
|
karrio/providers/seko/rate.py,sha256=31Le9mQbADdZ0ZSLdBy3AOQF--uGCwS1hbl9usyiH_U,6781
|
|
10
|
-
karrio/providers/seko/tracking.py,sha256=
|
|
11
|
-
karrio/providers/seko/units.py,sha256=
|
|
10
|
+
karrio/providers/seko/tracking.py,sha256=xWx_GTtOQYb-3ybA9doorsJeC1CVNJG91qIA4rzwISI,3856
|
|
11
|
+
karrio/providers/seko/units.py,sha256=Pe8GupN6yIJZ9SuzZ0tYv1m2ZVJG-AeQuknMs7aeReE,11494
|
|
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
|
|
@@ -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.5.
|
|
25
|
-
karrio_seko-2025.5.
|
|
26
|
-
karrio_seko-2025.5.
|
|
27
|
-
karrio_seko-2025.5.
|
|
28
|
-
karrio_seko-2025.5.
|
|
24
|
+
karrio_seko-2025.5.7.dist-info/METADATA,sha256=MI8XL8v1_At5wdLTyP5nncRtlvLMDkIdI_JWjXiKN8I,987
|
|
25
|
+
karrio_seko-2025.5.7.dist-info/WHEEL,sha256=_zCd3N1l69ArxyTb8rzEoP9TpbYXkqRFSNOD5OuxnTs,91
|
|
26
|
+
karrio_seko-2025.5.7.dist-info/entry_points.txt,sha256=38t4NWTw7ZuhE4-KYDHI3ZAN-PKrfduhrwTofZuhDxg,53
|
|
27
|
+
karrio_seko-2025.5.7.dist-info/top_level.txt,sha256=FZCY8Nwft8oEGHdl--xku8P3TrnOxu5dETEU_fWpRSM,20
|
|
28
|
+
karrio_seko-2025.5.7.dist-info/RECORD,,
|
|
File without changes
|
|
File without changes
|
|
File without changes
|