karrio-aramex 2025.5.6__py3-none-any.whl → 2026.1__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/aramex/tracking.py +10 -0
- karrio/providers/aramex/units.py +29 -0
- {karrio_aramex-2025.5.6.dist-info → karrio_aramex-2026.1.dist-info}/METADATA +1 -1
- {karrio_aramex-2025.5.6.dist-info → karrio_aramex-2026.1.dist-info}/RECORD +7 -7
- {karrio_aramex-2025.5.6.dist-info → karrio_aramex-2026.1.dist-info}/WHEEL +0 -0
- {karrio_aramex-2025.5.6.dist-info → karrio_aramex-2026.1.dist-info}/entry_points.txt +0 -0
- {karrio_aramex-2025.5.6.dist-info → karrio_aramex-2026.1.dist-info}/top_level.txt +0 -0
|
@@ -22,6 +22,7 @@ from karrio.core.models import (
|
|
|
22
22
|
from karrio.providers.aramex.utils import Settings
|
|
23
23
|
from karrio.providers.aramex.error import parse_error_response
|
|
24
24
|
import karrio.lib as lib
|
|
25
|
+
import karrio.providers.aramex.units as provider_units
|
|
25
26
|
|
|
26
27
|
|
|
27
28
|
def parse_tracking_response(
|
|
@@ -70,6 +71,15 @@ def _extract_detail(node: Element, settings: Settings) -> TrackingDetails:
|
|
|
70
71
|
location=detail.UpdateLocation,
|
|
71
72
|
code=detail.UpdateCode,
|
|
72
73
|
time=DF.ftime(detail.UpdateDateTime, "%Y-%m-%dT%H:%M:%S"),
|
|
74
|
+
timestamp=lib.fiso_timestamp(detail.UpdateDateTime, current_format="%Y-%m-%dT%H:%M:%S"),
|
|
75
|
+
reason=next(
|
|
76
|
+
(
|
|
77
|
+
r.name
|
|
78
|
+
for r in list(provider_units.TrackingIncidentReason)
|
|
79
|
+
if detail.UpdateCode in r.value
|
|
80
|
+
),
|
|
81
|
+
None,
|
|
82
|
+
),
|
|
73
83
|
)
|
|
74
84
|
],
|
|
75
85
|
)
|
karrio/providers/aramex/units.py
CHANGED
|
@@ -1,5 +1,33 @@
|
|
|
1
1
|
""" Aramex Native Types """
|
|
2
2
|
|
|
3
|
+
import karrio.lib as lib
|
|
4
|
+
|
|
5
|
+
|
|
6
|
+
class TrackingIncidentReason(lib.Enum):
|
|
7
|
+
"""Maps Aramex exception codes to normalized TrackingIncidentReason."""
|
|
8
|
+
carrier_damaged_parcel = ["DMG", "DAMAGE", "DAMAGED"]
|
|
9
|
+
carrier_sorting_error = ["MISROUTE"]
|
|
10
|
+
carrier_parcel_lost = ["LOST"]
|
|
11
|
+
carrier_vehicle_issue = ["DELAY", "VEHICLE"]
|
|
12
|
+
|
|
13
|
+
consignee_refused = ["REFUSED", "REF", "REJECT"]
|
|
14
|
+
consignee_business_closed = ["CLOSED", "BUSINESS_CLOSED"]
|
|
15
|
+
consignee_not_home = ["NOTHOME", "NH", "NOT_HOME"]
|
|
16
|
+
consignee_incorrect_address = ["BADADDR", "INCORRECT", "WRONG_ADDRESS"]
|
|
17
|
+
consignee_access_restricted = ["NOACCESS", "RESTRICTED"]
|
|
18
|
+
|
|
19
|
+
customs_delay = ["CUSTOMS", "CUSTOMSHOLD", "CUSTOMS_DELAY"]
|
|
20
|
+
customs_documentation = ["CUSTOMSDOC", "CUSTOMS_DOCUMENTS"]
|
|
21
|
+
customs_duties_unpaid = ["CUSTOMS_UNPAID", "DUTIES"]
|
|
22
|
+
|
|
23
|
+
weather_delay = ["WEATHER"]
|
|
24
|
+
|
|
25
|
+
delivery_exception_hold = ["HOLD", "ONHOLD", "HELD"]
|
|
26
|
+
delivery_exception_undeliverable = ["UNDELIVERABLE", "UNABLE"]
|
|
27
|
+
|
|
28
|
+
unknown = []
|
|
29
|
+
|
|
30
|
+
|
|
3
31
|
# import karrio.lib as lib
|
|
4
32
|
# from karrio.core.utils import Enum, Flag
|
|
5
33
|
#
|
|
@@ -44,3 +72,4 @@
|
|
|
44
72
|
# carrier_signature = "SIGNATURE CODE"
|
|
45
73
|
# carrier_saturday_delivery = "SATURDAY DELIVERY CODE"
|
|
46
74
|
# carrier_dry_ice = "DRY ICE CODE"
|
|
75
|
+
#
|
|
@@ -5,8 +5,8 @@ karrio/mappers/aramex/settings.py,sha256=AiZqzV4EdkyCxesd4_5P12PhpPwHJTKss0NZLep
|
|
|
5
5
|
karrio/plugins/aramex/__init__.py,sha256=j8em87e7q4zE2nzqLCgYNBOLqw6F1xhqeXGlFkz930w,738
|
|
6
6
|
karrio/providers/aramex/__init__.py,sha256=BvDtqrLi7p1-b3snGShCe1_t0VweA4wETUPUPYu5bn0,763
|
|
7
7
|
karrio/providers/aramex/error.py,sha256=VDP-lXuvjpJpi6tuOlnnb3vjJQGAEi_FVsuALr3PlqM,785
|
|
8
|
-
karrio/providers/aramex/tracking.py,sha256=
|
|
9
|
-
karrio/providers/aramex/units.py,sha256=
|
|
8
|
+
karrio/providers/aramex/tracking.py,sha256=dz-FtOTevBbf-hnBwj7-4qgYHwNTM_XghMdjPR-n-XU,3668
|
|
9
|
+
karrio/providers/aramex/units.py,sha256=3ukNweec1X60kwM3BVtKufIezhMYeuR-_b180NUKm98,2372
|
|
10
10
|
karrio/providers/aramex/utils.py,sha256=VDhZPqtmARxE85nAMgzCwNlb88mh4LeMxFyzhafkZV0,1419
|
|
11
11
|
karrio/schemas/aramex/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
12
12
|
karrio/schemas/aramex/array_of_string.py,sha256=Y2AkB07s520YDOriN-1uHdYpbBXvjinzPkhF4gwuCk8,166211
|
|
@@ -15,8 +15,8 @@ karrio/schemas/aramex/location.py,sha256=hqbZoII1TxqPOu6lr9IQFoCiKj4t0uujTCDe2wd
|
|
|
15
15
|
karrio/schemas/aramex/rates.py,sha256=eamY44eEN6E1R4MJbQaHl8m8iZB7skr_1Ikap9vBqgk,271093
|
|
16
16
|
karrio/schemas/aramex/shipping.py,sha256=1CLQBZvXXhpPX3X_2Db5LmgmeI6N_oMZzfM2_iBgAIE,587577
|
|
17
17
|
karrio/schemas/aramex/tracking.py,sha256=8hD1EtXkY8OVn3W-LbMIjaAL_85IE381dtiX1Xk1vGw,200865
|
|
18
|
-
karrio_aramex-
|
|
19
|
-
karrio_aramex-
|
|
20
|
-
karrio_aramex-
|
|
21
|
-
karrio_aramex-
|
|
22
|
-
karrio_aramex-
|
|
18
|
+
karrio_aramex-2026.1.dist-info/METADATA,sha256=xOXlT1IQb9Aal02l-4Gg06Fxj-fqL9RToh8Vn6fgR8o,982
|
|
19
|
+
karrio_aramex-2026.1.dist-info/WHEEL,sha256=_zCd3N1l69ArxyTb8rzEoP9TpbYXkqRFSNOD5OuxnTs,91
|
|
20
|
+
karrio_aramex-2026.1.dist-info/entry_points.txt,sha256=I7amJuU5RsCm02LEQamkDdguaGqV7C9Hmi2IkhQwTg8,57
|
|
21
|
+
karrio_aramex-2026.1.dist-info/top_level.txt,sha256=FZCY8Nwft8oEGHdl--xku8P3TrnOxu5dETEU_fWpRSM,20
|
|
22
|
+
karrio_aramex-2026.1.dist-info/RECORD,,
|
|
File without changes
|
|
File without changes
|
|
File without changes
|