celitech-sdk 1.3.59__tar.gz → 1.3.63__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 (87) hide show
  1. {celitech_sdk-1.3.59 → celitech_sdk-1.3.63}/LICENSE +1 -1
  2. {celitech_sdk-1.3.59/src/celitech_sdk.egg-info → celitech_sdk-1.3.63}/PKG-INFO +4 -7
  3. {celitech_sdk-1.3.59 → celitech_sdk-1.3.63}/PyPI_README.md +3 -6
  4. {celitech_sdk-1.3.59 → celitech_sdk-1.3.63}/README.md +3 -3
  5. {celitech_sdk-1.3.59 → celitech_sdk-1.3.63}/pyproject.toml +1 -1
  6. celitech_sdk-1.3.63/src/celitech/hooks/hook.py +106 -0
  7. {celitech_sdk-1.3.59 → celitech_sdk-1.3.63}/src/celitech/models/create_purchase_ok_response.py +6 -4
  8. {celitech_sdk-1.3.59 → celitech_sdk-1.3.63}/src/celitech/models/create_purchase_request.py +10 -8
  9. {celitech_sdk-1.3.59 → celitech_sdk-1.3.63}/src/celitech/models/create_purchase_v2_ok_response.py +29 -5
  10. {celitech_sdk-1.3.59 → celitech_sdk-1.3.63}/src/celitech/models/create_purchase_v2_request.py +26 -18
  11. {celitech_sdk-1.3.59 → celitech_sdk-1.3.63}/src/celitech/models/edit_purchase_ok_response.py +1 -1
  12. {celitech_sdk-1.3.59 → celitech_sdk-1.3.63}/src/celitech/models/edit_purchase_request.py +3 -3
  13. {celitech_sdk-1.3.59 → celitech_sdk-1.3.63}/src/celitech/models/get_access_token_request.py +2 -4
  14. {celitech_sdk-1.3.59 → celitech_sdk-1.3.63}/src/celitech/models/get_esim_device_ok_response.py +4 -4
  15. {celitech_sdk-1.3.59 → celitech_sdk-1.3.63}/src/celitech/models/get_esim_history_ok_response.py +2 -2
  16. {celitech_sdk-1.3.59 → celitech_sdk-1.3.63}/src/celitech/models/get_esim_ok_response.py +14 -3
  17. celitech_sdk-1.3.63/src/celitech/models/get_purchase_consumption_ok_response.py +45 -0
  18. {celitech_sdk-1.3.59 → celitech_sdk-1.3.63}/src/celitech/models/list_destinations_ok_response.py +3 -3
  19. {celitech_sdk-1.3.59 → celitech_sdk-1.3.63}/src/celitech/models/list_packages_ok_response.py +18 -7
  20. {celitech_sdk-1.3.59 → celitech_sdk-1.3.63}/src/celitech/models/list_purchases_ok_response.py +27 -10
  21. {celitech_sdk-1.3.59 → celitech_sdk-1.3.63}/src/celitech/models/token_ok_response.py +1 -1
  22. {celitech_sdk-1.3.59 → celitech_sdk-1.3.63}/src/celitech/models/top_up_esim_ok_response.py +3 -3
  23. {celitech_sdk-1.3.59 → celitech_sdk-1.3.63}/src/celitech/models/top_up_esim_request.py +23 -15
  24. {celitech_sdk-1.3.59 → celitech_sdk-1.3.63}/src/celitech/models/utils/base_model.py +30 -5
  25. celitech_sdk-1.3.63/src/celitech/net/headers/base_header.py +26 -0
  26. {celitech_sdk-1.3.59 → celitech_sdk-1.3.63}/src/celitech/net/oauth/token_manager.py +35 -3
  27. {celitech_sdk-1.3.59 → celitech_sdk-1.3.63}/src/celitech/net/request_chain/handlers/http_handler.py +7 -0
  28. {celitech_sdk-1.3.59 → celitech_sdk-1.3.63}/src/celitech/net/request_chain/handlers/oauth_handler.py +31 -0
  29. {celitech_sdk-1.3.59 → celitech_sdk-1.3.63}/src/celitech/net/transport/response.py +25 -7
  30. {celitech_sdk-1.3.59 → celitech_sdk-1.3.63}/src/celitech/sdk.py +6 -0
  31. {celitech_sdk-1.3.59 → celitech_sdk-1.3.63}/src/celitech/services/async_/packages.py +1 -9
  32. {celitech_sdk-1.3.59 → celitech_sdk-1.3.63}/src/celitech/services/async_/purchases.py +2 -0
  33. {celitech_sdk-1.3.59 → celitech_sdk-1.3.63}/src/celitech/services/destinations.py +5 -0
  34. {celitech_sdk-1.3.59 → celitech_sdk-1.3.63}/src/celitech/services/e_sim.py +5 -0
  35. {celitech_sdk-1.3.59 → celitech_sdk-1.3.63}/src/celitech/services/i_frame.py +5 -0
  36. {celitech_sdk-1.3.59 → celitech_sdk-1.3.63}/src/celitech/services/o_auth.py +5 -0
  37. {celitech_sdk-1.3.59 → celitech_sdk-1.3.63}/src/celitech/services/packages.py +5 -5
  38. {celitech_sdk-1.3.59 → celitech_sdk-1.3.63}/src/celitech/services/purchases.py +11 -1
  39. {celitech_sdk-1.3.59 → celitech_sdk-1.3.63}/src/celitech/services/utils/base_service.py +1 -0
  40. {celitech_sdk-1.3.59 → celitech_sdk-1.3.63/src/celitech_sdk.egg-info}/PKG-INFO +4 -7
  41. celitech_sdk-1.3.59/src/celitech/hooks/hook.py +0 -35
  42. celitech_sdk-1.3.59/src/celitech/models/get_purchase_consumption_ok_response.py +0 -25
  43. celitech_sdk-1.3.59/src/celitech/net/headers/base_header.py +0 -9
  44. {celitech_sdk-1.3.59 → celitech_sdk-1.3.63}/setup.cfg +0 -0
  45. {celitech_sdk-1.3.59 → celitech_sdk-1.3.63}/src/celitech/__init__.py +0 -0
  46. {celitech_sdk-1.3.59 → celitech_sdk-1.3.63}/src/celitech/hooks/__init__.py +0 -0
  47. {celitech_sdk-1.3.59 → celitech_sdk-1.3.63}/src/celitech/models/__init__.py +0 -0
  48. {celitech_sdk-1.3.59 → celitech_sdk-1.3.63}/src/celitech/models/bad_request.py +0 -0
  49. {celitech_sdk-1.3.59 → celitech_sdk-1.3.63}/src/celitech/models/get_access_token_ok_response.py +0 -0
  50. {celitech_sdk-1.3.59 → celitech_sdk-1.3.63}/src/celitech/models/unauthorized.py +0 -0
  51. {celitech_sdk-1.3.59 → celitech_sdk-1.3.63}/src/celitech/models/utils/__init__.py +0 -0
  52. {celitech_sdk-1.3.59 → celitech_sdk-1.3.63}/src/celitech/models/utils/cast_models.py +0 -0
  53. {celitech_sdk-1.3.59 → celitech_sdk-1.3.63}/src/celitech/models/utils/json_map.py +0 -0
  54. {celitech_sdk-1.3.59 → celitech_sdk-1.3.63}/src/celitech/models/utils/one_of_base_model.py +0 -0
  55. {celitech_sdk-1.3.59 → celitech_sdk-1.3.63}/src/celitech/models/utils/sentinel.py +0 -0
  56. {celitech_sdk-1.3.59 → celitech_sdk-1.3.63}/src/celitech/net/__init__.py +0 -0
  57. {celitech_sdk-1.3.59 → celitech_sdk-1.3.63}/src/celitech/net/environment/__init__.py +0 -0
  58. {celitech_sdk-1.3.59 → celitech_sdk-1.3.63}/src/celitech/net/environment/environment.py +0 -0
  59. {celitech_sdk-1.3.59 → celitech_sdk-1.3.63}/src/celitech/net/headers/__init__.py +0 -0
  60. {celitech_sdk-1.3.59 → celitech_sdk-1.3.63}/src/celitech/net/request_chain/__init__.py +0 -0
  61. {celitech_sdk-1.3.59 → celitech_sdk-1.3.63}/src/celitech/net/request_chain/handlers/__init__.py +0 -0
  62. {celitech_sdk-1.3.59 → celitech_sdk-1.3.63}/src/celitech/net/request_chain/handlers/base_handler.py +0 -0
  63. {celitech_sdk-1.3.59 → celitech_sdk-1.3.63}/src/celitech/net/request_chain/handlers/hook_handler.py +0 -0
  64. {celitech_sdk-1.3.59 → celitech_sdk-1.3.63}/src/celitech/net/request_chain/handlers/retry_handler.py +0 -0
  65. {celitech_sdk-1.3.59 → celitech_sdk-1.3.63}/src/celitech/net/request_chain/request_chain.py +0 -0
  66. {celitech_sdk-1.3.59 → celitech_sdk-1.3.63}/src/celitech/net/transport/__init__.py +0 -0
  67. {celitech_sdk-1.3.59 → celitech_sdk-1.3.63}/src/celitech/net/transport/api_error.py +0 -0
  68. {celitech_sdk-1.3.59 → celitech_sdk-1.3.63}/src/celitech/net/transport/request.py +0 -0
  69. {celitech_sdk-1.3.59 → celitech_sdk-1.3.63}/src/celitech/net/transport/request_error.py +0 -0
  70. {celitech_sdk-1.3.59 → celitech_sdk-1.3.63}/src/celitech/net/transport/serializer.py +0 -0
  71. {celitech_sdk-1.3.59 → celitech_sdk-1.3.63}/src/celitech/net/transport/utils.py +0 -0
  72. {celitech_sdk-1.3.59 → celitech_sdk-1.3.63}/src/celitech/sdk_async.py +0 -0
  73. {celitech_sdk-1.3.59 → celitech_sdk-1.3.63}/src/celitech/services/__init__.py +0 -0
  74. {celitech_sdk-1.3.59 → celitech_sdk-1.3.63}/src/celitech/services/async_/__init__.py +0 -0
  75. {celitech_sdk-1.3.59 → celitech_sdk-1.3.63}/src/celitech/services/async_/destinations.py +0 -0
  76. {celitech_sdk-1.3.59 → celitech_sdk-1.3.63}/src/celitech/services/async_/e_sim.py +0 -0
  77. {celitech_sdk-1.3.59 → celitech_sdk-1.3.63}/src/celitech/services/async_/i_frame.py +0 -0
  78. {celitech_sdk-1.3.59 → celitech_sdk-1.3.63}/src/celitech/services/async_/o_auth.py +0 -0
  79. {celitech_sdk-1.3.59 → celitech_sdk-1.3.63}/src/celitech/services/async_/utils/__init__.py +0 -0
  80. {celitech_sdk-1.3.59 → celitech_sdk-1.3.63}/src/celitech/services/async_/utils/to_async.py +0 -0
  81. {celitech_sdk-1.3.59 → celitech_sdk-1.3.63}/src/celitech/services/utils/__init__.py +0 -0
  82. {celitech_sdk-1.3.59 → celitech_sdk-1.3.63}/src/celitech/services/utils/default_headers.py +0 -0
  83. {celitech_sdk-1.3.59 → celitech_sdk-1.3.63}/src/celitech/services/utils/validator.py +0 -0
  84. {celitech_sdk-1.3.59 → celitech_sdk-1.3.63}/src/celitech_sdk.egg-info/SOURCES.txt +0 -0
  85. {celitech_sdk-1.3.59 → celitech_sdk-1.3.63}/src/celitech_sdk.egg-info/dependency_links.txt +0 -0
  86. {celitech_sdk-1.3.59 → celitech_sdk-1.3.63}/src/celitech_sdk.egg-info/requires.txt +0 -0
  87. {celitech_sdk-1.3.59 → celitech_sdk-1.3.63}/src/celitech_sdk.egg-info/top_level.txt +0 -0
@@ -1,6 +1,6 @@
1
1
  MIT License
2
2
 
3
- Copyright (c) 2025
3
+ Copyright (c) 2026
4
4
 
5
5
  Permission is hereby granted, free of charge, to any person obtaining a copy
6
6
  of this software and associated documentation files (the "Software"), to deal
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: celitech-sdk
3
- Version: 1.3.59
3
+ Version: 1.3.63
4
4
  Summary: Welcome to the CELITECH API documentation!
5
5
  License: MIT
6
6
  Requires-Python: >=3.9
@@ -9,7 +9,7 @@ License-File: LICENSE
9
9
  Requires-Dist: requests>=2.31.0
10
10
  Dynamic: license-file
11
11
 
12
- # Celitech Python SDK 1.3.59<a id="celitech-python-sdk-1359"></a>
12
+ # Celitech Python SDK 1.3.63<a id="celitech-python-sdk-1363"></a>
13
13
 
14
14
  Welcome to the Celitech SDK documentation. This guide will help you get started with integrating and using the Celitech SDK in your project.
15
15
 
@@ -17,8 +17,8 @@ Welcome to the Celitech SDK documentation. This guide will help you get started
17
17
 
18
18
  ## Versions<a id="versions"></a>
19
19
 
20
- - API version: `1.3.59`
21
- - SDK version: `1.3.59`
20
+ - API version: `1.3.63`
21
+ - SDK version: `1.3.63`
22
22
 
23
23
  ## About the API<a id="about-the-api"></a>
24
24
 
@@ -153,7 +153,6 @@ The SDK provides various services to interact with the API.
153
153
 
154
154
  | Name |
155
155
  | :----------- |
156
- | o_auth |
157
156
  | destinations |
158
157
  | packages |
159
158
  | purchases |
@@ -171,8 +170,6 @@ The SDK includes several models that represent the data structures used in API r
171
170
 
172
171
  | Name | Description |
173
172
  | :------------------------------- | :---------- |
174
- | GetAccessTokenRequest | |
175
- | GetAccessTokenOkResponse | |
176
173
  | ListDestinationsOkResponse | |
177
174
  | ListPackagesOkResponse | |
178
175
  | CreatePurchaseV2Request | |
@@ -1,4 +1,4 @@
1
- # Celitech Python SDK 1.3.59<a id="celitech-python-sdk-1359"></a>
1
+ # Celitech Python SDK 1.3.63<a id="celitech-python-sdk-1363"></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
 
@@ -6,8 +6,8 @@ Welcome to the Celitech SDK documentation. This guide will help you get started
6
6
 
7
7
  ## Versions<a id="versions"></a>
8
8
 
9
- - API version: `1.3.59`
10
- - SDK version: `1.3.59`
9
+ - API version: `1.3.63`
10
+ - SDK version: `1.3.63`
11
11
 
12
12
  ## About the API<a id="about-the-api"></a>
13
13
 
@@ -142,7 +142,6 @@ The SDK provides various services to interact with the API.
142
142
 
143
143
  | Name |
144
144
  | :----------- |
145
- | o_auth |
146
145
  | destinations |
147
146
  | packages |
148
147
  | purchases |
@@ -160,8 +159,6 @@ The SDK includes several models that represent the data structures used in API r
160
159
 
161
160
  | Name | Description |
162
161
  | :------------------------------- | :---------- |
163
- | GetAccessTokenRequest | |
164
- | GetAccessTokenOkResponse | |
165
162
  | ListDestinationsOkResponse | |
166
163
  | ListPackagesOkResponse | |
167
164
  | CreatePurchaseV2Request | |
@@ -1,4 +1,4 @@
1
- # Celitech Python SDK 1.3.59
1
+ # Celitech Python SDK 1.3.63
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
 
@@ -6,8 +6,8 @@ Welcome to the Celitech SDK documentation. This guide will help you get started
6
6
 
7
7
  ## Versions
8
8
 
9
- - API version: `1.3.59`
10
- - SDK version: `1.3.59`
9
+ - API version: `1.3.63`
10
+ - SDK version: `1.3.63`
11
11
 
12
12
  ## About the API
13
13
 
@@ -4,7 +4,7 @@ build-backend = "setuptools.build_meta"
4
4
 
5
5
  [project]
6
6
  name = "celitech-sdk"
7
- version = "1.3.59"
7
+ version = "1.3.63"
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,106 @@
1
+ class Request:
2
+ """
3
+ Simplified Request class for hook demonstrations and testing.
4
+
5
+ :ivar str method: The HTTP method (e.g., 'GET', 'POST').
6
+ :ivar str url: The request URL.
7
+ :ivar dict headers: Request headers.
8
+ :ivar str body: Request body content.
9
+ """
10
+
11
+ def __init__(self, method, url, headers, body=""):
12
+ """
13
+ Initialize a Request instance.
14
+
15
+ :param method: The HTTP method.
16
+ :param url: The request URL.
17
+ :param headers: Request headers.
18
+ :param body: Request body content (defaults to empty string).
19
+ """
20
+ self.method = method
21
+ self.url = url
22
+ self.headers = headers
23
+ self.body = body
24
+
25
+ def __str__(self):
26
+ """
27
+ Return a string representation of the Request.
28
+
29
+ :return: String representation of the request.
30
+ """
31
+ return f"method={self.method}, url={self.url}, headers={self.headers}, body={self.body})"
32
+
33
+
34
+ class Response:
35
+ """
36
+ Simplified Response class for hook demonstrations and testing.
37
+
38
+ :ivar int status: The HTTP status code.
39
+ :ivar dict headers: Response headers.
40
+ :ivar body: Response body content.
41
+ """
42
+
43
+ def __init__(self, status, headers, body):
44
+ """
45
+ Initialize a Response instance.
46
+
47
+ :param status: The HTTP status code.
48
+ :param headers: Response headers.
49
+ :param body: Response body content.
50
+ """
51
+ self.status = status
52
+ self.headers = headers
53
+ self.body = body
54
+
55
+ def __str__(self):
56
+ """
57
+ Return a string representation of the Response.
58
+
59
+ :return: String representation of the response.
60
+ """
61
+ return "Response(status={}, headers={}, body={})".format(
62
+ self.status, self.headers, self.body
63
+ )
64
+
65
+
66
+ class DefaultHook:
67
+ """
68
+ Default hook implementation with no-op methods.
69
+ Provides lifecycle hooks for request/response interception.
70
+ Extend this class to implement custom request/response handling logic.
71
+ """
72
+
73
+ def before_request(self, request: Request, **kwargs):
74
+ """
75
+ Hook called before a request is sent.
76
+ Override this method to modify requests or add custom logic before execution.
77
+
78
+ :param request: The request about to be sent.
79
+ :param kwargs: Additional keyword arguments passed to the hook.
80
+ """
81
+ pass
82
+
83
+ def after_response(self, request: Request, response: Response, **kwargs):
84
+ """
85
+ Hook called after a successful response is received.
86
+ Override this method to process responses or add custom logging.
87
+
88
+ :param request: The original request that was sent.
89
+ :param response: The response received from the server.
90
+ :param kwargs: Additional keyword arguments passed to the hook.
91
+ """
92
+ pass
93
+
94
+ def on_error(
95
+ self, error: Exception, request: Request, response: Response, **kwargs
96
+ ):
97
+ """
98
+ Hook called when an error occurs during request execution.
99
+ Override this method to implement custom error handling or logging.
100
+
101
+ :param error: The error that occurred.
102
+ :param request: The original request that was sent.
103
+ :param response: The response received (if any).
104
+ :param kwargs: Additional keyword arguments passed to the hook.
105
+ """
106
+ pass
@@ -62,11 +62,11 @@ class CreatePurchaseOkResponsePurchase(BaseModel):
62
62
  :param end_time: Epoch value representing the end time of the package's validity, defaults to None
63
63
  :type end_time: float, optional
64
64
  """
65
- self.id_ = id_
66
- self.package_id = package_id
65
+ self.id_ = self._define_str("id_", id_)
66
+ self.package_id = self._define_str("package_id", package_id)
67
67
  self.start_date = self._define_str("start_date", start_date, nullable=True)
68
68
  self.end_date = self._define_str("end_date", end_date, nullable=True)
69
- self.created_date = created_date
69
+ self.created_date = self._define_str("created_date", created_date)
70
70
  self.start_time = self._define_number("start_time", start_time, nullable=True)
71
71
  self.end_time = self._define_number("end_time", end_time, nullable=True)
72
72
  self._kwargs = kwargs
@@ -105,7 +105,9 @@ class CreatePurchaseOkResponseProfile(BaseModel):
105
105
  self.activation_code = self._define_str(
106
106
  "activation_code", activation_code, min_length=1000, max_length=8000
107
107
  )
108
- self.manual_activation_code = manual_activation_code
108
+ self.manual_activation_code = self._define_str(
109
+ "manual_activation_code", manual_activation_code
110
+ )
109
111
  self._kwargs = kwargs
110
112
 
111
113
 
@@ -20,7 +20,7 @@ class CreatePurchaseRequest(BaseModel):
20
20
 
21
21
  :param destination: ISO representation of the package's destination. Supports both ISO2 (e.g., 'FR') and ISO3 (e.g., 'FRA') country codes.
22
22
  :type destination: str
23
- :param data_limit_in_gb: Size of the package in GB. The available options are 0.5, 1, 2, 3, 5, 8, 20GB
23
+ :param data_limit_in_gb: Size of the package in GB. The available options are 0.5, 1, 2, 3, 5, 8, 20, 50GB
24
24
  :type data_limit_in_gb: float
25
25
  :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.
26
26
  :type start_date: str
@@ -30,7 +30,7 @@ class CreatePurchaseRequest(BaseModel):
30
30
  :type email: str, optional
31
31
  :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
32
32
  :type reference_id: str, optional
33
- :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 and numbers. This feature is available to platforms with Diamond tier only., defaults to None
33
+ :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
34
34
  :type network_brand: str, optional
35
35
  :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
36
36
  :type email_brand: str, optional
@@ -58,7 +58,7 @@ class CreatePurchaseRequest(BaseModel):
58
58
 
59
59
  :param destination: ISO representation of the package's destination. Supports both ISO2 (e.g., 'FR') and ISO3 (e.g., 'FRA') country codes.
60
60
  :type destination: str
61
- :param data_limit_in_gb: Size of the package in GB. The available options are 0.5, 1, 2, 3, 5, 8, 20GB
61
+ :param data_limit_in_gb: Size of the package in GB. The available options are 0.5, 1, 2, 3, 5, 8, 20, 50GB
62
62
  :type data_limit_in_gb: float
63
63
  :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.
64
64
  :type start_date: str
@@ -68,7 +68,7 @@ class CreatePurchaseRequest(BaseModel):
68
68
  :type email: str, optional
69
69
  :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
70
70
  :type reference_id: str, optional
71
- :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 and numbers. This feature is available to platforms with Diamond tier only., defaults to None
71
+ :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
72
72
  :type network_brand: str, optional
73
73
  :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
74
74
  :type email_brand: str, optional
@@ -77,10 +77,12 @@ class CreatePurchaseRequest(BaseModel):
77
77
  :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
78
78
  :type end_time: float, optional
79
79
  """
80
- self.destination = destination
81
- self.data_limit_in_gb = data_limit_in_gb
82
- self.start_date = start_date
83
- self.end_date = end_date
80
+ self.destination = self._define_str("destination", destination)
81
+ self.data_limit_in_gb = self._define_number(
82
+ "data_limit_in_gb", data_limit_in_gb
83
+ )
84
+ self.start_date = self._define_str("start_date", start_date)
85
+ self.end_date = self._define_str("end_date", end_date)
84
86
  self.email = self._define_str("email", email, nullable=True)
85
87
  self.reference_id = self._define_str(
86
88
  "reference_id", reference_id, nullable=True
@@ -24,9 +24,9 @@ class CreatePurchaseV2OkResponsePurchase(BaseModel):
24
24
  :param created_date: Creation date of the purchase in the format 'yyyy-MM-ddThh:mm:ssZZ'
25
25
  :type created_date: str
26
26
  """
27
- self.id_ = id_
28
- self.package_id = package_id
29
- self.created_date = created_date
27
+ self.id_ = self._define_str("id_", id_)
28
+ self.package_id = self._define_str("package_id", package_id)
29
+ self.created_date = self._define_str("created_date", created_date)
30
30
  self._kwargs = kwargs
31
31
 
32
32
 
@@ -34,6 +34,8 @@ class CreatePurchaseV2OkResponsePurchase(BaseModel):
34
34
  {
35
35
  "activation_code": "activationCode",
36
36
  "manual_activation_code": "manualActivationCode",
37
+ "ios_activation_link": "iosActivationLink",
38
+ "android_activation_link": "androidActivationLink",
37
39
  }
38
40
  )
39
41
  class CreatePurchaseV2OkResponseProfile(BaseModel):
@@ -45,10 +47,20 @@ class CreatePurchaseV2OkResponseProfile(BaseModel):
45
47
  :type activation_code: str
46
48
  :param manual_activation_code: Manual Activation Code of the eSIM
47
49
  :type manual_activation_code: str
50
+ :param ios_activation_link: iOS Activation Link of the eSIM
51
+ :type ios_activation_link: str
52
+ :param android_activation_link: Android Activation Link of the eSIM
53
+ :type android_activation_link: str
48
54
  """
49
55
 
50
56
  def __init__(
51
- self, iccid: str, activation_code: str, manual_activation_code: str, **kwargs
57
+ self,
58
+ iccid: str,
59
+ activation_code: str,
60
+ manual_activation_code: str,
61
+ ios_activation_link: str,
62
+ android_activation_link: str,
63
+ **kwargs
52
64
  ):
53
65
  """CreatePurchaseV2OkResponseProfile
54
66
 
@@ -58,12 +70,24 @@ class CreatePurchaseV2OkResponseProfile(BaseModel):
58
70
  :type activation_code: str
59
71
  :param manual_activation_code: Manual Activation Code of the eSIM
60
72
  :type manual_activation_code: str
73
+ :param ios_activation_link: iOS Activation Link of the eSIM
74
+ :type ios_activation_link: str
75
+ :param android_activation_link: Android Activation Link of the eSIM
76
+ :type android_activation_link: str
61
77
  """
62
78
  self.iccid = self._define_str("iccid", iccid, min_length=18, max_length=22)
63
79
  self.activation_code = self._define_str(
64
80
  "activation_code", activation_code, min_length=1000, max_length=8000
65
81
  )
66
- self.manual_activation_code = manual_activation_code
82
+ self.manual_activation_code = self._define_str(
83
+ "manual_activation_code", manual_activation_code
84
+ )
85
+ self.ios_activation_link = self._define_str(
86
+ "ios_activation_link", ios_activation_link
87
+ )
88
+ self.android_activation_link = self._define_str(
89
+ "android_activation_link", android_activation_link
90
+ )
67
91
  self._kwargs = kwargs
68
92
 
69
93
 
@@ -18,19 +18,21 @@ class CreatePurchaseV2Request(BaseModel):
18
18
 
19
19
  :param destination: ISO representation of the package's destination. Supports both ISO2 (e.g., 'FR') and ISO3 (e.g., 'FRA') country codes.
20
20
  :type destination: str
21
- :param data_limit_in_gb: Size of the package in GB. The available options are 0.5, 1, 2, 3, 5, 8, 20GB
21
+ :param data_limit_in_gb: Size of the package in GB. The available options are 0.5, 1, 2, 3, 5, 8, 20, 50GB
22
22
  :type data_limit_in_gb: float
23
- :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.
24
- :type start_date: str
25
- :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.
26
- :type end_date: str
23
+ :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
24
+ :type start_date: str, optional
25
+ :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
26
+ :type end_date: str, optional
27
+ :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
28
+ :type duration: float, optional
27
29
  :param quantity: Number of eSIMs to purchase.
28
30
  :type quantity: float
29
31
  :param email: Email address where the purchase confirmation email will be sent (including QR Code & activation steps), defaults to None
30
32
  :type email: str, optional
31
33
  :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
32
34
  :type reference_id: str, optional
33
- :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 and numbers. This feature is available to platforms with Diamond tier only., defaults to None
35
+ :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
34
36
  :type network_brand: str, optional
35
37
  :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
36
38
  :type email_brand: str, optional
@@ -40,9 +42,10 @@ class CreatePurchaseV2Request(BaseModel):
40
42
  self,
41
43
  destination: str,
42
44
  data_limit_in_gb: float,
43
- start_date: str,
44
- end_date: str,
45
45
  quantity: float,
46
+ start_date: str = SENTINEL,
47
+ end_date: str = SENTINEL,
48
+ duration: float = SENTINEL,
46
49
  email: str = SENTINEL,
47
50
  reference_id: str = SENTINEL,
48
51
  network_brand: str = SENTINEL,
@@ -53,27 +56,32 @@ class CreatePurchaseV2Request(BaseModel):
53
56
 
54
57
  :param destination: ISO representation of the package's destination. Supports both ISO2 (e.g., 'FR') and ISO3 (e.g., 'FRA') country codes.
55
58
  :type destination: str
56
- :param data_limit_in_gb: Size of the package in GB. The available options are 0.5, 1, 2, 3, 5, 8, 20GB
59
+ :param data_limit_in_gb: Size of the package in GB. The available options are 0.5, 1, 2, 3, 5, 8, 20, 50GB
57
60
  :type data_limit_in_gb: float
58
- :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.
59
- :type start_date: str
60
- :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.
61
- :type end_date: str
61
+ :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
62
+ :type start_date: str, optional
63
+ :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
64
+ :type end_date: str, optional
65
+ :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
66
+ :type duration: float, optional
62
67
  :param quantity: Number of eSIMs to purchase.
63
68
  :type quantity: float
64
69
  :param email: Email address where the purchase confirmation email will be sent (including QR Code & activation steps), defaults to None
65
70
  :type email: str, optional
66
71
  :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
67
72
  :type reference_id: str, optional
68
- :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 and numbers. This feature is available to platforms with Diamond tier only., defaults to None
73
+ :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
69
74
  :type network_brand: str, optional
70
75
  :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
71
76
  :type email_brand: str, optional
72
77
  """
73
- self.destination = destination
74
- self.data_limit_in_gb = data_limit_in_gb
75
- self.start_date = start_date
76
- self.end_date = end_date
78
+ self.destination = self._define_str("destination", destination)
79
+ self.data_limit_in_gb = self._define_number(
80
+ "data_limit_in_gb", data_limit_in_gb
81
+ )
82
+ self.start_date = self._define_str("start_date", start_date, nullable=True)
83
+ self.end_date = self._define_str("end_date", end_date, nullable=True)
84
+ self.duration = self._define_number("duration", duration, nullable=True)
77
85
  self.quantity = self._define_number("quantity", quantity, ge=1, le=5)
78
86
  self.email = self._define_str("email", email, nullable=True)
79
87
  self.reference_id = self._define_str(
@@ -50,7 +50,7 @@ class EditPurchaseOkResponse(BaseModel):
50
50
  :param new_end_time: Epoch value representing the new end time of the package's validity, defaults to None
51
51
  :type new_end_time: float, optional
52
52
  """
53
- self.purchase_id = purchase_id
53
+ self.purchase_id = self._define_str("purchase_id", purchase_id)
54
54
  self.new_start_date = self._define_str(
55
55
  "new_start_date", new_start_date, nullable=True
56
56
  )
@@ -49,9 +49,9 @@ class EditPurchaseRequest(BaseModel):
49
49
  :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
50
50
  :type end_time: float, optional
51
51
  """
52
- self.purchase_id = purchase_id
53
- self.start_date = start_date
54
- self.end_date = end_date
52
+ self.purchase_id = self._define_str("purchase_id", purchase_id)
53
+ self.start_date = self._define_str("start_date", start_date)
54
+ self.end_date = self._define_str("end_date", end_date)
55
55
  self.start_time = self._define_number("start_time", start_time, nullable=True)
56
56
  self.end_time = self._define_number("end_time", end_time, nullable=True)
57
57
  self._kwargs = kwargs
@@ -50,10 +50,8 @@ class GetAccessTokenRequest(BaseModel):
50
50
  :param client_secret: client_secret, defaults to None
51
51
  :type client_secret: str, optional
52
52
  """
53
- self.grant_type = (
54
- self._enum_matching(grant_type, GrantType.list(), "grant_type")
55
- if grant_type
56
- else None
53
+ self.grant_type = self._enum_matching(
54
+ grant_type, GrantType.list(), "grant_type", nullable=True
57
55
  )
58
56
  self.client_id = self._define_str("client_id", client_id, nullable=True)
59
57
  self.client_secret = self._define_str(
@@ -30,10 +30,10 @@ class Device(BaseModel):
30
30
  :param eid: Serial Number of the eSIM
31
31
  :type eid: str
32
32
  """
33
- self.oem = oem
34
- self.hardware_name = hardware_name
35
- self.hardware_model = hardware_model
36
- self.eid = eid
33
+ self.oem = self._define_str("oem", oem)
34
+ self.hardware_name = self._define_str("hardware_name", hardware_name)
35
+ self.hardware_model = self._define_str("hardware_model", hardware_model)
36
+ self.eid = self._define_str("eid", eid)
37
37
  self._kwargs = kwargs
38
38
 
39
39
 
@@ -28,8 +28,8 @@ class History(BaseModel):
28
28
  :param date_: Epoch value representing the date when the eSIM status changed, defaults to None
29
29
  :type date_: float, optional
30
30
  """
31
- self.status = status
32
- self.status_date = status_date
31
+ self.status = self._define_str("status", status)
32
+ self.status_date = self._define_str("status_date", status_date)
33
33
  self.date_ = self._define_number("date_", date_, nullable=True)
34
34
  self._kwargs = kwargs
35
35
 
@@ -7,6 +7,7 @@ from .utils.base_model import BaseModel
7
7
  "smdp_address": "smdpAddress",
8
8
  "activation_code": "activationCode",
9
9
  "manual_activation_code": "manualActivationCode",
10
+ "connectivity_status": "connectivityStatus",
10
11
  "is_top_up_allowed": "isTopUpAllowed",
11
12
  }
12
13
  )
@@ -23,6 +24,8 @@ class GetEsimOkResponseEsim(BaseModel):
23
24
  :type manual_activation_code: str
24
25
  :param status: Status of the eSIM, possible values are 'RELEASED', 'DOWNLOADED', 'INSTALLED', 'ENABLED', 'DELETED', or 'ERROR'
25
26
  :type status: str
27
+ :param connectivity_status: Status of the eSIM connectivity, possible values are 'ACTIVE' or 'NOT_ACTIVE'
28
+ :type connectivity_status: str
26
29
  :param is_top_up_allowed: Indicates whether the eSIM is currently eligible for a top-up. This flag should be checked before attempting a top-up request.
27
30
  :type is_top_up_allowed: bool
28
31
  """
@@ -34,6 +37,7 @@ class GetEsimOkResponseEsim(BaseModel):
34
37
  activation_code: str,
35
38
  manual_activation_code: str,
36
39
  status: str,
40
+ connectivity_status: str,
37
41
  is_top_up_allowed: bool,
38
42
  **kwargs
39
43
  ):
@@ -49,16 +53,23 @@ class GetEsimOkResponseEsim(BaseModel):
49
53
  :type manual_activation_code: str
50
54
  :param status: Status of the eSIM, possible values are 'RELEASED', 'DOWNLOADED', 'INSTALLED', 'ENABLED', 'DELETED', or 'ERROR'
51
55
  :type status: str
56
+ :param connectivity_status: Status of the eSIM connectivity, possible values are 'ACTIVE' or 'NOT_ACTIVE'
57
+ :type connectivity_status: str
52
58
  :param is_top_up_allowed: Indicates whether the eSIM is currently eligible for a top-up. This flag should be checked before attempting a top-up request.
53
59
  :type is_top_up_allowed: bool
54
60
  """
55
61
  self.iccid = self._define_str("iccid", iccid, min_length=18, max_length=22)
56
- self.smdp_address = smdp_address
62
+ self.smdp_address = self._define_str("smdp_address", smdp_address)
57
63
  self.activation_code = self._define_str(
58
64
  "activation_code", activation_code, min_length=1000, max_length=8000
59
65
  )
60
- self.manual_activation_code = manual_activation_code
61
- self.status = status
66
+ self.manual_activation_code = self._define_str(
67
+ "manual_activation_code", manual_activation_code
68
+ )
69
+ self.status = self._define_str("status", status)
70
+ self.connectivity_status = self._define_str(
71
+ "connectivity_status", connectivity_status
72
+ )
62
73
  self.is_top_up_allowed = is_top_up_allowed
63
74
  self._kwargs = kwargs
64
75
 
@@ -0,0 +1,45 @@
1
+ from .utils.json_map import JsonMap
2
+ from .utils.base_model import BaseModel
3
+
4
+
5
+ @JsonMap(
6
+ {
7
+ "data_usage_remaining_in_bytes": "dataUsageRemainingInBytes",
8
+ "data_usage_remaining_in_gb": "dataUsageRemainingInGB",
9
+ }
10
+ )
11
+ class GetPurchaseConsumptionOkResponse(BaseModel):
12
+ """GetPurchaseConsumptionOkResponse
13
+
14
+ :param data_usage_remaining_in_bytes: Remaining balance of the package in bytes
15
+ :type data_usage_remaining_in_bytes: float
16
+ :param data_usage_remaining_in_gb: Remaining balance of the package in GB
17
+ :type data_usage_remaining_in_gb: float
18
+ :param status: Status of the connectivity, possible values are 'ACTIVE' or 'NOT_ACTIVE'
19
+ :type status: str
20
+ """
21
+
22
+ def __init__(
23
+ self,
24
+ data_usage_remaining_in_bytes: float,
25
+ data_usage_remaining_in_gb: float,
26
+ status: str,
27
+ **kwargs
28
+ ):
29
+ """GetPurchaseConsumptionOkResponse
30
+
31
+ :param data_usage_remaining_in_bytes: Remaining balance of the package in bytes
32
+ :type data_usage_remaining_in_bytes: float
33
+ :param data_usage_remaining_in_gb: Remaining balance of the package in GB
34
+ :type data_usage_remaining_in_gb: float
35
+ :param status: Status of the connectivity, possible values are 'ACTIVE' or 'NOT_ACTIVE'
36
+ :type status: str
37
+ """
38
+ self.data_usage_remaining_in_bytes = self._define_number(
39
+ "data_usage_remaining_in_bytes", data_usage_remaining_in_bytes
40
+ )
41
+ self.data_usage_remaining_in_gb = self._define_number(
42
+ "data_usage_remaining_in_gb", data_usage_remaining_in_gb
43
+ )
44
+ self.status = self._define_str("status", status)
45
+ self._kwargs = kwargs
@@ -38,9 +38,9 @@ class Destinations(BaseModel):
38
38
  :param supported_countries: This array indicates the geographical area covered by a specific destination. If the destination represents a single country, the array will include that country. However, if the destination represents a broader regional scope, the array will be populated with the names of the countries belonging to that region.
39
39
  :type supported_countries: List[str]
40
40
  """
41
- self.name = name
42
- self.destination = destination
43
- self.destination_iso2 = destination_iso2
41
+ self.name = self._define_str("name", name)
42
+ self.destination = self._define_str("destination", destination)
43
+ self.destination_iso2 = self._define_str("destination_iso2", destination_iso2)
44
44
  self.supported_countries = supported_countries
45
45
  self._kwargs = kwargs
46
46