celitech-sdk 1.3.63__tar.gz → 2.0.0__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.
- {celitech_sdk-1.3.63/src/celitech_sdk.egg-info → celitech_sdk-2.0.0}/PKG-INFO +10 -9
- {celitech_sdk-1.3.63 → celitech_sdk-2.0.0}/PyPI_README.md +7 -8
- {celitech_sdk-1.3.63 → celitech_sdk-2.0.0}/README.md +7 -8
- {celitech_sdk-1.3.63 → celitech_sdk-2.0.0}/pyproject.toml +6 -2
- celitech_sdk-2.0.0/src/celitech/models/__init__.py +75 -0
- celitech_sdk-2.0.0/src/celitech/models/bad_request.py +26 -0
- celitech_sdk-2.0.0/src/celitech/models/create_purchase_ok_response.py +99 -0
- celitech_sdk-2.0.0/src/celitech/models/create_purchase_request.py +122 -0
- celitech_sdk-2.0.0/src/celitech/models/create_purchase_v2_ok_response.py +82 -0
- celitech_sdk-2.0.0/src/celitech/models/create_purchase_v2_request.py +119 -0
- celitech_sdk-2.0.0/src/celitech/models/edit_purchase_ok_response.py +48 -0
- celitech_sdk-2.0.0/src/celitech/models/edit_purchase_request.py +47 -0
- celitech_sdk-2.0.0/src/celitech/models/get_esim_device_ok_response.py +40 -0
- celitech_sdk-2.0.0/src/celitech/models/get_esim_history_ok_response.py +54 -0
- celitech_sdk-2.0.0/src/celitech/models/get_esim_ok_response.py +65 -0
- celitech_sdk-2.0.0/src/celitech/models/get_purchase_consumption_ok_response.py +29 -0
- celitech_sdk-2.0.0/src/celitech/models/grant_type.py +20 -0
- celitech_sdk-2.0.0/src/celitech/models/list_destinations_ok_response.py +41 -0
- celitech_sdk-2.0.0/src/celitech/models/list_packages_ok_response.py +81 -0
- celitech_sdk-2.0.0/src/celitech/models/list_purchases_ok_response.py +173 -0
- celitech_sdk-2.0.0/src/celitech/models/o_auth_token_request.py +24 -0
- celitech_sdk-2.0.0/src/celitech/models/o_auth_token_response.py +17 -0
- celitech_sdk-2.0.0/src/celitech/models/token_ok_response.py +13 -0
- celitech_sdk-2.0.0/src/celitech/models/top_up_esim_ok_response.py +83 -0
- celitech_sdk-2.0.0/src/celitech/models/top_up_esim_request.py +80 -0
- celitech_sdk-2.0.0/src/celitech/models/unauthorized.py +26 -0
- celitech_sdk-2.0.0/src/celitech/models/utils/base_error.py +116 -0
- celitech_sdk-2.0.0/src/celitech/models/utils/base_model.py +120 -0
- {celitech_sdk-1.3.63 → celitech_sdk-2.0.0}/src/celitech/models/utils/cast_models.py +26 -3
- {celitech_sdk-1.3.63 → celitech_sdk-2.0.0}/src/celitech/net/oauth/token_manager.py +3 -3
- {celitech_sdk-1.3.63 → celitech_sdk-2.0.0}/src/celitech/net/request_chain/handlers/http_handler.py +41 -2
- celitech_sdk-2.0.0/src/celitech/net/request_chain/handlers/retry_handler.py +172 -0
- celitech_sdk-2.0.0/src/celitech/net/sdk_config.py +63 -0
- {celitech_sdk-1.3.63 → celitech_sdk-2.0.0}/src/celitech/net/transport/api_error.py +1 -2
- {celitech_sdk-1.3.63 → celitech_sdk-2.0.0}/src/celitech/net/transport/request.py +17 -1
- {celitech_sdk-1.3.63 → celitech_sdk-2.0.0}/src/celitech/net/transport/serializer.py +19 -4
- {celitech_sdk-1.3.63 → celitech_sdk-2.0.0}/src/celitech/net/transport/utils.py +11 -1
- {celitech_sdk-1.3.63 → celitech_sdk-2.0.0}/src/celitech/sdk.py +4 -2
- celitech_sdk-2.0.0/src/celitech/services/async_/destinations.py +16 -0
- celitech_sdk-2.0.0/src/celitech/services/async_/e_sim.py +30 -0
- celitech_sdk-2.0.0/src/celitech/services/async_/i_frame.py +16 -0
- celitech_sdk-2.0.0/src/celitech/services/async_/o_auth.py +21 -0
- {celitech_sdk-1.3.63 → celitech_sdk-2.0.0}/src/celitech/services/async_/packages.py +12 -2
- {celitech_sdk-1.3.63 → celitech_sdk-2.0.0}/src/celitech/services/async_/purchases.py +37 -11
- {celitech_sdk-1.3.63 → celitech_sdk-2.0.0}/src/celitech/services/destinations.py +28 -4
- {celitech_sdk-1.3.63 → celitech_sdk-2.0.0}/src/celitech/services/e_sim.py +72 -10
- {celitech_sdk-1.3.63 → celitech_sdk-2.0.0}/src/celitech/services/i_frame.py +24 -4
- celitech_sdk-2.0.0/src/celitech/services/o_auth.py +69 -0
- {celitech_sdk-1.3.63 → celitech_sdk-2.0.0}/src/celitech/services/packages.py +27 -3
- {celitech_sdk-1.3.63 → celitech_sdk-2.0.0}/src/celitech/services/purchases.py +142 -26
- {celitech_sdk-1.3.63 → celitech_sdk-2.0.0}/src/celitech/services/utils/base_service.py +75 -5
- {celitech_sdk-1.3.63 → celitech_sdk-2.0.0/src/celitech_sdk.egg-info}/PKG-INFO +10 -9
- {celitech_sdk-1.3.63 → celitech_sdk-2.0.0}/src/celitech_sdk.egg-info/SOURCES.txt +5 -5
- celitech_sdk-2.0.0/src/celitech_sdk.egg-info/requires.txt +2 -0
- celitech_sdk-1.3.63/src/celitech/hooks/hook.py +0 -106
- celitech_sdk-1.3.63/src/celitech/models/__init__.py +0 -35
- celitech_sdk-1.3.63/src/celitech/models/bad_request.py +0 -21
- celitech_sdk-1.3.63/src/celitech/models/create_purchase_ok_response.py +0 -139
- celitech_sdk-1.3.63/src/celitech/models/create_purchase_request.py +0 -96
- celitech_sdk-1.3.63/src/celitech/models/create_purchase_v2_ok_response.py +0 -121
- celitech_sdk-1.3.63/src/celitech/models/create_purchase_v2_request.py +0 -94
- celitech_sdk-1.3.63/src/celitech/models/edit_purchase_ok_response.py +0 -66
- celitech_sdk-1.3.63/src/celitech/models/edit_purchase_request.py +0 -57
- celitech_sdk-1.3.63/src/celitech/models/get_access_token_ok_response.py +0 -39
- celitech_sdk-1.3.63/src/celitech/models/get_access_token_request.py +0 -60
- celitech_sdk-1.3.63/src/celitech/models/get_esim_device_ok_response.py +0 -55
- celitech_sdk-1.3.63/src/celitech/models/get_esim_history_ok_response.py +0 -75
- celitech_sdk-1.3.63/src/celitech/models/get_esim_ok_response.py +0 -92
- celitech_sdk-1.3.63/src/celitech/models/get_purchase_consumption_ok_response.py +0 -45
- celitech_sdk-1.3.63/src/celitech/models/list_destinations_ok_response.py +0 -63
- celitech_sdk-1.3.63/src/celitech/models/list_packages_ok_response.py +0 -109
- celitech_sdk-1.3.63/src/celitech/models/list_purchases_ok_response.py +0 -229
- celitech_sdk-1.3.63/src/celitech/models/token_ok_response.py +0 -20
- celitech_sdk-1.3.63/src/celitech/models/top_up_esim_ok_response.py +0 -118
- celitech_sdk-1.3.63/src/celitech/models/top_up_esim_request.py +0 -93
- celitech_sdk-1.3.63/src/celitech/models/unauthorized.py +0 -21
- celitech_sdk-1.3.63/src/celitech/models/utils/base_model.py +0 -335
- celitech_sdk-1.3.63/src/celitech/net/request_chain/handlers/hook_handler.py +0 -71
- celitech_sdk-1.3.63/src/celitech/net/request_chain/handlers/retry_handler.py +0 -101
- celitech_sdk-1.3.63/src/celitech/services/async_/destinations.py +0 -13
- celitech_sdk-1.3.63/src/celitech/services/async_/e_sim.py +0 -23
- celitech_sdk-1.3.63/src/celitech/services/async_/i_frame.py +0 -13
- celitech_sdk-1.3.63/src/celitech/services/async_/o_auth.py +0 -15
- celitech_sdk-1.3.63/src/celitech/services/o_auth.py +0 -43
- celitech_sdk-1.3.63/src/celitech/services/utils/__init__.py +0 -0
- celitech_sdk-1.3.63/src/celitech_sdk.egg-info/requires.txt +0 -1
- {celitech_sdk-1.3.63 → celitech_sdk-2.0.0}/LICENSE +0 -0
- {celitech_sdk-1.3.63 → celitech_sdk-2.0.0}/setup.cfg +0 -0
- {celitech_sdk-1.3.63 → celitech_sdk-2.0.0}/src/celitech/__init__.py +0 -0
- {celitech_sdk-1.3.63/src/celitech/hooks → celitech_sdk-2.0.0/src/celitech/models/utils}/__init__.py +0 -0
- {celitech_sdk-1.3.63 → celitech_sdk-2.0.0}/src/celitech/models/utils/json_map.py +0 -0
- {celitech_sdk-1.3.63 → celitech_sdk-2.0.0}/src/celitech/models/utils/one_of_base_model.py +0 -0
- {celitech_sdk-1.3.63 → celitech_sdk-2.0.0}/src/celitech/models/utils/sentinel.py +0 -0
- {celitech_sdk-1.3.63/src/celitech/models/utils → celitech_sdk-2.0.0/src/celitech/net}/__init__.py +0 -0
- {celitech_sdk-1.3.63 → celitech_sdk-2.0.0}/src/celitech/net/environment/__init__.py +0 -0
- {celitech_sdk-1.3.63 → celitech_sdk-2.0.0}/src/celitech/net/environment/environment.py +0 -0
- {celitech_sdk-1.3.63/src/celitech/net → celitech_sdk-2.0.0/src/celitech/net/headers}/__init__.py +0 -0
- {celitech_sdk-1.3.63 → celitech_sdk-2.0.0}/src/celitech/net/headers/base_header.py +0 -0
- {celitech_sdk-1.3.63/src/celitech/net/headers → celitech_sdk-2.0.0/src/celitech/net/request_chain}/__init__.py +0 -0
- {celitech_sdk-1.3.63/src/celitech/net/request_chain → celitech_sdk-2.0.0/src/celitech/net/request_chain/handlers}/__init__.py +0 -0
- {celitech_sdk-1.3.63 → celitech_sdk-2.0.0}/src/celitech/net/request_chain/handlers/base_handler.py +0 -0
- {celitech_sdk-1.3.63 → celitech_sdk-2.0.0}/src/celitech/net/request_chain/handlers/oauth_handler.py +0 -0
- {celitech_sdk-1.3.63 → celitech_sdk-2.0.0}/src/celitech/net/request_chain/request_chain.py +0 -0
- {celitech_sdk-1.3.63/src/celitech/net/request_chain/handlers → celitech_sdk-2.0.0/src/celitech/net/transport}/__init__.py +0 -0
- {celitech_sdk-1.3.63 → celitech_sdk-2.0.0}/src/celitech/net/transport/request_error.py +0 -0
- {celitech_sdk-1.3.63 → celitech_sdk-2.0.0}/src/celitech/net/transport/response.py +0 -0
- {celitech_sdk-1.3.63 → celitech_sdk-2.0.0}/src/celitech/sdk_async.py +4 -4
- {celitech_sdk-1.3.63/src/celitech/net/transport → celitech_sdk-2.0.0/src/celitech/services}/__init__.py +0 -0
- {celitech_sdk-1.3.63/src/celitech/services → celitech_sdk-2.0.0/src/celitech/services/async_}/__init__.py +0 -0
- {celitech_sdk-1.3.63/src/celitech/services/async_ → celitech_sdk-2.0.0/src/celitech/services/async_/utils}/__init__.py +0 -0
- {celitech_sdk-1.3.63 → celitech_sdk-2.0.0}/src/celitech/services/async_/utils/to_async.py +0 -0
- {celitech_sdk-1.3.63/src/celitech/services/async_ → celitech_sdk-2.0.0/src/celitech/services}/utils/__init__.py +0 -0
- {celitech_sdk-1.3.63 → celitech_sdk-2.0.0}/src/celitech/services/utils/default_headers.py +0 -0
- {celitech_sdk-1.3.63 → celitech_sdk-2.0.0}/src/celitech/services/utils/validator.py +0 -0
- {celitech_sdk-1.3.63 → celitech_sdk-2.0.0}/src/celitech_sdk.egg-info/dependency_links.txt +0 -0
- {celitech_sdk-1.3.63 → celitech_sdk-2.0.0}/src/celitech_sdk.egg-info/top_level.txt +0 -0
|
@@ -1,24 +1,24 @@
|
|
|
1
1
|
Metadata-Version: 2.4
|
|
2
2
|
Name: celitech-sdk
|
|
3
|
-
Version:
|
|
3
|
+
Version: 2.0.0
|
|
4
4
|
Summary: Welcome to the CELITECH API documentation!
|
|
5
5
|
License: MIT
|
|
6
|
+
Project-URL: Repository, https://github.com/Celitech/CelitechSDKPython
|
|
6
7
|
Requires-Python: >=3.9
|
|
7
8
|
Description-Content-Type: text/markdown
|
|
8
9
|
License-File: LICENSE
|
|
9
10
|
Requires-Dist: requests>=2.31.0
|
|
11
|
+
Requires-Dist: pydantic<3.0.0,>=2.0.0
|
|
10
12
|
Dynamic: license-file
|
|
11
13
|
|
|
12
|
-
# Celitech Python SDK
|
|
14
|
+
# Celitech Python SDK 2.0.0<a id="celitech-python-sdk-200"></a>
|
|
13
15
|
|
|
14
16
|
Welcome to the Celitech SDK documentation. This guide will help you get started with integrating and using the Celitech SDK in your project.
|
|
15
17
|
|
|
16
|
-
[](https://liblab.com/?utm_source=readme)
|
|
17
|
-
|
|
18
18
|
## Versions<a id="versions"></a>
|
|
19
19
|
|
|
20
|
-
- API version: `
|
|
21
|
-
- SDK version: `
|
|
20
|
+
- API version: `2.0.0`
|
|
21
|
+
- SDK version: `2.0.0`
|
|
22
22
|
|
|
23
23
|
## About the API<a id="about-the-api"></a>
|
|
24
24
|
|
|
@@ -64,9 +64,9 @@ pip3 install celitech-sdk
|
|
|
64
64
|
|
|
65
65
|
### OAuth Authentication<a id="oauth-authentication"></a>
|
|
66
66
|
|
|
67
|
-
The Celitech API uses OAuth for authentication.
|
|
67
|
+
The Celitech API uses OAuth 2.0 for authentication.
|
|
68
68
|
|
|
69
|
-
You need to provide
|
|
69
|
+
You need to provide your OAuth credentials when initializing the SDK. Tokens are automatically fetched, cached, and refreshed — you do not need to manage them yourself.
|
|
70
70
|
|
|
71
71
|
```py
|
|
72
72
|
sdk = Celitech(
|
|
@@ -75,7 +75,7 @@ sdk = Celitech(
|
|
|
75
75
|
)
|
|
76
76
|
```
|
|
77
77
|
|
|
78
|
-
If you need to set or update the OAuth
|
|
78
|
+
If you need to set or update the OAuth credentials after the SDK initialization, you can use:
|
|
79
79
|
|
|
80
80
|
```py
|
|
81
81
|
sdk.set_client_id("CLIENT_ID")
|
|
@@ -186,6 +186,7 @@ The SDK includes several models that represent the data structures used in API r
|
|
|
186
186
|
| GetEsimDeviceOkResponse | |
|
|
187
187
|
| GetEsimHistoryOkResponse | |
|
|
188
188
|
| TokenOkResponse | |
|
|
189
|
+
| GrantType | |
|
|
189
190
|
| BadRequest | |
|
|
190
191
|
| Unauthorized | |
|
|
191
192
|
|
|
@@ -1,13 +1,11 @@
|
|
|
1
|
-
# Celitech Python SDK
|
|
1
|
+
# Celitech Python SDK 2.0.0<a id="celitech-python-sdk-200"></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
|
-
[](https://liblab.com/?utm_source=readme)
|
|
6
|
-
|
|
7
5
|
## Versions<a id="versions"></a>
|
|
8
6
|
|
|
9
|
-
- API version: `
|
|
10
|
-
- SDK version: `
|
|
7
|
+
- API version: `2.0.0`
|
|
8
|
+
- SDK version: `2.0.0`
|
|
11
9
|
|
|
12
10
|
## About the API<a id="about-the-api"></a>
|
|
13
11
|
|
|
@@ -53,9 +51,9 @@ pip3 install celitech-sdk
|
|
|
53
51
|
|
|
54
52
|
### OAuth Authentication<a id="oauth-authentication"></a>
|
|
55
53
|
|
|
56
|
-
The Celitech API uses OAuth for authentication.
|
|
54
|
+
The Celitech API uses OAuth 2.0 for authentication.
|
|
57
55
|
|
|
58
|
-
You need to provide
|
|
56
|
+
You need to provide your OAuth credentials when initializing the SDK. Tokens are automatically fetched, cached, and refreshed — you do not need to manage them yourself.
|
|
59
57
|
|
|
60
58
|
```py
|
|
61
59
|
sdk = Celitech(
|
|
@@ -64,7 +62,7 @@ sdk = Celitech(
|
|
|
64
62
|
)
|
|
65
63
|
```
|
|
66
64
|
|
|
67
|
-
If you need to set or update the OAuth
|
|
65
|
+
If you need to set or update the OAuth credentials after the SDK initialization, you can use:
|
|
68
66
|
|
|
69
67
|
```py
|
|
70
68
|
sdk.set_client_id("CLIENT_ID")
|
|
@@ -175,6 +173,7 @@ The SDK includes several models that represent the data structures used in API r
|
|
|
175
173
|
| GetEsimDeviceOkResponse | |
|
|
176
174
|
| GetEsimHistoryOkResponse | |
|
|
177
175
|
| TokenOkResponse | |
|
|
176
|
+
| GrantType | |
|
|
178
177
|
| BadRequest | |
|
|
179
178
|
| Unauthorized | |
|
|
180
179
|
|
|
@@ -1,13 +1,11 @@
|
|
|
1
|
-
# Celitech Python SDK
|
|
1
|
+
# Celitech Python SDK 2.0.0
|
|
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
|
-
[](https://liblab.com/?utm_source=readme)
|
|
6
|
-
|
|
7
5
|
## Versions
|
|
8
6
|
|
|
9
|
-
- API version: `
|
|
10
|
-
- SDK version: `
|
|
7
|
+
- API version: `2.0.0`
|
|
8
|
+
- SDK version: `2.0.0`
|
|
11
9
|
|
|
12
10
|
## About the API
|
|
13
11
|
|
|
@@ -54,9 +52,9 @@ pip3 install celitech-sdk
|
|
|
54
52
|
|
|
55
53
|
### OAuth Authentication
|
|
56
54
|
|
|
57
|
-
The Celitech API uses OAuth for authentication.
|
|
55
|
+
The Celitech API uses OAuth 2.0 for authentication.
|
|
58
56
|
|
|
59
|
-
You need to provide
|
|
57
|
+
You need to provide your OAuth credentials when initializing the SDK. Tokens are automatically fetched, cached, and refreshed — you do not need to manage them yourself.
|
|
60
58
|
|
|
61
59
|
```py
|
|
62
60
|
sdk = Celitech(
|
|
@@ -65,7 +63,7 @@ sdk = Celitech(
|
|
|
65
63
|
)
|
|
66
64
|
```
|
|
67
65
|
|
|
68
|
-
If you need to set or update the OAuth
|
|
66
|
+
If you need to set or update the OAuth credentials after the SDK initialization, you can use:
|
|
69
67
|
|
|
70
68
|
```py
|
|
71
69
|
sdk.set_client_id("CLIENT_ID")
|
|
@@ -176,6 +174,7 @@ The SDK includes several models that represent the data structures used in API r
|
|
|
176
174
|
| [GetEsimDeviceOkResponse](documentation/models/GetEsimDeviceOkResponse.md) | |
|
|
177
175
|
| [GetEsimHistoryOkResponse](documentation/models/GetEsimHistoryOkResponse.md) | |
|
|
178
176
|
| [TokenOkResponse](documentation/models/TokenOkResponse.md) | |
|
|
177
|
+
| [GrantType](documentation/models/GrantType.md) | |
|
|
179
178
|
| [BadRequest](documentation/models/BadRequest.md) | |
|
|
180
179
|
| [Unauthorized](documentation/models/Unauthorized.md) | |
|
|
181
180
|
|
|
@@ -4,11 +4,15 @@ build-backend = "setuptools.build_meta"
|
|
|
4
4
|
|
|
5
5
|
[project]
|
|
6
6
|
name = "celitech-sdk"
|
|
7
|
-
version = "
|
|
7
|
+
version = "2.0.0"
|
|
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"
|
|
11
11
|
requires-python = ">=3.9"
|
|
12
12
|
dependencies = [
|
|
13
|
-
"requests>=2.31.0"
|
|
13
|
+
"requests>=2.31.0",
|
|
14
|
+
"pydantic>=2.0.0,<3.0.0"
|
|
14
15
|
]
|
|
16
|
+
|
|
17
|
+
[project.urls]
|
|
18
|
+
Repository = "https://github.com/Celitech/CelitechSDKPython"
|
|
@@ -0,0 +1,75 @@
|
|
|
1
|
+
from .list_destinations_ok_response import ListDestinationsOkResponse, Destinations
|
|
2
|
+
from .list_packages_ok_response import ListPackagesOkResponse, Packages
|
|
3
|
+
from .create_purchase_v2_request import (
|
|
4
|
+
CreatePurchaseV2Request,
|
|
5
|
+
CreatePurchaseV2RequestLanguage,
|
|
6
|
+
)
|
|
7
|
+
from .create_purchase_v2_ok_response import (
|
|
8
|
+
CreatePurchaseV2OkResponse,
|
|
9
|
+
CreatePurchaseV2OkResponsePurchase,
|
|
10
|
+
CreatePurchaseV2OkResponseProfile,
|
|
11
|
+
)
|
|
12
|
+
from .list_purchases_ok_response import ListPurchasesOkResponse, Purchases
|
|
13
|
+
from .create_purchase_request import (
|
|
14
|
+
CreatePurchaseRequest,
|
|
15
|
+
CreatePurchaseRequestLanguage,
|
|
16
|
+
)
|
|
17
|
+
from .create_purchase_ok_response import (
|
|
18
|
+
CreatePurchaseOkResponse,
|
|
19
|
+
CreatePurchaseOkResponsePurchase,
|
|
20
|
+
CreatePurchaseOkResponseProfile,
|
|
21
|
+
)
|
|
22
|
+
from .top_up_esim_request import TopUpEsimRequest
|
|
23
|
+
from .top_up_esim_ok_response import (
|
|
24
|
+
TopUpEsimOkResponse,
|
|
25
|
+
TopUpEsimOkResponsePurchase,
|
|
26
|
+
TopUpEsimOkResponseProfile,
|
|
27
|
+
)
|
|
28
|
+
from .edit_purchase_request import EditPurchaseRequest
|
|
29
|
+
from .edit_purchase_ok_response import EditPurchaseOkResponse
|
|
30
|
+
from .get_purchase_consumption_ok_response import GetPurchaseConsumptionOkResponse
|
|
31
|
+
from .get_esim_ok_response import GetEsimOkResponse, GetEsimOkResponseEsim
|
|
32
|
+
from .get_esim_device_ok_response import GetEsimDeviceOkResponse, Device
|
|
33
|
+
from .get_esim_history_ok_response import (
|
|
34
|
+
GetEsimHistoryOkResponse,
|
|
35
|
+
GetEsimHistoryOkResponseEsim,
|
|
36
|
+
)
|
|
37
|
+
from .token_ok_response import TokenOkResponse
|
|
38
|
+
from .o_auth_token_request import OAuthTokenRequest
|
|
39
|
+
from .o_auth_token_response import OAuthTokenResponse
|
|
40
|
+
from .grant_type import GrantType
|
|
41
|
+
from .bad_request import BadRequest
|
|
42
|
+
from .unauthorized import Unauthorized
|
|
43
|
+
|
|
44
|
+
# Rebuild models to resolve circular forward references
|
|
45
|
+
# This ensures Pydantic can properly validate models that reference each other
|
|
46
|
+
ListDestinationsOkResponse.model_rebuild()
|
|
47
|
+
Destinations.model_rebuild()
|
|
48
|
+
ListPackagesOkResponse.model_rebuild()
|
|
49
|
+
Packages.model_rebuild()
|
|
50
|
+
CreatePurchaseV2Request.model_rebuild()
|
|
51
|
+
CreatePurchaseV2OkResponse.model_rebuild()
|
|
52
|
+
CreatePurchaseV2OkResponsePurchase.model_rebuild()
|
|
53
|
+
CreatePurchaseV2OkResponseProfile.model_rebuild()
|
|
54
|
+
ListPurchasesOkResponse.model_rebuild()
|
|
55
|
+
Purchases.model_rebuild()
|
|
56
|
+
CreatePurchaseRequest.model_rebuild()
|
|
57
|
+
CreatePurchaseOkResponse.model_rebuild()
|
|
58
|
+
CreatePurchaseOkResponsePurchase.model_rebuild()
|
|
59
|
+
CreatePurchaseOkResponseProfile.model_rebuild()
|
|
60
|
+
TopUpEsimRequest.model_rebuild()
|
|
61
|
+
TopUpEsimOkResponse.model_rebuild()
|
|
62
|
+
TopUpEsimOkResponsePurchase.model_rebuild()
|
|
63
|
+
TopUpEsimOkResponseProfile.model_rebuild()
|
|
64
|
+
EditPurchaseRequest.model_rebuild()
|
|
65
|
+
EditPurchaseOkResponse.model_rebuild()
|
|
66
|
+
GetPurchaseConsumptionOkResponse.model_rebuild()
|
|
67
|
+
GetEsimOkResponse.model_rebuild()
|
|
68
|
+
GetEsimOkResponseEsim.model_rebuild()
|
|
69
|
+
GetEsimDeviceOkResponse.model_rebuild()
|
|
70
|
+
Device.model_rebuild()
|
|
71
|
+
GetEsimHistoryOkResponse.model_rebuild()
|
|
72
|
+
GetEsimHistoryOkResponseEsim.model_rebuild()
|
|
73
|
+
TokenOkResponse.model_rebuild()
|
|
74
|
+
OAuthTokenRequest.model_rebuild()
|
|
75
|
+
OAuthTokenResponse.model_rebuild()
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
from pydantic import Field
|
|
2
|
+
from typing import Optional
|
|
3
|
+
from .utils.base_error import BaseError
|
|
4
|
+
from .utils.base_model import BaseModel
|
|
5
|
+
|
|
6
|
+
|
|
7
|
+
# Pydantic validation model for BadRequest
|
|
8
|
+
class BadRequestData(BaseModel):
|
|
9
|
+
"""BadRequest
|
|
10
|
+
|
|
11
|
+
:param message: Message of the error, defaults to None
|
|
12
|
+
:type message: str, optional
|
|
13
|
+
"""
|
|
14
|
+
|
|
15
|
+
message: Optional[str] = Field(default=None, description="Message of the error")
|
|
16
|
+
|
|
17
|
+
|
|
18
|
+
# Error exception class
|
|
19
|
+
class BadRequest(BaseError):
|
|
20
|
+
"""BadRequest
|
|
21
|
+
|
|
22
|
+
:param message: Message of the error, defaults to None
|
|
23
|
+
:type message: str, optional
|
|
24
|
+
"""
|
|
25
|
+
|
|
26
|
+
_model_class = BadRequestData
|
|
@@ -0,0 +1,99 @@
|
|
|
1
|
+
from pydantic import Field
|
|
2
|
+
from typing import Optional
|
|
3
|
+
from typing import Union
|
|
4
|
+
from .utils.base_model import BaseModel
|
|
5
|
+
|
|
6
|
+
|
|
7
|
+
class CreatePurchaseOkResponsePurchase(BaseModel):
|
|
8
|
+
"""CreatePurchaseOkResponsePurchase
|
|
9
|
+
|
|
10
|
+
:param id_: ID of the purchase
|
|
11
|
+
:type id_: str
|
|
12
|
+
:param package_id: ID of the package
|
|
13
|
+
:type package_id: str
|
|
14
|
+
:param start_date: Start date of the package's validity in the format 'yyyy-MM-ddThh:mm:ssZZ'
|
|
15
|
+
:type start_date: str
|
|
16
|
+
:param end_date: End date of the package's validity in the format 'yyyy-MM-ddThh:mm:ssZZ'
|
|
17
|
+
:type end_date: str
|
|
18
|
+
:param created_date: Creation date of the purchase in the format 'yyyy-MM-ddThh:mm:ssZZ'
|
|
19
|
+
:type created_date: str
|
|
20
|
+
:param start_time: Epoch value representing the start time of the package's validity, defaults to None
|
|
21
|
+
:type start_time: float, optional
|
|
22
|
+
:param end_time: Epoch value representing the end time of the package's validity, defaults to None
|
|
23
|
+
:type end_time: float, optional
|
|
24
|
+
"""
|
|
25
|
+
|
|
26
|
+
id_: str = Field(
|
|
27
|
+
alias="id", serialization_alias="id", description="ID of the purchase"
|
|
28
|
+
)
|
|
29
|
+
package_id: str = Field(
|
|
30
|
+
alias="packageId",
|
|
31
|
+
serialization_alias="packageId",
|
|
32
|
+
description="ID of the package",
|
|
33
|
+
)
|
|
34
|
+
start_date: Optional[str] = Field(
|
|
35
|
+
alias="startDate",
|
|
36
|
+
serialization_alias="startDate",
|
|
37
|
+
description="Start date of the package's validity in the format 'yyyy-MM-ddThh:mm:ssZZ'",
|
|
38
|
+
)
|
|
39
|
+
end_date: Optional[str] = Field(
|
|
40
|
+
alias="endDate",
|
|
41
|
+
serialization_alias="endDate",
|
|
42
|
+
description="End date of the package's validity in the format 'yyyy-MM-ddThh:mm:ssZZ'",
|
|
43
|
+
)
|
|
44
|
+
created_date: str = Field(
|
|
45
|
+
alias="createdDate",
|
|
46
|
+
serialization_alias="createdDate",
|
|
47
|
+
description="Creation date of the purchase in the format 'yyyy-MM-ddThh:mm:ssZZ'",
|
|
48
|
+
)
|
|
49
|
+
start_time: Optional[float] = Field(
|
|
50
|
+
alias="startTime",
|
|
51
|
+
serialization_alias="startTime",
|
|
52
|
+
default=None,
|
|
53
|
+
description="Epoch value representing the start time of the package's validity",
|
|
54
|
+
)
|
|
55
|
+
end_time: Optional[float] = Field(
|
|
56
|
+
alias="endTime",
|
|
57
|
+
serialization_alias="endTime",
|
|
58
|
+
default=None,
|
|
59
|
+
description="Epoch value representing the end time of the package's validity",
|
|
60
|
+
)
|
|
61
|
+
|
|
62
|
+
|
|
63
|
+
class CreatePurchaseOkResponseProfile(BaseModel):
|
|
64
|
+
"""CreatePurchaseOkResponseProfile
|
|
65
|
+
|
|
66
|
+
:param iccid: ID of the eSIM
|
|
67
|
+
:type iccid: str
|
|
68
|
+
:param activation_code: QR Code of the eSIM as base64
|
|
69
|
+
:type activation_code: str
|
|
70
|
+
:param manual_activation_code: Manual Activation Code of the eSIM
|
|
71
|
+
:type manual_activation_code: str
|
|
72
|
+
"""
|
|
73
|
+
|
|
74
|
+
iccid: str = Field(description="ID of the eSIM", min_length=18, max_length=22)
|
|
75
|
+
activation_code: str = Field(
|
|
76
|
+
alias="activationCode",
|
|
77
|
+
serialization_alias="activationCode",
|
|
78
|
+
description="QR Code of the eSIM as base64",
|
|
79
|
+
min_length=1000,
|
|
80
|
+
max_length=8000,
|
|
81
|
+
)
|
|
82
|
+
manual_activation_code: str = Field(
|
|
83
|
+
alias="manualActivationCode",
|
|
84
|
+
serialization_alias="manualActivationCode",
|
|
85
|
+
description="Manual Activation Code of the eSIM",
|
|
86
|
+
)
|
|
87
|
+
|
|
88
|
+
|
|
89
|
+
class CreatePurchaseOkResponse(BaseModel):
|
|
90
|
+
"""CreatePurchaseOkResponse
|
|
91
|
+
|
|
92
|
+
:param purchase: purchase
|
|
93
|
+
:type purchase: CreatePurchaseOkResponsePurchase
|
|
94
|
+
:param profile: profile
|
|
95
|
+
:type profile: CreatePurchaseOkResponseProfile
|
|
96
|
+
"""
|
|
97
|
+
|
|
98
|
+
purchase: CreatePurchaseOkResponsePurchase
|
|
99
|
+
profile: CreatePurchaseOkResponseProfile
|
|
@@ -0,0 +1,122 @@
|
|
|
1
|
+
from enum import Enum
|
|
2
|
+
from pydantic import Field
|
|
3
|
+
from typing import Optional
|
|
4
|
+
from .utils.base_model import BaseModel
|
|
5
|
+
|
|
6
|
+
|
|
7
|
+
class CreatePurchaseRequestLanguage(str, Enum):
|
|
8
|
+
"""An enumeration representing different categories.
|
|
9
|
+
|
|
10
|
+
:cvar EN: "en"
|
|
11
|
+
:vartype EN: str
|
|
12
|
+
:cvar ES: "es"
|
|
13
|
+
:vartype ES: str
|
|
14
|
+
:cvar FR: "fr"
|
|
15
|
+
:vartype FR: str
|
|
16
|
+
:cvar DE: "de"
|
|
17
|
+
:vartype DE: str
|
|
18
|
+
:cvar PTBR: "pt-br"
|
|
19
|
+
:vartype PTBR: str
|
|
20
|
+
"""
|
|
21
|
+
|
|
22
|
+
EN = "en"
|
|
23
|
+
ES = "es"
|
|
24
|
+
FR = "fr"
|
|
25
|
+
DE = "de"
|
|
26
|
+
PTBR = "pt-br"
|
|
27
|
+
|
|
28
|
+
@staticmethod
|
|
29
|
+
def list():
|
|
30
|
+
"""Lists all enum values.
|
|
31
|
+
|
|
32
|
+
:return: A list of all enum values.
|
|
33
|
+
:rtype: list
|
|
34
|
+
"""
|
|
35
|
+
return list(
|
|
36
|
+
map(lambda x: x.value, CreatePurchaseRequestLanguage._member_map_.values())
|
|
37
|
+
)
|
|
38
|
+
|
|
39
|
+
|
|
40
|
+
class CreatePurchaseRequest(BaseModel):
|
|
41
|
+
"""CreatePurchaseRequest
|
|
42
|
+
|
|
43
|
+
:param destination: ISO representation of the package's destination. Supports both ISO2 (e.g., 'FR') and ISO3 (e.g., 'FRA') country codes.
|
|
44
|
+
: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
|
|
46
|
+
:type data_limit_in_gb: float
|
|
47
|
+
: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
|
+
:type start_date: str
|
|
49
|
+
: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.
|
|
50
|
+
:type end_date: str
|
|
51
|
+
:param email: Email address where the purchase confirmation email will be sent (including QR Code & activation steps), defaults to None
|
|
52
|
+
:type email: str, optional
|
|
53
|
+
:param reference_id: An identifier provided by the partner to link this purchase to their booking or transaction for analytics and debugging purposes., defaults to None
|
|
54
|
+
:type reference_id: str, optional
|
|
55
|
+
:param network_brand: Customize the network brand of the issued eSIM. The `networkBrand` parameter cannot exceed 15 characters in length and must contain only letters, numbers, dots (.), ampersands (&), and spaces. This feature is available to platforms with Diamond tier only., defaults to None
|
|
56
|
+
:type network_brand: str, optional
|
|
57
|
+
:param email_brand: Customize the email subject brand. The `emailBrand` parameter cannot exceed 25 characters in length and must contain only letters, numbers, and spaces. This feature is available to platforms with Diamond tier only., defaults to None
|
|
58
|
+
:type email_brand: str, optional
|
|
59
|
+
:param language: Language of the confirmation email sent to the customer., defaults to None
|
|
60
|
+
:type language: CreatePurchaseRequestLanguage, optional
|
|
61
|
+
:param start_time: Epoch value representing the start time of the package's validity. This timestamp can be set to the current time or any time within the next 12 months., defaults to None
|
|
62
|
+
:type start_time: float, optional
|
|
63
|
+
:param end_time: Epoch value representing the end time of the package's validity. End time can be maximum 90 days after Start time., defaults to None
|
|
64
|
+
:type end_time: float, optional
|
|
65
|
+
"""
|
|
66
|
+
|
|
67
|
+
destination: str = Field(
|
|
68
|
+
description="ISO representation of the package's destination. Supports both ISO2 (e.g., 'FR') and ISO3 (e.g., 'FRA') country codes."
|
|
69
|
+
)
|
|
70
|
+
data_limit_in_gb: float = Field(
|
|
71
|
+
alias="dataLimitInGB",
|
|
72
|
+
serialization_alias="dataLimitInGB",
|
|
73
|
+
description="Size of the package in GB. The available options are 0.5, 1, 2, 3, 5, 8, 20, 50GB",
|
|
74
|
+
)
|
|
75
|
+
start_date: str = Field(
|
|
76
|
+
alias="startDate",
|
|
77
|
+
serialization_alias="startDate",
|
|
78
|
+
description="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.",
|
|
79
|
+
)
|
|
80
|
+
end_date: str = Field(
|
|
81
|
+
alias="endDate",
|
|
82
|
+
serialization_alias="endDate",
|
|
83
|
+
description="End date of the package's validity in the format 'yyyy-MM-dd'. End date can be maximum 90 days after Start date.",
|
|
84
|
+
)
|
|
85
|
+
email: Optional[str] = Field(
|
|
86
|
+
default=None,
|
|
87
|
+
description="Email address where the purchase confirmation email will be sent (including QR Code & activation steps)",
|
|
88
|
+
)
|
|
89
|
+
reference_id: Optional[str] = Field(
|
|
90
|
+
alias="referenceId",
|
|
91
|
+
serialization_alias="referenceId",
|
|
92
|
+
default=None,
|
|
93
|
+
description="An identifier provided by the partner to link this purchase to their booking or transaction for analytics and debugging purposes.",
|
|
94
|
+
)
|
|
95
|
+
network_brand: Optional[str] = Field(
|
|
96
|
+
alias="networkBrand",
|
|
97
|
+
serialization_alias="networkBrand",
|
|
98
|
+
default=None,
|
|
99
|
+
description="Customize the network brand of the issued eSIM. The `networkBrand` parameter cannot exceed 15 characters in length and must contain only letters, numbers, dots (.), ampersands (&), and spaces. This feature is available to platforms with Diamond tier only.",
|
|
100
|
+
)
|
|
101
|
+
email_brand: Optional[str] = Field(
|
|
102
|
+
alias="emailBrand",
|
|
103
|
+
serialization_alias="emailBrand",
|
|
104
|
+
default=None,
|
|
105
|
+
description="Customize the email subject brand. The `emailBrand` parameter cannot exceed 25 characters in length and must contain only letters, numbers, and spaces. This feature is available to platforms with Diamond tier only.",
|
|
106
|
+
)
|
|
107
|
+
language: Optional[CreatePurchaseRequestLanguage] = Field(
|
|
108
|
+
default=None,
|
|
109
|
+
description="Language of the confirmation email sent to the customer.",
|
|
110
|
+
)
|
|
111
|
+
start_time: Optional[float] = Field(
|
|
112
|
+
alias="startTime",
|
|
113
|
+
serialization_alias="startTime",
|
|
114
|
+
default=None,
|
|
115
|
+
description="Epoch value representing the start time of the package's validity. This timestamp can be set to the current time or any time within the next 12 months.",
|
|
116
|
+
)
|
|
117
|
+
end_time: Optional[float] = Field(
|
|
118
|
+
alias="endTime",
|
|
119
|
+
serialization_alias="endTime",
|
|
120
|
+
default=None,
|
|
121
|
+
description="Epoch value representing the end time of the package's validity. End time can be maximum 90 days after Start time.",
|
|
122
|
+
)
|
|
@@ -0,0 +1,82 @@
|
|
|
1
|
+
from pydantic import Field
|
|
2
|
+
from typing import Optional
|
|
3
|
+
from .utils.base_model import BaseModel
|
|
4
|
+
|
|
5
|
+
|
|
6
|
+
class CreatePurchaseV2OkResponsePurchase(BaseModel):
|
|
7
|
+
"""CreatePurchaseV2OkResponsePurchase
|
|
8
|
+
|
|
9
|
+
:param id_: ID of the purchase
|
|
10
|
+
:type id_: str
|
|
11
|
+
:param package_id: ID of the package
|
|
12
|
+
:type package_id: str
|
|
13
|
+
:param created_date: Creation date of the purchase in the format 'yyyy-MM-ddThh:mm:ssZZ'
|
|
14
|
+
:type created_date: str
|
|
15
|
+
"""
|
|
16
|
+
|
|
17
|
+
id_: str = Field(
|
|
18
|
+
alias="id", serialization_alias="id", description="ID of the purchase"
|
|
19
|
+
)
|
|
20
|
+
package_id: str = Field(
|
|
21
|
+
alias="packageId",
|
|
22
|
+
serialization_alias="packageId",
|
|
23
|
+
description="ID of the package",
|
|
24
|
+
)
|
|
25
|
+
created_date: str = Field(
|
|
26
|
+
alias="createdDate",
|
|
27
|
+
serialization_alias="createdDate",
|
|
28
|
+
description="Creation date of the purchase in the format 'yyyy-MM-ddThh:mm:ssZZ'",
|
|
29
|
+
)
|
|
30
|
+
|
|
31
|
+
|
|
32
|
+
class CreatePurchaseV2OkResponseProfile(BaseModel):
|
|
33
|
+
"""CreatePurchaseV2OkResponseProfile
|
|
34
|
+
|
|
35
|
+
:param iccid: ID of the eSIM
|
|
36
|
+
:type iccid: str
|
|
37
|
+
:param activation_code: QR Code of the eSIM as base64
|
|
38
|
+
:type activation_code: str
|
|
39
|
+
:param manual_activation_code: Manual Activation Code of the eSIM
|
|
40
|
+
:type manual_activation_code: str
|
|
41
|
+
:param ios_activation_link: iOS Activation Link of the eSIM
|
|
42
|
+
:type ios_activation_link: str
|
|
43
|
+
:param android_activation_link: Android Activation Link of the eSIM
|
|
44
|
+
:type android_activation_link: str
|
|
45
|
+
"""
|
|
46
|
+
|
|
47
|
+
iccid: str = Field(description="ID of the eSIM", min_length=18, max_length=22)
|
|
48
|
+
activation_code: str = Field(
|
|
49
|
+
alias="activationCode",
|
|
50
|
+
serialization_alias="activationCode",
|
|
51
|
+
description="QR Code of the eSIM as base64",
|
|
52
|
+
min_length=1000,
|
|
53
|
+
max_length=8000,
|
|
54
|
+
)
|
|
55
|
+
manual_activation_code: str = Field(
|
|
56
|
+
alias="manualActivationCode",
|
|
57
|
+
serialization_alias="manualActivationCode",
|
|
58
|
+
description="Manual Activation Code of the eSIM",
|
|
59
|
+
)
|
|
60
|
+
ios_activation_link: str = Field(
|
|
61
|
+
alias="iosActivationLink",
|
|
62
|
+
serialization_alias="iosActivationLink",
|
|
63
|
+
description="iOS Activation Link of the eSIM",
|
|
64
|
+
)
|
|
65
|
+
android_activation_link: str = Field(
|
|
66
|
+
alias="androidActivationLink",
|
|
67
|
+
serialization_alias="androidActivationLink",
|
|
68
|
+
description="Android Activation Link of the eSIM",
|
|
69
|
+
)
|
|
70
|
+
|
|
71
|
+
|
|
72
|
+
class CreatePurchaseV2OkResponse(BaseModel):
|
|
73
|
+
"""CreatePurchaseV2OkResponse
|
|
74
|
+
|
|
75
|
+
:param purchase: purchase
|
|
76
|
+
:type purchase: CreatePurchaseV2OkResponsePurchase
|
|
77
|
+
:param profile: profile
|
|
78
|
+
:type profile: CreatePurchaseV2OkResponseProfile
|
|
79
|
+
"""
|
|
80
|
+
|
|
81
|
+
purchase: CreatePurchaseV2OkResponsePurchase
|
|
82
|
+
profile: CreatePurchaseV2OkResponseProfile
|