celitech-sdk 2.0.2__tar.gz → 2.0.5__tar.gz

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.
Files changed (85) hide show
  1. {celitech_sdk-2.0.2/src/celitech_sdk.egg-info → celitech_sdk-2.0.5}/PKG-INFO +5 -5
  2. {celitech_sdk-2.0.2 → celitech_sdk-2.0.5}/PyPI_README.md +4 -4
  3. {celitech_sdk-2.0.2 → celitech_sdk-2.0.5}/README.md +4 -4
  4. {celitech_sdk-2.0.2 → celitech_sdk-2.0.5}/pyproject.toml +1 -1
  5. celitech_sdk-2.0.5/src/celitech/models/__init__.py +142 -0
  6. {celitech_sdk-2.0.2 → celitech_sdk-2.0.5}/src/celitech/models/bad_request.py +2 -0
  7. {celitech_sdk-2.0.2 → celitech_sdk-2.0.5}/src/celitech/models/create_purchase_ok_response.py +2 -0
  8. {celitech_sdk-2.0.2 → celitech_sdk-2.0.5}/src/celitech/models/create_purchase_request.py +4 -2
  9. {celitech_sdk-2.0.2 → celitech_sdk-2.0.5}/src/celitech/models/create_purchase_v2_ok_response.py +2 -0
  10. {celitech_sdk-2.0.2 → celitech_sdk-2.0.5}/src/celitech/models/create_purchase_v2_request.py +6 -4
  11. {celitech_sdk-2.0.2 → celitech_sdk-2.0.5}/src/celitech/models/edit_purchase_ok_response.py +2 -0
  12. {celitech_sdk-2.0.2 → celitech_sdk-2.0.5}/src/celitech/models/edit_purchase_request.py +2 -0
  13. {celitech_sdk-2.0.2 → celitech_sdk-2.0.5}/src/celitech/models/get_esim_device_ok_response.py +2 -0
  14. {celitech_sdk-2.0.2 → celitech_sdk-2.0.5}/src/celitech/models/get_esim_history_ok_response.py +2 -0
  15. {celitech_sdk-2.0.2 → celitech_sdk-2.0.5}/src/celitech/models/get_esim_ok_response.py +2 -0
  16. {celitech_sdk-2.0.2 → celitech_sdk-2.0.5}/src/celitech/models/get_purchase_consumption_ok_response.py +6 -4
  17. {celitech_sdk-2.0.2 → celitech_sdk-2.0.5}/src/celitech/models/grant_type.py +2 -0
  18. {celitech_sdk-2.0.2 → celitech_sdk-2.0.5}/src/celitech/models/list_destinations_ok_response.py +2 -0
  19. {celitech_sdk-2.0.2 → celitech_sdk-2.0.5}/src/celitech/models/list_packages_ok_response.py +6 -4
  20. {celitech_sdk-2.0.2 → celitech_sdk-2.0.5}/src/celitech/models/list_purchases_ok_response.py +8 -6
  21. {celitech_sdk-2.0.2 → celitech_sdk-2.0.5}/src/celitech/models/o_auth_token_request.py +1 -0
  22. {celitech_sdk-2.0.2 → celitech_sdk-2.0.5}/src/celitech/models/o_auth_token_response.py +2 -0
  23. {celitech_sdk-2.0.2 → celitech_sdk-2.0.5}/src/celitech/models/token_ok_response.py +2 -0
  24. {celitech_sdk-2.0.2 → celitech_sdk-2.0.5}/src/celitech/models/top_up_esim_ok_response.py +2 -0
  25. {celitech_sdk-2.0.2 → celitech_sdk-2.0.5}/src/celitech/models/top_up_esim_request.py +6 -4
  26. {celitech_sdk-2.0.2 → celitech_sdk-2.0.5}/src/celitech/models/unauthorized.py +2 -0
  27. {celitech_sdk-2.0.2 → celitech_sdk-2.0.5}/src/celitech/models/utils/base_model.py +8 -0
  28. {celitech_sdk-2.0.2 → celitech_sdk-2.0.5}/src/celitech/models/utils/cast_models.py +14 -1
  29. {celitech_sdk-2.0.2 → celitech_sdk-2.0.5}/src/celitech/models/utils/one_of_base_model.py +12 -0
  30. {celitech_sdk-2.0.2 → celitech_sdk-2.0.5}/src/celitech/net/request_chain/handlers/http_handler.py +14 -0
  31. {celitech_sdk-2.0.2 → celitech_sdk-2.0.5}/src/celitech/net/transport/api_error.py +9 -0
  32. {celitech_sdk-2.0.2 → celitech_sdk-2.0.5}/src/celitech/net/transport/serializer.py +1 -1
  33. {celitech_sdk-2.0.2 → celitech_sdk-2.0.5}/src/celitech/net/transport/utils.py +3 -0
  34. {celitech_sdk-2.0.2 → celitech_sdk-2.0.5}/src/celitech/services/async_/destinations.py +1 -1
  35. {celitech_sdk-2.0.2 → celitech_sdk-2.0.5}/src/celitech/services/async_/e_sim.py +1 -1
  36. {celitech_sdk-2.0.2 → celitech_sdk-2.0.5}/src/celitech/services/async_/i_frame.py +1 -1
  37. {celitech_sdk-2.0.2 → celitech_sdk-2.0.5}/src/celitech/services/async_/o_auth.py +1 -1
  38. {celitech_sdk-2.0.2 → celitech_sdk-2.0.5}/src/celitech/services/async_/packages.py +5 -1
  39. {celitech_sdk-2.0.2 → celitech_sdk-2.0.5}/src/celitech/services/async_/purchases.py +1 -1
  40. {celitech_sdk-2.0.2 → celitech_sdk-2.0.5}/src/celitech/services/destinations.py +5 -1
  41. {celitech_sdk-2.0.2 → celitech_sdk-2.0.5}/src/celitech/services/e_sim.py +15 -3
  42. {celitech_sdk-2.0.2 → celitech_sdk-2.0.5}/src/celitech/services/i_frame.py +3 -1
  43. {celitech_sdk-2.0.2 → celitech_sdk-2.0.5}/src/celitech/services/o_auth.py +5 -1
  44. {celitech_sdk-2.0.2 → celitech_sdk-2.0.5}/src/celitech/services/packages.py +15 -1
  45. {celitech_sdk-2.0.2 → celitech_sdk-2.0.5}/src/celitech/services/purchases.py +29 -6
  46. {celitech_sdk-2.0.2 → celitech_sdk-2.0.5}/src/celitech/services/utils/validator.py +38 -3
  47. {celitech_sdk-2.0.2 → celitech_sdk-2.0.5/src/celitech_sdk.egg-info}/PKG-INFO +5 -5
  48. celitech_sdk-2.0.2/src/celitech/models/__init__.py +0 -75
  49. {celitech_sdk-2.0.2 → celitech_sdk-2.0.5}/LICENSE +0 -0
  50. {celitech_sdk-2.0.2 → celitech_sdk-2.0.5}/setup.cfg +0 -0
  51. {celitech_sdk-2.0.2 → celitech_sdk-2.0.5}/src/celitech/__init__.py +0 -0
  52. {celitech_sdk-2.0.2 → celitech_sdk-2.0.5}/src/celitech/models/utils/__init__.py +0 -0
  53. {celitech_sdk-2.0.2 → celitech_sdk-2.0.5}/src/celitech/models/utils/base_error.py +0 -0
  54. {celitech_sdk-2.0.2 → celitech_sdk-2.0.5}/src/celitech/models/utils/json_map.py +0 -0
  55. {celitech_sdk-2.0.2 → celitech_sdk-2.0.5}/src/celitech/models/utils/sentinel.py +0 -0
  56. {celitech_sdk-2.0.2 → celitech_sdk-2.0.5}/src/celitech/net/__init__.py +0 -0
  57. {celitech_sdk-2.0.2 → celitech_sdk-2.0.5}/src/celitech/net/environment/__init__.py +0 -0
  58. {celitech_sdk-2.0.2 → celitech_sdk-2.0.5}/src/celitech/net/environment/environment.py +0 -0
  59. {celitech_sdk-2.0.2 → celitech_sdk-2.0.5}/src/celitech/net/headers/__init__.py +0 -0
  60. {celitech_sdk-2.0.2 → celitech_sdk-2.0.5}/src/celitech/net/headers/base_header.py +0 -0
  61. {celitech_sdk-2.0.2 → celitech_sdk-2.0.5}/src/celitech/net/oauth/token_manager.py +0 -0
  62. {celitech_sdk-2.0.2 → celitech_sdk-2.0.5}/src/celitech/net/request_chain/__init__.py +0 -0
  63. {celitech_sdk-2.0.2 → celitech_sdk-2.0.5}/src/celitech/net/request_chain/handlers/__init__.py +0 -0
  64. {celitech_sdk-2.0.2 → celitech_sdk-2.0.5}/src/celitech/net/request_chain/handlers/base_handler.py +0 -0
  65. {celitech_sdk-2.0.2 → celitech_sdk-2.0.5}/src/celitech/net/request_chain/handlers/oauth_handler.py +0 -0
  66. {celitech_sdk-2.0.2 → celitech_sdk-2.0.5}/src/celitech/net/request_chain/handlers/retry_handler.py +0 -0
  67. {celitech_sdk-2.0.2 → celitech_sdk-2.0.5}/src/celitech/net/request_chain/request_chain.py +0 -0
  68. {celitech_sdk-2.0.2 → celitech_sdk-2.0.5}/src/celitech/net/sdk_config.py +0 -0
  69. {celitech_sdk-2.0.2 → celitech_sdk-2.0.5}/src/celitech/net/transport/__init__.py +0 -0
  70. {celitech_sdk-2.0.2 → celitech_sdk-2.0.5}/src/celitech/net/transport/request.py +0 -0
  71. {celitech_sdk-2.0.2 → celitech_sdk-2.0.5}/src/celitech/net/transport/request_error.py +0 -0
  72. {celitech_sdk-2.0.2 → celitech_sdk-2.0.5}/src/celitech/net/transport/response.py +0 -0
  73. {celitech_sdk-2.0.2 → celitech_sdk-2.0.5}/src/celitech/sdk.py +0 -0
  74. {celitech_sdk-2.0.2 → celitech_sdk-2.0.5}/src/celitech/sdk_async.py +0 -0
  75. {celitech_sdk-2.0.2 → celitech_sdk-2.0.5}/src/celitech/services/__init__.py +0 -0
  76. {celitech_sdk-2.0.2 → celitech_sdk-2.0.5}/src/celitech/services/async_/__init__.py +0 -0
  77. {celitech_sdk-2.0.2 → celitech_sdk-2.0.5}/src/celitech/services/async_/utils/__init__.py +0 -0
  78. {celitech_sdk-2.0.2 → celitech_sdk-2.0.5}/src/celitech/services/async_/utils/to_async.py +0 -0
  79. {celitech_sdk-2.0.2 → celitech_sdk-2.0.5}/src/celitech/services/utils/__init__.py +0 -0
  80. {celitech_sdk-2.0.2 → celitech_sdk-2.0.5}/src/celitech/services/utils/base_service.py +0 -0
  81. {celitech_sdk-2.0.2 → celitech_sdk-2.0.5}/src/celitech/services/utils/default_headers.py +0 -0
  82. {celitech_sdk-2.0.2 → celitech_sdk-2.0.5}/src/celitech_sdk.egg-info/SOURCES.txt +0 -0
  83. {celitech_sdk-2.0.2 → celitech_sdk-2.0.5}/src/celitech_sdk.egg-info/dependency_links.txt +0 -0
  84. {celitech_sdk-2.0.2 → celitech_sdk-2.0.5}/src/celitech_sdk.egg-info/requires.txt +0 -0
  85. {celitech_sdk-2.0.2 → celitech_sdk-2.0.5}/src/celitech_sdk.egg-info/top_level.txt +0 -0
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: celitech-sdk
3
- Version: 2.0.2
3
+ Version: 2.0.5
4
4
  Summary: Welcome to the CELITECH API documentation!
5
5
  License: MIT
6
6
  Project-URL: Repository, https://github.com/Celitech/CelitechSDKPython
@@ -11,14 +11,14 @@ Requires-Dist: requests>=2.31.0
11
11
  Requires-Dist: pydantic<3.0.0,>=2.0.0
12
12
  Dynamic: license-file
13
13
 
14
- # Celitech Python SDK 2.0.2<a id="celitech-python-sdk-202"></a>
14
+ # Celitech Python SDK 2.0.5<a id="celitech-python-sdk-205"></a>
15
15
 
16
16
  Welcome to the Celitech SDK documentation. This guide will help you get started with integrating and using the Celitech SDK in your project.
17
17
 
18
18
  ## Versions<a id="versions"></a>
19
19
 
20
- - API version: `2.0.2`
21
- - SDK version: `2.0.2`
20
+ - API version: `2.0.5`
21
+ - SDK version: `2.0.5`
22
22
 
23
23
  ## About the API<a id="about-the-api"></a>
24
24
 
@@ -44,7 +44,7 @@ Useful links: [Homepage](https://www.celitech.com) | [Support email](mailto:supp
44
44
 
45
45
  ## Supported Language Versions<a id="supported-language-versions"></a>
46
46
 
47
- This SDK is compatible with the following versions: `Python >= 3.7`
47
+ This SDK is compatible with the following versions: `Python >= 3.9`
48
48
 
49
49
  ## Installation<a id="installation"></a>
50
50
 
@@ -1,11 +1,11 @@
1
- # Celitech Python SDK 2.0.2<a id="celitech-python-sdk-202"></a>
1
+ # Celitech Python SDK 2.0.5<a id="celitech-python-sdk-205"></a>
2
2
 
3
3
  Welcome to the Celitech SDK documentation. This guide will help you get started with integrating and using the Celitech SDK in your project.
4
4
 
5
5
  ## Versions<a id="versions"></a>
6
6
 
7
- - API version: `2.0.2`
8
- - SDK version: `2.0.2`
7
+ - API version: `2.0.5`
8
+ - SDK version: `2.0.5`
9
9
 
10
10
  ## About the API<a id="about-the-api"></a>
11
11
 
@@ -31,7 +31,7 @@ Useful links: [Homepage](https://www.celitech.com) | [Support email](mailto:supp
31
31
 
32
32
  ## Supported Language Versions<a id="supported-language-versions"></a>
33
33
 
34
- This SDK is compatible with the following versions: `Python >= 3.7`
34
+ This SDK is compatible with the following versions: `Python >= 3.9`
35
35
 
36
36
  ## Installation<a id="installation"></a>
37
37
 
@@ -1,11 +1,11 @@
1
- # Celitech Python SDK 2.0.2
1
+ # Celitech Python SDK 2.0.5
2
2
 
3
3
  Welcome to the Celitech SDK documentation. This guide will help you get started with integrating and using the Celitech SDK in your project.
4
4
 
5
5
  ## Versions
6
6
 
7
- - API version: `2.0.2`
8
- - SDK version: `2.0.2`
7
+ - API version: `2.0.5`
8
+ - SDK version: `2.0.5`
9
9
 
10
10
  ## About the API
11
11
 
@@ -32,7 +32,7 @@ Useful links: [Homepage](https://www.celitech.com) | [Support email](mailto:supp
32
32
 
33
33
  ## Supported Language Versions
34
34
 
35
- This SDK is compatible with the following versions: `Python >= 3.7`
35
+ This SDK is compatible with the following versions: `Python >= 3.9`
36
36
 
37
37
  ## Installation
38
38
 
@@ -4,7 +4,7 @@ build-backend = "setuptools.build_meta"
4
4
 
5
5
  [project]
6
6
  name = "celitech-sdk"
7
- version = "2.0.2"
7
+ version = "2.0.5"
8
8
  license = { text = "MIT" }
9
9
  description = """Welcome to the CELITECH API documentation!\n\nUseful links: [Homepage](https://www.celitech.com) | [Support email](mailto:support@celitech.com) | [Blog](https://www.celitech.com/blog/)\n"""
10
10
  readme = "PyPI_README.md"
@@ -0,0 +1,142 @@
1
+ """Lazy model exports.
2
+
3
+ Names are resolved on first attribute access via PEP 562 ``__getattr__``,
4
+ then cached in module globals. Avoids the multi-second eager-import cost
5
+ on SDKs with thousands of generated models.
6
+ """
7
+
8
+ import importlib
9
+
10
+ _MODEL_TO_MODULE = {
11
+ "ListDestinationsOkResponse": "list_destinations_ok_response",
12
+ "Destinations": "list_destinations_ok_response",
13
+ "ListPackagesOkResponse": "list_packages_ok_response",
14
+ "Packages": "list_packages_ok_response",
15
+ "CreatePurchaseV2Request": "create_purchase_v2_request",
16
+ "CreatePurchaseV2RequestLanguage": "create_purchase_v2_request",
17
+ "CreatePurchaseV2OkResponse": "create_purchase_v2_ok_response",
18
+ "CreatePurchaseV2OkResponsePurchase": "create_purchase_v2_ok_response",
19
+ "CreatePurchaseV2OkResponseProfile": "create_purchase_v2_ok_response",
20
+ "ListPurchasesOkResponse": "list_purchases_ok_response",
21
+ "Purchases": "list_purchases_ok_response",
22
+ "CreatePurchaseRequest": "create_purchase_request",
23
+ "CreatePurchaseRequestLanguage": "create_purchase_request",
24
+ "CreatePurchaseOkResponse": "create_purchase_ok_response",
25
+ "CreatePurchaseOkResponsePurchase": "create_purchase_ok_response",
26
+ "CreatePurchaseOkResponseProfile": "create_purchase_ok_response",
27
+ "TopUpEsimRequest": "top_up_esim_request",
28
+ "TopUpEsimOkResponse": "top_up_esim_ok_response",
29
+ "TopUpEsimOkResponsePurchase": "top_up_esim_ok_response",
30
+ "TopUpEsimOkResponseProfile": "top_up_esim_ok_response",
31
+ "EditPurchaseRequest": "edit_purchase_request",
32
+ "EditPurchaseOkResponse": "edit_purchase_ok_response",
33
+ "GetPurchaseConsumptionOkResponse": "get_purchase_consumption_ok_response",
34
+ "GetEsimOkResponse": "get_esim_ok_response",
35
+ "GetEsimOkResponseEsim": "get_esim_ok_response",
36
+ "GetEsimDeviceOkResponse": "get_esim_device_ok_response",
37
+ "Device": "get_esim_device_ok_response",
38
+ "GetEsimHistoryOkResponse": "get_esim_history_ok_response",
39
+ "GetEsimHistoryOkResponseEsim": "get_esim_history_ok_response",
40
+ "TokenOkResponse": "token_ok_response",
41
+ "OAuthTokenRequest": "o_auth_token_request",
42
+ "OAuthTokenResponse": "o_auth_token_response",
43
+ "GrantType": "grant_type",
44
+ "BadRequest": "bad_request",
45
+ "Unauthorized": "unauthorized",
46
+ }
47
+
48
+ _REBUILD_NAMES = frozenset(
49
+ {
50
+ "ListDestinationsOkResponse",
51
+ "Destinations",
52
+ "ListPackagesOkResponse",
53
+ "Packages",
54
+ "CreatePurchaseV2Request",
55
+ "CreatePurchaseV2OkResponse",
56
+ "CreatePurchaseV2OkResponsePurchase",
57
+ "CreatePurchaseV2OkResponseProfile",
58
+ "ListPurchasesOkResponse",
59
+ "Purchases",
60
+ "CreatePurchaseRequest",
61
+ "CreatePurchaseOkResponse",
62
+ "CreatePurchaseOkResponsePurchase",
63
+ "CreatePurchaseOkResponseProfile",
64
+ "TopUpEsimRequest",
65
+ "TopUpEsimOkResponse",
66
+ "TopUpEsimOkResponsePurchase",
67
+ "TopUpEsimOkResponseProfile",
68
+ "EditPurchaseRequest",
69
+ "EditPurchaseOkResponse",
70
+ "GetPurchaseConsumptionOkResponse",
71
+ "GetEsimOkResponse",
72
+ "GetEsimOkResponseEsim",
73
+ "GetEsimDeviceOkResponse",
74
+ "Device",
75
+ "GetEsimHistoryOkResponse",
76
+ "GetEsimHistoryOkResponseEsim",
77
+ "TokenOkResponse",
78
+ "OAuthTokenRequest",
79
+ "OAuthTokenResponse",
80
+ }
81
+ )
82
+
83
+ __all__ = list(_MODEL_TO_MODULE.keys())
84
+
85
+ _rebuilt = False
86
+
87
+
88
+ def _load(name):
89
+ module = _MODEL_TO_MODULE.get(name)
90
+ if module is None:
91
+ return None
92
+ obj = getattr(importlib.import_module("." + module, __name__), name)
93
+ globals()[name] = obj
94
+ return obj
95
+
96
+
97
+ def _ensure_rebuilt():
98
+ """Resolve forward refs across every BaseModel in one batched pass.
99
+
100
+ Individual model files import their cross-references inside a
101
+ ``TYPE_CHECKING`` block, so at runtime each file's globals contain
102
+ only itself. ``model_rebuild()`` walks the call stack to find
103
+ forward-ref names — calling it from this module once every
104
+ BaseModel has been loaded into our globals is what lets pydantic
105
+ resolve circular refs (the same shape the prior eager-import form
106
+ relied on). Enums, Union types, and error models stay lazy.
107
+ """
108
+ global _rebuilt
109
+ if _rebuilt:
110
+ return
111
+ _rebuilt = True
112
+ for name in _REBUILD_NAMES:
113
+ if name not in globals():
114
+ try:
115
+ _load(name)
116
+ except Exception:
117
+ pass
118
+ ns = globals()
119
+ for name in _REBUILD_NAMES:
120
+ cls = ns.get(name)
121
+ if cls is None:
122
+ continue
123
+ try:
124
+ # _types_namespace is mandatory: pydantic resolves forward refs
125
+ # against caller-frame locals by default, but we're calling from
126
+ # inside a helper — the names live in this module's globals.
127
+ cls.model_rebuild(_types_namespace=ns)
128
+ except Exception:
129
+ pass
130
+
131
+
132
+ def __getattr__(name):
133
+ if name not in _MODEL_TO_MODULE:
134
+ raise AttributeError(f"module {__name__!r} has no attribute {name!r}")
135
+ obj = _load(name)
136
+ if name in _REBUILD_NAMES:
137
+ _ensure_rebuilt()
138
+ return obj
139
+
140
+
141
+ def __dir__():
142
+ return sorted(set(globals()).union(_MODEL_TO_MODULE))
@@ -1,5 +1,7 @@
1
+ from __future__ import annotations
1
2
  from pydantic import Field
2
3
  from typing import Optional
4
+ from typing import Any
3
5
  from .utils.base_error import BaseError
4
6
  from .utils.base_model import BaseModel
5
7
 
@@ -1,5 +1,7 @@
1
+ from __future__ import annotations
1
2
  from pydantic import Field
2
3
  from typing import Optional
4
+ from typing import Any
3
5
  from typing import Union
4
6
  from .utils.base_model import BaseModel
5
7
 
@@ -1,6 +1,8 @@
1
+ from __future__ import annotations
1
2
  from enum import Enum
2
3
  from pydantic import Field
3
4
  from typing import Optional
5
+ from typing import Any
4
6
  from .utils.base_model import BaseModel
5
7
 
6
8
 
@@ -42,7 +44,7 @@ class CreatePurchaseRequest(BaseModel):
42
44
 
43
45
  :param destination: ISO representation of the package's destination. Supports both ISO2 (e.g., 'FR') and ISO3 (e.g., 'FRA') country codes.
44
46
  :type destination: str
45
- :param data_limit_in_gb: Size of the package in GB. The available options are 0.5, 1, 2, 3, 5, 8, 20, 50GB
47
+ :param data_limit_in_gb: Size of the package in GB. The available options are 0.5, 1, 2, 3, 5, 8, 20, 50GB. Use `-1` to purchase an unlimited (date-based) package — provide `startDate`/`endDate` spanning 3 to 30 days.
46
48
  :type data_limit_in_gb: float
47
49
  :param start_date: Start date of the package's validity in the format 'yyyy-MM-dd'. This date can be set to the current day or any day within the next 12 months.
48
50
  :type start_date: str
@@ -70,7 +72,7 @@ class CreatePurchaseRequest(BaseModel):
70
72
  data_limit_in_gb: float = Field(
71
73
  alias="dataLimitInGB",
72
74
  serialization_alias="dataLimitInGB",
73
- description="Size of the package in GB. The available options are 0.5, 1, 2, 3, 5, 8, 20, 50GB",
75
+ description="Size of the package in GB. The available options are 0.5, 1, 2, 3, 5, 8, 20, 50GB. Use `-1` to purchase an unlimited (date-based) package — provide `startDate`/`endDate` spanning 3 to 30 days.",
74
76
  )
75
77
  start_date: str = Field(
76
78
  alias="startDate",
@@ -1,5 +1,7 @@
1
+ from __future__ import annotations
1
2
  from pydantic import Field
2
3
  from typing import Optional
4
+ from typing import Any
3
5
  from .utils.base_model import BaseModel
4
6
 
5
7
 
@@ -1,6 +1,8 @@
1
+ from __future__ import annotations
1
2
  from enum import Enum
2
3
  from pydantic import Field
3
4
  from typing import Optional
5
+ from typing import Any
4
6
  from .utils.base_model import BaseModel
5
7
 
6
8
 
@@ -44,13 +46,13 @@ class CreatePurchaseV2Request(BaseModel):
44
46
 
45
47
  :param destination: ISO representation of the package's destination. Supports both ISO2 (e.g., 'FR') and ISO3 (e.g., 'FRA') country codes.
46
48
  :type destination: str
47
- :param data_limit_in_gb: Size of the package in GB. The available options are 0.5, 1, 2, 3, 5, 8, 20, 50GB
49
+ :param data_limit_in_gb: Size of the package in GB. The available options are 0.5, 1, 2, 3, 5, 8, 20, 50GB. Use `-1` to purchase an unlimited (date-based) package — provide `startDate`/`endDate` spanning 3 to 30 days (`duration` is not supported for unlimited packages).
48
50
  :type data_limit_in_gb: float
49
51
  :param start_date: Start date of the package's validity in the format 'yyyy-MM-dd'. This date can be set to the current day or any day within the next 12 months., defaults to None
50
52
  :type start_date: str, optional
51
53
  :param end_date: End date of the package's validity in the format 'yyyy-MM-dd'. End date can be maximum 90 days after Start date., defaults to None
52
54
  :type end_date: str, optional
53
- :param duration: Duration of the package in days. Available values are 1, 2, 7, 14, 30, or 90. Either provide startDate/endDate or duration., defaults to None
55
+ :param duration: Duration of the package in days. Available values are 1, 2, 7, 14, 30, or 90. Either provide startDate/endDate or duration. Not supported for unlimited packages (`dataLimitInGB` = -1), which are date-based — provide startDate/endDate instead., defaults to None
54
56
  :type duration: float, optional
55
57
  :param quantity: Number of eSIMs to purchase.
56
58
  :type quantity: float
@@ -72,7 +74,7 @@ class CreatePurchaseV2Request(BaseModel):
72
74
  data_limit_in_gb: float = Field(
73
75
  alias="dataLimitInGB",
74
76
  serialization_alias="dataLimitInGB",
75
- description="Size of the package in GB. The available options are 0.5, 1, 2, 3, 5, 8, 20, 50GB",
77
+ description="Size of the package in GB. The available options are 0.5, 1, 2, 3, 5, 8, 20, 50GB. Use `-1` to purchase an unlimited (date-based) package — provide `startDate`/`endDate` spanning 3 to 30 days (`duration` is not supported for unlimited packages).",
76
78
  )
77
79
  start_date: Optional[str] = Field(
78
80
  alias="startDate",
@@ -88,7 +90,7 @@ class CreatePurchaseV2Request(BaseModel):
88
90
  )
89
91
  duration: Optional[float] = Field(
90
92
  default=None,
91
- description="Duration of the package in days. Available values are 1, 2, 7, 14, 30, or 90. Either provide startDate/endDate or duration.",
93
+ description="Duration of the package in days. Available values are 1, 2, 7, 14, 30, or 90. Either provide startDate/endDate or duration. Not supported for unlimited packages (`dataLimitInGB` = -1), which are date-based — provide startDate/endDate instead.",
92
94
  )
93
95
  quantity: float = Field(description="Number of eSIMs to purchase.", ge=1, le=5)
94
96
  email: Optional[str] = Field(
@@ -1,5 +1,7 @@
1
+ from __future__ import annotations
1
2
  from pydantic import Field
2
3
  from typing import Optional
4
+ from typing import Any
3
5
  from typing import Union
4
6
  from .utils.base_model import BaseModel
5
7
 
@@ -1,5 +1,7 @@
1
+ from __future__ import annotations
1
2
  from pydantic import Field
2
3
  from typing import Optional
4
+ from typing import Any
3
5
  from .utils.base_model import BaseModel
4
6
 
5
7
 
@@ -1,5 +1,7 @@
1
+ from __future__ import annotations
1
2
  from pydantic import Field
2
3
  from typing import Optional
4
+ from typing import Any
3
5
  from .utils.base_model import BaseModel
4
6
 
5
7
 
@@ -1,6 +1,8 @@
1
+ from __future__ import annotations
1
2
  from typing import List
2
3
  from pydantic import Field
3
4
  from typing import Optional
5
+ from typing import Any
4
6
  from .utils.base_model import BaseModel
5
7
 
6
8
 
@@ -1,5 +1,7 @@
1
+ from __future__ import annotations
1
2
  from pydantic import Field
2
3
  from typing import Optional
4
+ from typing import Any
3
5
  from .utils.base_model import BaseModel
4
6
 
5
7
 
@@ -1,14 +1,16 @@
1
+ from __future__ import annotations
1
2
  from pydantic import Field
2
3
  from typing import Optional
4
+ from typing import Any
3
5
  from .utils.base_model import BaseModel
4
6
 
5
7
 
6
8
  class GetPurchaseConsumptionOkResponse(BaseModel):
7
9
  """GetPurchaseConsumptionOkResponse
8
10
 
9
- :param data_usage_remaining_in_bytes: Remaining balance of the package in bytes
11
+ :param data_usage_remaining_in_bytes: Remaining balance of the package in bytes. Returns `-1` for unlimited packages.
10
12
  :type data_usage_remaining_in_bytes: float
11
- :param data_usage_remaining_in_gb: Remaining balance of the package in GB
13
+ :param data_usage_remaining_in_gb: Remaining balance of the package in GB. Returns `-1` for unlimited packages.
12
14
  :type data_usage_remaining_in_gb: float
13
15
  :param status: Status of the connectivity, possible values are 'ACTIVE' or 'NOT_ACTIVE'
14
16
  :type status: str
@@ -17,12 +19,12 @@ class GetPurchaseConsumptionOkResponse(BaseModel):
17
19
  data_usage_remaining_in_bytes: float = Field(
18
20
  alias="dataUsageRemainingInBytes",
19
21
  serialization_alias="dataUsageRemainingInBytes",
20
- description="Remaining balance of the package in bytes",
22
+ description="Remaining balance of the package in bytes. Returns `-1` for unlimited packages.",
21
23
  )
22
24
  data_usage_remaining_in_gb: float = Field(
23
25
  alias="dataUsageRemainingInGB",
24
26
  serialization_alias="dataUsageRemainingInGB",
25
- description="Remaining balance of the package in GB",
27
+ description="Remaining balance of the package in GB. Returns `-1` for unlimited packages.",
26
28
  )
27
29
  status: str = Field(
28
30
  description="Status of the connectivity, possible values are 'ACTIVE' or 'NOT_ACTIVE'"
@@ -1,4 +1,6 @@
1
+ from __future__ import annotations
1
2
  from enum import Enum
3
+ from typing import Any
2
4
 
3
5
 
4
6
  class GrantType(str, Enum):
@@ -1,6 +1,8 @@
1
+ from __future__ import annotations
1
2
  from typing import List
2
3
  from pydantic import Field
3
4
  from typing import Optional
5
+ from typing import Any
4
6
  from .utils.base_model import BaseModel
5
7
 
6
8
 
@@ -1,6 +1,8 @@
1
+ from __future__ import annotations
1
2
  from typing import List
2
3
  from pydantic import Field
3
4
  from typing import Optional
5
+ from typing import Any
4
6
  from typing import Union
5
7
  from .utils.base_model import BaseModel
6
8
 
@@ -14,9 +16,9 @@ class Packages(BaseModel):
14
16
  :type destination: str
15
17
  :param destination_iso2: ISO2 representation of the package's destination.
16
18
  :type destination_iso2: str
17
- :param data_limit_in_bytes: Size of the package in Bytes
19
+ :param data_limit_in_bytes: Size of the package in Bytes. A value of `-1` indicates an unlimited package.
18
20
  :type data_limit_in_bytes: float
19
- :param data_limit_in_gb: Size of the package in GB
21
+ :param data_limit_in_gb: Size of the package in GB. A value of `-1` indicates an unlimited (date-based) package.
20
22
  :type data_limit_in_gb: float
21
23
  :param min_days: Min number of days for the package
22
24
  :type min_days: float
@@ -40,12 +42,12 @@ class Packages(BaseModel):
40
42
  data_limit_in_bytes: float = Field(
41
43
  alias="dataLimitInBytes",
42
44
  serialization_alias="dataLimitInBytes",
43
- description="Size of the package in Bytes",
45
+ description="Size of the package in Bytes. A value of `-1` indicates an unlimited package.",
44
46
  )
45
47
  data_limit_in_gb: float = Field(
46
48
  alias="dataLimitInGB",
47
49
  serialization_alias="dataLimitInGB",
48
- description="Size of the package in GB",
50
+ description="Size of the package in GB. A value of `-1` indicates an unlimited (date-based) package.",
49
51
  )
50
52
  min_days: float = Field(
51
53
  alias="minDays",
@@ -1,6 +1,8 @@
1
+ from __future__ import annotations
1
2
  from typing import List
2
3
  from pydantic import Field
3
4
  from typing import Optional
5
+ from typing import Any
4
6
  from typing import Union
5
7
  from .utils.base_model import BaseModel
6
8
 
@@ -10,9 +12,9 @@ class Package(BaseModel):
10
12
 
11
13
  :param id_: ID of the package
12
14
  :type id_: str
13
- :param data_limit_in_bytes: Size of the package in Bytes
15
+ :param data_limit_in_bytes: Size of the package in Bytes. A value of `-1` indicates an unlimited package.
14
16
  :type data_limit_in_bytes: float
15
- :param data_limit_in_gb: Size of the package in GB
17
+ :param data_limit_in_gb: Size of the package in GB. A value of `-1` indicates an unlimited (date-based) package.
16
18
  :type data_limit_in_gb: float
17
19
  :param destination: ISO3 representation of the package's destination.
18
20
  :type destination: str
@@ -30,12 +32,12 @@ class Package(BaseModel):
30
32
  data_limit_in_bytes: float = Field(
31
33
  alias="dataLimitInBytes",
32
34
  serialization_alias="dataLimitInBytes",
33
- description="Size of the package in Bytes",
35
+ description="Size of the package in Bytes. A value of `-1` indicates an unlimited package.",
34
36
  )
35
37
  data_limit_in_gb: float = Field(
36
38
  alias="dataLimitInGB",
37
39
  serialization_alias="dataLimitInGB",
38
- description="Size of the package in GB",
40
+ description="Size of the package in GB. A value of `-1` indicates an unlimited (date-based) package.",
39
41
  )
40
42
  destination: str = Field(
41
43
  description="ISO3 representation of the package's destination."
@@ -76,7 +78,7 @@ class Purchases(BaseModel):
76
78
  :type start_date: str
77
79
  :param end_date: End date of the package's validity in the format 'yyyy-MM-ddThh:mm:ssZZ'
78
80
  :type end_date: str
79
- :param duration: Duration of the package in days. Possible values are 1, 2, 7, 14, 30, or 90., defaults to None
81
+ :param duration: Duration of the package in days. Possible values are 1, 2, 7, 14, 30, or 90. `null` for unlimited (date-based) packages., defaults to None
80
82
  :type duration: float, optional
81
83
  :param created_date: Creation date of the purchase in the format 'yyyy-MM-ddThh:mm:ssZZ'
82
84
  :type created_date: str
@@ -113,7 +115,7 @@ class Purchases(BaseModel):
113
115
  )
114
116
  duration: Optional[float] = Field(
115
117
  default=None,
116
- description="Duration of the package in days. Possible values are 1, 2, 7, 14, 30, or 90.",
118
+ description="Duration of the package in days. Possible values are 1, 2, 7, 14, 30, or 90. `null` for unlimited (date-based) packages.",
117
119
  )
118
120
  created_date: str = Field(
119
121
  alias="createdDate",
@@ -1,6 +1,7 @@
1
1
  from __future__ import annotations
2
2
  from pydantic import Field
3
3
  from typing import Optional
4
+ from typing import Any
4
5
  from .utils.base_model import BaseModel
5
6
  from .grant_type import GrantType
6
7
 
@@ -1,5 +1,7 @@
1
+ from __future__ import annotations
1
2
  from pydantic import Field
2
3
  from typing import Optional
4
+ from typing import Any
3
5
  from typing import Union
4
6
  from .utils.base_model import BaseModel
5
7
 
@@ -1,5 +1,7 @@
1
+ from __future__ import annotations
1
2
  from pydantic import Field
2
3
  from typing import Optional
4
+ from typing import Any
3
5
  from .utils.base_model import BaseModel
4
6
 
5
7
 
@@ -1,5 +1,7 @@
1
+ from __future__ import annotations
1
2
  from pydantic import Field
2
3
  from typing import Optional
4
+ from typing import Any
3
5
  from typing import Union
4
6
  from .utils.base_model import BaseModel
5
7
 
@@ -1,5 +1,7 @@
1
+ from __future__ import annotations
1
2
  from pydantic import Field
2
3
  from typing import Optional
4
+ from typing import Any
3
5
  from .utils.base_model import BaseModel
4
6
 
5
7
 
@@ -8,13 +10,13 @@ class TopUpEsimRequest(BaseModel):
8
10
 
9
11
  :param iccid: ID of the eSIM
10
12
  :type iccid: str
11
- :param data_limit_in_gb: Size of the package in GB. The available options are 0.5, 1, 2, 3, 5, 8, 20, 50GB
13
+ :param data_limit_in_gb: Size of the package in GB. The available options are 0.5, 1, 2, 3, 5, 8, 20, 50GB. Use `-1` to top up with an unlimited (date-based) package — provide `startDate`/`endDate` spanning 3 to 30 days (`duration` is not supported for unlimited packages).
12
14
  :type data_limit_in_gb: float
13
15
  :param start_date: Start date of the package's validity in the format 'yyyy-MM-dd'. This date can be set to the current day or any day within the next 12 months., defaults to None
14
16
  :type start_date: str, optional
15
17
  :param end_date: End date of the package's validity in the format 'yyyy-MM-dd'. End date can be maximum 90 days after Start date., defaults to None
16
18
  :type end_date: str, optional
17
- :param duration: Duration of the package in days. Available values are 1, 2, 7, 14, 30, or 90. Either provide startDate/endDate or duration., defaults to None
19
+ :param duration: Duration of the package in days. Available values are 1, 2, 7, 14, 30, or 90. Either provide startDate/endDate or duration. Not supported for unlimited packages (`dataLimitInGB` = -1), which are date-based — provide startDate/endDate instead., defaults to None
18
20
  :type duration: float, optional
19
21
  :param email: Email address where the purchase confirmation email will be sent (excluding QR Code & activation steps)., defaults to None
20
22
  :type email: str, optional
@@ -32,7 +34,7 @@ class TopUpEsimRequest(BaseModel):
32
34
  data_limit_in_gb: float = Field(
33
35
  alias="dataLimitInGB",
34
36
  serialization_alias="dataLimitInGB",
35
- description="Size of the package in GB. The available options are 0.5, 1, 2, 3, 5, 8, 20, 50GB",
37
+ description="Size of the package in GB. The available options are 0.5, 1, 2, 3, 5, 8, 20, 50GB. Use `-1` to top up with an unlimited (date-based) package — provide `startDate`/`endDate` spanning 3 to 30 days (`duration` is not supported for unlimited packages).",
36
38
  )
37
39
  start_date: Optional[str] = Field(
38
40
  alias="startDate",
@@ -48,7 +50,7 @@ class TopUpEsimRequest(BaseModel):
48
50
  )
49
51
  duration: Optional[float] = Field(
50
52
  default=None,
51
- description="Duration of the package in days. Available values are 1, 2, 7, 14, 30, or 90. Either provide startDate/endDate or duration.",
53
+ description="Duration of the package in days. Available values are 1, 2, 7, 14, 30, or 90. Either provide startDate/endDate or duration. Not supported for unlimited packages (`dataLimitInGB` = -1), which are date-based — provide startDate/endDate instead.",
52
54
  )
53
55
  email: Optional[str] = Field(
54
56
  default=None,
@@ -1,5 +1,7 @@
1
+ from __future__ import annotations
1
2
  from pydantic import Field
2
3
  from typing import Optional
4
+ from typing import Any
3
5
  from .utils.base_error import BaseError
4
6
  from .utils.base_model import BaseModel
5
7
 
@@ -24,6 +24,14 @@ class BaseModel(PydanticBaseModel):
24
24
  populate_by_name=True,
25
25
  # Arbitrary types allowed (for flexibility with custom types)
26
26
  arbitrary_types_allowed=False,
27
+ # Validate `Field(pattern=...)` constraints with Python's `re` engine
28
+ # instead of Pydantic's default Rust `regex` engine. The Rust engine
29
+ # rejects ALL look-around (`(?=…)`, `(?!…)`, `(?<=…)`, `(?<!…)`) with
30
+ # `SchemaError: regex parse error … look-around … is not supported`,
31
+ # crashing model import. OpenAPI `pattern`s frequently use look-ahead;
32
+ # Python's `re` supports it. Patterns are already normalised for `re`
33
+ # compatibility by translateRegexForPython at generation time.
34
+ regex_engine="python-re",
27
35
  )
28
36
 
29
37
  def model_dump_original(self, **kwargs: Any) -> Dict[str, Any]: