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.
@@ -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