python-sendparcel-inpost 0.1.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.
- python_sendparcel_inpost-0.1.1.dist-info/METADATA +371 -0
- python_sendparcel_inpost-0.1.1.dist-info/RECORD +13 -0
- python_sendparcel_inpost-0.1.1.dist-info/WHEEL +4 -0
- python_sendparcel_inpost-0.1.1.dist-info/entry_points.txt +3 -0
- sendparcel_inpost/__init__.py +14 -0
- sendparcel_inpost/client.py +177 -0
- sendparcel_inpost/enums.py +18 -0
- sendparcel_inpost/exceptions.py +45 -0
- sendparcel_inpost/providers/__init__.py +6 -0
- sendparcel_inpost/providers/courier.py +305 -0
- sendparcel_inpost/providers/locker.py +320 -0
- sendparcel_inpost/status_mapping.py +46 -0
- sendparcel_inpost/types.py +72 -0
|
@@ -0,0 +1,72 @@
|
|
|
1
|
+
"""ShipX-specific type definitions."""
|
|
2
|
+
|
|
3
|
+
from typing import TypedDict
|
|
4
|
+
|
|
5
|
+
|
|
6
|
+
class ShipXAddress(TypedDict, total=False):
|
|
7
|
+
"""ShipX address structure."""
|
|
8
|
+
|
|
9
|
+
street: str
|
|
10
|
+
building_number: str
|
|
11
|
+
flat_number: str
|
|
12
|
+
city: str
|
|
13
|
+
post_code: str
|
|
14
|
+
country_code: str
|
|
15
|
+
|
|
16
|
+
|
|
17
|
+
class ShipXPeer(TypedDict, total=False):
|
|
18
|
+
"""ShipX sender/receiver peer."""
|
|
19
|
+
|
|
20
|
+
first_name: str
|
|
21
|
+
last_name: str
|
|
22
|
+
company_name: str
|
|
23
|
+
phone: str
|
|
24
|
+
email: str
|
|
25
|
+
address: ShipXAddress
|
|
26
|
+
|
|
27
|
+
|
|
28
|
+
class _ShipXDimensions(TypedDict, total=False):
|
|
29
|
+
"""Parcel dimensions."""
|
|
30
|
+
|
|
31
|
+
length: float
|
|
32
|
+
width: float
|
|
33
|
+
height: float
|
|
34
|
+
unit: str
|
|
35
|
+
|
|
36
|
+
|
|
37
|
+
class _ShipXWeight(TypedDict, total=False):
|
|
38
|
+
"""Parcel weight."""
|
|
39
|
+
|
|
40
|
+
amount: float
|
|
41
|
+
unit: str
|
|
42
|
+
|
|
43
|
+
|
|
44
|
+
class ShipXParcel(TypedDict, total=False):
|
|
45
|
+
"""ShipX parcel definition."""
|
|
46
|
+
|
|
47
|
+
template: str
|
|
48
|
+
dimensions: _ShipXDimensions
|
|
49
|
+
weight: _ShipXWeight
|
|
50
|
+
|
|
51
|
+
|
|
52
|
+
class _ShipXCustomAttributes(TypedDict, total=False):
|
|
53
|
+
"""ShipX shipment custom attributes."""
|
|
54
|
+
|
|
55
|
+
target_point: str
|
|
56
|
+
sending_method: str
|
|
57
|
+
dropoff_point: str
|
|
58
|
+
|
|
59
|
+
|
|
60
|
+
class ShipXShipmentPayload(TypedDict, total=False):
|
|
61
|
+
"""Payload for ShipX create shipment endpoint."""
|
|
62
|
+
|
|
63
|
+
receiver: ShipXPeer
|
|
64
|
+
sender: ShipXPeer
|
|
65
|
+
parcels: list[ShipXParcel]
|
|
66
|
+
service: str
|
|
67
|
+
custom_attributes: _ShipXCustomAttributes
|
|
68
|
+
reference: str
|
|
69
|
+
comments: str
|
|
70
|
+
insurance: dict[str, object]
|
|
71
|
+
cod: dict[str, object]
|
|
72
|
+
additional_services: list[str]
|