karrio-postat 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/mappers/postat/__init__.py +3 -0
- karrio/mappers/postat/mapper.py +41 -0
- karrio/mappers/postat/proxy.py +43 -0
- karrio/mappers/postat/settings.py +35 -0
- karrio/plugins/postat/__init__.py +28 -0
- karrio/providers/postat/__init__.py +8 -0
- karrio/providers/postat/error.py +30 -0
- karrio/providers/postat/shipment/__init__.py +9 -0
- karrio/providers/postat/shipment/cancel.py +65 -0
- karrio/providers/postat/shipment/create.py +147 -0
- karrio/providers/postat/units.py +241 -0
- karrio/providers/postat/utils.py +54 -0
- karrio/schemas/postat/__init__.py +0 -0
- karrio/schemas/postat/plc_types.py +3344 -0
- karrio/schemas/postat/void_types.py +1734 -0
- karrio_postat-2026.1.dist-info/METADATA +44 -0
- karrio_postat-2026.1.dist-info/RECORD +20 -0
- karrio_postat-2026.1.dist-info/WHEEL +5 -0
- karrio_postat-2026.1.dist-info/entry_points.txt +2 -0
- karrio_postat-2026.1.dist-info/top_level.txt +4 -0
|
@@ -0,0 +1,54 @@
|
|
|
1
|
+
"""Karrio PostAT provider utilities."""
|
|
2
|
+
|
|
3
|
+
import attr
|
|
4
|
+
import karrio.lib as lib
|
|
5
|
+
import karrio.core as core
|
|
6
|
+
|
|
7
|
+
|
|
8
|
+
@attr.s(auto_attribs=True)
|
|
9
|
+
class Settings(core.Settings):
|
|
10
|
+
"""PostAT connection settings."""
|
|
11
|
+
|
|
12
|
+
# Required credentials (from Austrian Post onboarding)
|
|
13
|
+
client_id: str
|
|
14
|
+
org_unit_id: str
|
|
15
|
+
org_unit_guid: str
|
|
16
|
+
|
|
17
|
+
# Generic settings
|
|
18
|
+
id: str = None
|
|
19
|
+
test_mode: bool = False
|
|
20
|
+
carrier_id: str = "postat"
|
|
21
|
+
account_country_code: str = "AT"
|
|
22
|
+
metadata: dict = {}
|
|
23
|
+
config: dict = {}
|
|
24
|
+
|
|
25
|
+
@property
|
|
26
|
+
def carrier_name(self):
|
|
27
|
+
return "postat"
|
|
28
|
+
|
|
29
|
+
@property
|
|
30
|
+
def server_url(self):
|
|
31
|
+
"""Return the server URL.
|
|
32
|
+
|
|
33
|
+
Note: Austrian Post provides the URL during customer onboarding.
|
|
34
|
+
This should be configured via connection settings.
|
|
35
|
+
"""
|
|
36
|
+
return (
|
|
37
|
+
self.connection_config.server_url.state
|
|
38
|
+
or "https://plc.post.at/Post.Webservice/ShippingService.svc"
|
|
39
|
+
)
|
|
40
|
+
|
|
41
|
+
@property
|
|
42
|
+
def tracking_url(self):
|
|
43
|
+
"""Return the public tracking URL template for end users."""
|
|
44
|
+
return "https://www.post.at/sv/sendungssuche?snr={}"
|
|
45
|
+
|
|
46
|
+
@property
|
|
47
|
+
def connection_config(self) -> lib.units.Options:
|
|
48
|
+
"""Return connection configuration options."""
|
|
49
|
+
from karrio.providers.postat.units import ConnectionConfig
|
|
50
|
+
|
|
51
|
+
return lib.to_connection_config(
|
|
52
|
+
self.config or {},
|
|
53
|
+
option_type=ConnectionConfig,
|
|
54
|
+
)
|
|
File without changes
|