karrio-easyship 2025.5rc36__py3-none-any.whl → 2025.5.2__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/easyship/shipment/create.py +9 -0
- {karrio_easyship-2025.5rc36.dist-info → karrio_easyship-2025.5.2.dist-info}/METADATA +2 -2
- {karrio_easyship-2025.5rc36.dist-info → karrio_easyship-2025.5.2.dist-info}/RECORD +6 -6
- {karrio_easyship-2025.5rc36.dist-info → karrio_easyship-2025.5.2.dist-info}/WHEEL +0 -0
- {karrio_easyship-2025.5rc36.dist-info → karrio_easyship-2025.5.2.dist-info}/entry_points.txt +0 -0
- {karrio_easyship-2025.5rc36.dist-info → karrio_easyship-2025.5.2.dist-info}/top_level.txt +0 -0
|
@@ -2,6 +2,7 @@
|
|
|
2
2
|
|
|
3
3
|
import karrio.schemas.easyship.shipment_request as easyship
|
|
4
4
|
import karrio.schemas.easyship.shipment_response as shipping
|
|
5
|
+
import karrio.schemas.easyship.rate_response as rating
|
|
5
6
|
|
|
6
7
|
import typing
|
|
7
8
|
import karrio.lib as lib
|
|
@@ -10,6 +11,7 @@ import karrio.core.models as models
|
|
|
10
11
|
import karrio.providers.easyship.error as error
|
|
11
12
|
import karrio.providers.easyship.utils as provider_utils
|
|
12
13
|
import karrio.providers.easyship.units as provider_units
|
|
14
|
+
import karrio.providers.easyship.rate as rate
|
|
13
15
|
|
|
14
16
|
|
|
15
17
|
def parse_shipment_response(
|
|
@@ -45,6 +47,12 @@ def _extract_details(
|
|
|
45
47
|
tracking_numbers = [tracking.tracking_number for tracking in details.trackings]
|
|
46
48
|
tracking_number, *__ = tracking_numbers
|
|
47
49
|
|
|
50
|
+
# Extract selected rate from response if available
|
|
51
|
+
rate_data = next(iter(data["shipment"]["rates"] or []), None)
|
|
52
|
+
selected_rate = lib.identity(
|
|
53
|
+
rate._extract_details(rate_data, settings) if rate_data else None
|
|
54
|
+
)
|
|
55
|
+
|
|
48
56
|
return models.ShipmentDetails(
|
|
49
57
|
carrier_id=settings.carrier_id,
|
|
50
58
|
carrier_name=settings.carrier_name,
|
|
@@ -52,6 +60,7 @@ def _extract_details(
|
|
|
52
60
|
shipment_identifier=details.easyship_shipment_id,
|
|
53
61
|
label_type=label_type,
|
|
54
62
|
docs=models.Documents(label=label),
|
|
63
|
+
selected_rate=selected_rate,
|
|
55
64
|
meta=dict(
|
|
56
65
|
shipment_ids=[details.easyship_shipment_id],
|
|
57
66
|
tracking_numbers=tracking_numbers,
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
Metadata-Version: 2.4
|
|
2
2
|
Name: karrio_easyship
|
|
3
|
-
Version: 2025.
|
|
3
|
+
Version: 2025.5.2
|
|
4
4
|
Summary: Karrio - Easyship Shipping Extension
|
|
5
5
|
Author-email: karrio <hello@karrio.io>
|
|
6
|
-
License-Expression:
|
|
6
|
+
License-Expression: LGPL-3.0
|
|
7
7
|
Project-URL: Homepage, https://github.com/karrioapi/karrio
|
|
8
8
|
Classifier: Intended Audience :: Developers
|
|
9
9
|
Classifier: Operating System :: OS Independent
|
|
@@ -17,7 +17,7 @@ karrio/providers/easyship/pickup/create.py,sha256=YX4pFPdZIgvIH5tB5SpcxiBo-4Rxp3
|
|
|
17
17
|
karrio/providers/easyship/pickup/update.py,sha256=8DGoLhQNNV5JAaMypD7pYuZ-PMQhkTk8jI-LoPvA9Sw,3212
|
|
18
18
|
karrio/providers/easyship/shipment/__init__.py,sha256=XZUedqB7ZIut6FPey7DTx64_OeD7c9KPsUIiAl6oSag,233
|
|
19
19
|
karrio/providers/easyship/shipment/cancel.py,sha256=2YKshLIZkOnF6nX3EMDXPkUBdjJRZm9sYwwB7mTC-D4,1212
|
|
20
|
-
karrio/providers/easyship/shipment/create.py,sha256=
|
|
20
|
+
karrio/providers/easyship/shipment/create.py,sha256=72X_mOciSdSZubRXAsqHesGApkZqhP09KcHFhmH1eYI,12989
|
|
21
21
|
karrio/schemas/easyship/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
22
22
|
karrio/schemas/easyship/error_response.py,sha256=P-SUAjY7b703B0KHaYK4uFSLkexCBp-JZZvg8Blxw0E,423
|
|
23
23
|
karrio/schemas/easyship/manifest_request.py,sha256=GzcJqgBbumbTl4muIvwtnbrb8aM-Hdj1JtSbQ9D7wis,208
|
|
@@ -32,8 +32,8 @@ karrio/schemas/easyship/shipment_request.py,sha256=nowz5CWtxdZg4zb81a_QsrmEI0dEt
|
|
|
32
32
|
karrio/schemas/easyship/shipment_response.py,sha256=9uJJs4xR0bLLz7vmZMCSaIyz59dBl4kvHjMKwVvLs7g,11002
|
|
33
33
|
karrio/schemas/easyship/tracking_request.py,sha256=XQ735p0jyG46fzaNlSqb2Wu8Ral6UgID8HFM6fBQsPw,1620
|
|
34
34
|
karrio/schemas/easyship/tracking_response.py,sha256=QwuvI_8-YQXo-2q6uMAJA5IQrgX2gfoPtg1TGBHoZA4,1830
|
|
35
|
-
karrio_easyship-2025.
|
|
36
|
-
karrio_easyship-2025.
|
|
37
|
-
karrio_easyship-2025.
|
|
38
|
-
karrio_easyship-2025.
|
|
39
|
-
karrio_easyship-2025.
|
|
35
|
+
karrio_easyship-2025.5.2.dist-info/METADATA,sha256=u_OBVrpq7xqNds0w2lOQ-IQfRGS_BJjW5ivCRlhZ9E8,997
|
|
36
|
+
karrio_easyship-2025.5.2.dist-info/WHEEL,sha256=_zCd3N1l69ArxyTb8rzEoP9TpbYXkqRFSNOD5OuxnTs,91
|
|
37
|
+
karrio_easyship-2025.5.2.dist-info/entry_points.txt,sha256=fWVjIqvIorXvb1UVUMceu3i7pP0ba6gJnaZm7HLkZIY,61
|
|
38
|
+
karrio_easyship-2025.5.2.dist-info/top_level.txt,sha256=FZCY8Nwft8oEGHdl--xku8P3TrnOxu5dETEU_fWpRSM,20
|
|
39
|
+
karrio_easyship-2025.5.2.dist-info/RECORD,,
|
|
File without changes
|
{karrio_easyship-2025.5rc36.dist-info → karrio_easyship-2025.5.2.dist-info}/entry_points.txt
RENAMED
|
File without changes
|
|
File without changes
|