karrio-landmark 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/landmark/tracking.py +20 -0
- karrio/providers/landmark/units.py +31 -0
- {karrio_landmark-2025.5.6.dist-info → karrio_landmark-2025.5.7.dist-info}/METADATA +1 -1
- {karrio_landmark-2025.5.6.dist-info → karrio_landmark-2025.5.7.dist-info}/RECORD +7 -7
- {karrio_landmark-2025.5.6.dist-info → karrio_landmark-2025.5.7.dist-info}/WHEEL +0 -0
- {karrio_landmark-2025.5.6.dist-info → karrio_landmark-2025.5.7.dist-info}/entry_points.txt +0 -0
- {karrio_landmark-2025.5.6.dist-info → karrio_landmark-2025.5.7.dist-info}/top_level.txt +0 -0
|
@@ -68,6 +68,26 @@ def _extract_details(
|
|
|
68
68
|
description=event.Status,
|
|
69
69
|
code=event.EventCode,
|
|
70
70
|
location=event.Location,
|
|
71
|
+
timestamp=lib.fiso_timestamp(
|
|
72
|
+
event.DateTime,
|
|
73
|
+
try_formats=DATETIME_FORMATS,
|
|
74
|
+
),
|
|
75
|
+
status=next(
|
|
76
|
+
(
|
|
77
|
+
s.name
|
|
78
|
+
for s in list(provider_units.TrackingStatus)
|
|
79
|
+
if event.EventCode in s.value
|
|
80
|
+
),
|
|
81
|
+
None,
|
|
82
|
+
),
|
|
83
|
+
reason=next(
|
|
84
|
+
(
|
|
85
|
+
r.name
|
|
86
|
+
for r in list(provider_units.TrackingIncidentReason)
|
|
87
|
+
if event.EventCode in r.value
|
|
88
|
+
),
|
|
89
|
+
None,
|
|
90
|
+
),
|
|
71
91
|
)
|
|
72
92
|
for event in package.Events.Event
|
|
73
93
|
]
|
|
@@ -180,6 +180,37 @@ class TrackingStatus(lib.Enum):
|
|
|
180
180
|
]
|
|
181
181
|
|
|
182
182
|
|
|
183
|
+
class TrackingIncidentReason(lib.Enum):
|
|
184
|
+
"""Maps Landmark exception codes to normalized TrackingIncidentReason."""
|
|
185
|
+
|
|
186
|
+
# Carrier-caused issues
|
|
187
|
+
carrier_damaged_parcel = []
|
|
188
|
+
carrier_sorting_error = []
|
|
189
|
+
carrier_address_not_found = []
|
|
190
|
+
carrier_parcel_lost = []
|
|
191
|
+
carrier_vehicle_issue = []
|
|
192
|
+
|
|
193
|
+
# Consignee-caused issues
|
|
194
|
+
consignee_refused = ["900"] # Delivery failed
|
|
195
|
+
consignee_business_closed = []
|
|
196
|
+
consignee_not_available = ["400"] # Attempted delivery
|
|
197
|
+
consignee_not_home = ["400"] # Attempted delivery
|
|
198
|
+
consignee_incorrect_address = ["450"] # Item re-directed to new address
|
|
199
|
+
consignee_access_restricted = []
|
|
200
|
+
|
|
201
|
+
# Customs-related issues
|
|
202
|
+
customs_delay = ["135"] # Customs Issue
|
|
203
|
+
customs_documentation = ["135"] # Customs Issue
|
|
204
|
+
customs_duties_unpaid = ["90"] # Shipment held for payment
|
|
205
|
+
|
|
206
|
+
# Weather/Force majeure
|
|
207
|
+
weather_delay = []
|
|
208
|
+
natural_disaster = []
|
|
209
|
+
|
|
210
|
+
# Other issues
|
|
211
|
+
unknown = []
|
|
212
|
+
|
|
213
|
+
|
|
183
214
|
def load_services_from_csv() -> list:
|
|
184
215
|
"""
|
|
185
216
|
Load service definitions from CSV file.
|
|
@@ -6,8 +6,8 @@ karrio/plugins/landmark/__init__.py,sha256=hTHkXDkiEGHlvXGXX-fVOPaE_ZrF5Et06UpWF
|
|
|
6
6
|
karrio/providers/landmark/__init__.py,sha256=I5ZC7uyk_sL09RBXq1T8OdtckkWwRIa7jYUK1agwNUU,369
|
|
7
7
|
karrio/providers/landmark/error.py,sha256=Ev3usmZPmYBzn_kkcLo84sVyFyx3AWG7sTw0NWNr5hw,1084
|
|
8
8
|
karrio/providers/landmark/services.csv,sha256=bIWr1LLGP2TyFTqRwiticLJg8cR3sBW19hiJcWhCNCM,28584
|
|
9
|
-
karrio/providers/landmark/tracking.py,sha256=
|
|
10
|
-
karrio/providers/landmark/units.py,sha256=
|
|
9
|
+
karrio/providers/landmark/tracking.py,sha256=ZL9jmP43koKURh-6ar7N6o6TqCrOHkNHKstsixg5ywY,5180
|
|
10
|
+
karrio/providers/landmark/units.py,sha256=qXGbMajso8Cn2ZBAiXkkqgguBQGlDJGXl3utD0UDuKg,9404
|
|
11
11
|
karrio/providers/landmark/utils.py,sha256=OqGPynSpl92YPRVHjJ8xCkqBmX2u9PJ8A-Fer2sKDik,839
|
|
12
12
|
karrio/providers/landmark/shipment/__init__.py,sha256=7t1rxeJdf-5M4Mqt72lag5ogkX0UF_55RgzBbqWtk7g,233
|
|
13
13
|
karrio/providers/landmark/shipment/cancel.py,sha256=LcPfM890tzxKGSeVCNVKGmuOjzuZ31deEKrGnvzltLc,2125
|
|
@@ -22,8 +22,8 @@ karrio/schemas/landmark/ship_request.py,sha256=DE1n4f9fzwquPy9NKMXeZv07H-8pGreg9
|
|
|
22
22
|
karrio/schemas/landmark/ship_response.py,sha256=kUIkxDpdr7t4fnJ9ah5oTaiz2pOwuRIYowjsw1s--5Q,102665
|
|
23
23
|
karrio/schemas/landmark/track_request.py,sha256=Xj8I-3sjfa1dEXVqj92LUeuEuKT2_FXjx3oi0uNlk_0,62530
|
|
24
24
|
karrio/schemas/landmark/track_response.py,sha256=cPzSorIUu0HAbHJdLXwFx55S2FcXOqy6R6I8NS30ZMQ,85540
|
|
25
|
-
karrio_landmark-2025.5.
|
|
26
|
-
karrio_landmark-2025.5.
|
|
27
|
-
karrio_landmark-2025.5.
|
|
28
|
-
karrio_landmark-2025.5.
|
|
29
|
-
karrio_landmark-2025.5.
|
|
25
|
+
karrio_landmark-2025.5.7.dist-info/METADATA,sha256=ZwJVQ-ljrMszolzkWsvQYbxgIRd77U0fJkigPDAyEks,1012
|
|
26
|
+
karrio_landmark-2025.5.7.dist-info/WHEEL,sha256=_zCd3N1l69ArxyTb8rzEoP9TpbYXkqRFSNOD5OuxnTs,91
|
|
27
|
+
karrio_landmark-2025.5.7.dist-info/entry_points.txt,sha256=INmMiMXugqC5-e7sWMAO7MUOXKV6WArm2JaNaVeiL-0,61
|
|
28
|
+
karrio_landmark-2025.5.7.dist-info/top_level.txt,sha256=9Nasa6abG7pPPG8MGzlemnqw1ohIqgouzQ7HGBnOFLg,27
|
|
29
|
+
karrio_landmark-2025.5.7.dist-info/RECORD,,
|
|
File without changes
|
|
File without changes
|
|
File without changes
|