pingram-python 1.0.38__py3-none-any.whl → 1.0.39__py3-none-any.whl
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- pingram/__init__.py +5 -1
- pingram/api/logs_api.py +280 -3
- pingram/api_client.py +1 -1
- pingram/configuration.py +1 -1
- pingram/models/__init__.py +2 -0
- pingram/models/logs_delivery_status_response.py +95 -0
- pingram/models/logs_delivery_status_response_statuses_inner.py +110 -0
- {pingram_python-1.0.38.dist-info → pingram_python-1.0.39.dist-info}/METADATA +1 -1
- {pingram_python-1.0.38.dist-info → pingram_python-1.0.39.dist-info}/RECORD +12 -10
- {pingram_python-1.0.38.dist-info → pingram_python-1.0.39.dist-info}/WHEEL +0 -0
- {pingram_python-1.0.38.dist-info → pingram_python-1.0.39.dist-info}/licenses/LICENSE +0 -0
- {pingram_python-1.0.38.dist-info → pingram_python-1.0.39.dist-info}/top_level.txt +0 -0
pingram/__init__.py
CHANGED
|
@@ -14,7 +14,7 @@
|
|
|
14
14
|
""" # noqa: E501
|
|
15
15
|
|
|
16
16
|
|
|
17
|
-
__version__ = "1.0.
|
|
17
|
+
__version__ = "1.0.39"
|
|
18
18
|
|
|
19
19
|
# Define package exports
|
|
20
20
|
__all__ = [
|
|
@@ -240,6 +240,8 @@ __all__ = [
|
|
|
240
240
|
"ListVoiceCallsResponseCallsInner",
|
|
241
241
|
"LogQueryPostBody",
|
|
242
242
|
"LogsBulkRequest",
|
|
243
|
+
"LogsDeliveryStatusResponse",
|
|
244
|
+
"LogsDeliveryStatusResponseStatusesInner",
|
|
243
245
|
"LogsGetResponse",
|
|
244
246
|
"LogsGetResponseLogsInner",
|
|
245
247
|
"LogsQueryResponse",
|
|
@@ -589,6 +591,8 @@ from pingram.models.list_voice_calls_response import ListVoiceCallsResponse as L
|
|
|
589
591
|
from pingram.models.list_voice_calls_response_calls_inner import ListVoiceCallsResponseCallsInner as ListVoiceCallsResponseCallsInner
|
|
590
592
|
from pingram.models.log_query_post_body import LogQueryPostBody as LogQueryPostBody
|
|
591
593
|
from pingram.models.logs_bulk_request import LogsBulkRequest as LogsBulkRequest
|
|
594
|
+
from pingram.models.logs_delivery_status_response import LogsDeliveryStatusResponse as LogsDeliveryStatusResponse
|
|
595
|
+
from pingram.models.logs_delivery_status_response_statuses_inner import LogsDeliveryStatusResponseStatusesInner as LogsDeliveryStatusResponseStatusesInner
|
|
592
596
|
from pingram.models.logs_get_response import LogsGetResponse as LogsGetResponse
|
|
593
597
|
from pingram.models.logs_get_response_logs_inner import LogsGetResponseLogsInner as LogsGetResponseLogsInner
|
|
594
598
|
from pingram.models.logs_query_response import LogsQueryResponse as LogsQueryResponse
|
pingram/api/logs_api.py
CHANGED
|
@@ -21,6 +21,7 @@ from typing import Optional, Union
|
|
|
21
21
|
from typing_extensions import Annotated
|
|
22
22
|
from pingram.models.get_logs_response import GetLogsResponse
|
|
23
23
|
from pingram.models.log_query_post_body import LogQueryPostBody
|
|
24
|
+
from pingram.models.logs_delivery_status_response import LogsDeliveryStatusResponse
|
|
24
25
|
from pingram.models.logs_get_response import LogsGetResponse
|
|
25
26
|
from pingram.models.logs_query_response import LogsQueryResponse
|
|
26
27
|
from pingram.models.logs_query_result_response import LogsQueryResultResponse
|
|
@@ -46,6 +47,282 @@ class LogsApi:
|
|
|
46
47
|
self.api_client = api_client
|
|
47
48
|
|
|
48
49
|
|
|
50
|
+
@validate_call
|
|
51
|
+
async def logs_get_delivery_status(
|
|
52
|
+
self,
|
|
53
|
+
tracking_ids: Annotated[StrictStr, Field(description="Comma-separated tracking IDs (URL encoded, max 25)")],
|
|
54
|
+
_request_timeout: Union[
|
|
55
|
+
None,
|
|
56
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
57
|
+
Tuple[
|
|
58
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
59
|
+
Annotated[StrictFloat, Field(gt=0)]
|
|
60
|
+
]
|
|
61
|
+
] = None,
|
|
62
|
+
_request_auth: Optional[Dict[StrictStr, Any]] = None,
|
|
63
|
+
_content_type: Optional[StrictStr] = None,
|
|
64
|
+
_headers: Optional[Dict[StrictStr, Any]] = None,
|
|
65
|
+
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
|
|
66
|
+
) -> LogsDeliveryStatusResponse:
|
|
67
|
+
"""Look up email and SMS delivery status for up to 25 tracking IDs. Each entry is the tracking id, channel (EMAIL or SMS), status, and the time that status was recorded. The result does not include recipients, phone numbers, user ids, request bodies, IP addresses, account ids, or user-agent data. Unknown tracking ids are omitted. Other channels are not included.
|
|
68
|
+
|
|
69
|
+
|
|
70
|
+
:param tracking_ids: Comma-separated tracking IDs (URL encoded, max 25) (required)
|
|
71
|
+
:type tracking_ids: str
|
|
72
|
+
:param _request_timeout: timeout setting for this request. If one
|
|
73
|
+
number provided, it will be total request
|
|
74
|
+
timeout. It can also be a pair (tuple) of
|
|
75
|
+
(connection, read) timeouts.
|
|
76
|
+
:type _request_timeout: int, tuple(int, int), optional
|
|
77
|
+
:param _request_auth: set to override the auth_settings for an a single
|
|
78
|
+
request; this effectively ignores the
|
|
79
|
+
authentication in the spec for a single request.
|
|
80
|
+
:type _request_auth: dict, optional
|
|
81
|
+
:param _content_type: force content-type for the request.
|
|
82
|
+
:type _content_type: str, Optional
|
|
83
|
+
:param _headers: set to override the headers for a single
|
|
84
|
+
request; this effectively ignores the headers
|
|
85
|
+
in the spec for a single request.
|
|
86
|
+
:type _headers: dict, optional
|
|
87
|
+
:param _host_index: set to override the host_index for a single
|
|
88
|
+
request; this effectively ignores the host_index
|
|
89
|
+
in the spec for a single request.
|
|
90
|
+
:type _host_index: int, optional
|
|
91
|
+
:return: Returns the result object.
|
|
92
|
+
""" # noqa: E501
|
|
93
|
+
|
|
94
|
+
_param = self._logs_get_delivery_status_serialize(
|
|
95
|
+
tracking_ids=tracking_ids,
|
|
96
|
+
_request_auth=_request_auth,
|
|
97
|
+
_content_type=_content_type,
|
|
98
|
+
_headers=_headers,
|
|
99
|
+
_host_index=_host_index
|
|
100
|
+
)
|
|
101
|
+
|
|
102
|
+
_response_types_map: Dict[str, Optional[str]] = {
|
|
103
|
+
'200': "LogsDeliveryStatusResponse",
|
|
104
|
+
'400': "ApiErrorResponse",
|
|
105
|
+
'401': None,
|
|
106
|
+
'402': "ApiErrorResponse",
|
|
107
|
+
'500': None,
|
|
108
|
+
'502': "ApiErrorResponse",
|
|
109
|
+
}
|
|
110
|
+
response_data = await self.api_client.call_api(
|
|
111
|
+
*_param,
|
|
112
|
+
_request_timeout=_request_timeout
|
|
113
|
+
)
|
|
114
|
+
await response_data.read()
|
|
115
|
+
return self.api_client.response_deserialize(
|
|
116
|
+
response_data=response_data,
|
|
117
|
+
response_types_map=_response_types_map,
|
|
118
|
+
).data
|
|
119
|
+
|
|
120
|
+
|
|
121
|
+
@validate_call
|
|
122
|
+
async def logs_get_delivery_status_with_http_info(
|
|
123
|
+
self,
|
|
124
|
+
tracking_ids: Annotated[StrictStr, Field(description="Comma-separated tracking IDs (URL encoded, max 25)")],
|
|
125
|
+
_request_timeout: Union[
|
|
126
|
+
None,
|
|
127
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
128
|
+
Tuple[
|
|
129
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
130
|
+
Annotated[StrictFloat, Field(gt=0)]
|
|
131
|
+
]
|
|
132
|
+
] = None,
|
|
133
|
+
_request_auth: Optional[Dict[StrictStr, Any]] = None,
|
|
134
|
+
_content_type: Optional[StrictStr] = None,
|
|
135
|
+
_headers: Optional[Dict[StrictStr, Any]] = None,
|
|
136
|
+
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
|
|
137
|
+
) -> ApiResponse[LogsDeliveryStatusResponse]:
|
|
138
|
+
"""Look up email and SMS delivery status for up to 25 tracking IDs. Each entry is the tracking id, channel (EMAIL or SMS), status, and the time that status was recorded. The result does not include recipients, phone numbers, user ids, request bodies, IP addresses, account ids, or user-agent data. Unknown tracking ids are omitted. Other channels are not included.
|
|
139
|
+
|
|
140
|
+
|
|
141
|
+
:param tracking_ids: Comma-separated tracking IDs (URL encoded, max 25) (required)
|
|
142
|
+
:type tracking_ids: str
|
|
143
|
+
:param _request_timeout: timeout setting for this request. If one
|
|
144
|
+
number provided, it will be total request
|
|
145
|
+
timeout. It can also be a pair (tuple) of
|
|
146
|
+
(connection, read) timeouts.
|
|
147
|
+
:type _request_timeout: int, tuple(int, int), optional
|
|
148
|
+
:param _request_auth: set to override the auth_settings for an a single
|
|
149
|
+
request; this effectively ignores the
|
|
150
|
+
authentication in the spec for a single request.
|
|
151
|
+
:type _request_auth: dict, optional
|
|
152
|
+
:param _content_type: force content-type for the request.
|
|
153
|
+
:type _content_type: str, Optional
|
|
154
|
+
:param _headers: set to override the headers for a single
|
|
155
|
+
request; this effectively ignores the headers
|
|
156
|
+
in the spec for a single request.
|
|
157
|
+
:type _headers: dict, optional
|
|
158
|
+
:param _host_index: set to override the host_index for a single
|
|
159
|
+
request; this effectively ignores the host_index
|
|
160
|
+
in the spec for a single request.
|
|
161
|
+
:type _host_index: int, optional
|
|
162
|
+
:return: Returns the result object.
|
|
163
|
+
""" # noqa: E501
|
|
164
|
+
|
|
165
|
+
_param = self._logs_get_delivery_status_serialize(
|
|
166
|
+
tracking_ids=tracking_ids,
|
|
167
|
+
_request_auth=_request_auth,
|
|
168
|
+
_content_type=_content_type,
|
|
169
|
+
_headers=_headers,
|
|
170
|
+
_host_index=_host_index
|
|
171
|
+
)
|
|
172
|
+
|
|
173
|
+
_response_types_map: Dict[str, Optional[str]] = {
|
|
174
|
+
'200': "LogsDeliveryStatusResponse",
|
|
175
|
+
'400': "ApiErrorResponse",
|
|
176
|
+
'401': None,
|
|
177
|
+
'402': "ApiErrorResponse",
|
|
178
|
+
'500': None,
|
|
179
|
+
'502': "ApiErrorResponse",
|
|
180
|
+
}
|
|
181
|
+
response_data = await self.api_client.call_api(
|
|
182
|
+
*_param,
|
|
183
|
+
_request_timeout=_request_timeout
|
|
184
|
+
)
|
|
185
|
+
await response_data.read()
|
|
186
|
+
return self.api_client.response_deserialize(
|
|
187
|
+
response_data=response_data,
|
|
188
|
+
response_types_map=_response_types_map,
|
|
189
|
+
)
|
|
190
|
+
|
|
191
|
+
|
|
192
|
+
@validate_call
|
|
193
|
+
async def logs_get_delivery_status_without_preload_content(
|
|
194
|
+
self,
|
|
195
|
+
tracking_ids: Annotated[StrictStr, Field(description="Comma-separated tracking IDs (URL encoded, max 25)")],
|
|
196
|
+
_request_timeout: Union[
|
|
197
|
+
None,
|
|
198
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
199
|
+
Tuple[
|
|
200
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
201
|
+
Annotated[StrictFloat, Field(gt=0)]
|
|
202
|
+
]
|
|
203
|
+
] = None,
|
|
204
|
+
_request_auth: Optional[Dict[StrictStr, Any]] = None,
|
|
205
|
+
_content_type: Optional[StrictStr] = None,
|
|
206
|
+
_headers: Optional[Dict[StrictStr, Any]] = None,
|
|
207
|
+
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
|
|
208
|
+
) -> RESTResponseType:
|
|
209
|
+
"""Look up email and SMS delivery status for up to 25 tracking IDs. Each entry is the tracking id, channel (EMAIL or SMS), status, and the time that status was recorded. The result does not include recipients, phone numbers, user ids, request bodies, IP addresses, account ids, or user-agent data. Unknown tracking ids are omitted. Other channels are not included.
|
|
210
|
+
|
|
211
|
+
|
|
212
|
+
:param tracking_ids: Comma-separated tracking IDs (URL encoded, max 25) (required)
|
|
213
|
+
:type tracking_ids: str
|
|
214
|
+
:param _request_timeout: timeout setting for this request. If one
|
|
215
|
+
number provided, it will be total request
|
|
216
|
+
timeout. It can also be a pair (tuple) of
|
|
217
|
+
(connection, read) timeouts.
|
|
218
|
+
:type _request_timeout: int, tuple(int, int), optional
|
|
219
|
+
:param _request_auth: set to override the auth_settings for an a single
|
|
220
|
+
request; this effectively ignores the
|
|
221
|
+
authentication in the spec for a single request.
|
|
222
|
+
:type _request_auth: dict, optional
|
|
223
|
+
:param _content_type: force content-type for the request.
|
|
224
|
+
:type _content_type: str, Optional
|
|
225
|
+
:param _headers: set to override the headers for a single
|
|
226
|
+
request; this effectively ignores the headers
|
|
227
|
+
in the spec for a single request.
|
|
228
|
+
:type _headers: dict, optional
|
|
229
|
+
:param _host_index: set to override the host_index for a single
|
|
230
|
+
request; this effectively ignores the host_index
|
|
231
|
+
in the spec for a single request.
|
|
232
|
+
:type _host_index: int, optional
|
|
233
|
+
:return: Returns the result object.
|
|
234
|
+
""" # noqa: E501
|
|
235
|
+
|
|
236
|
+
_param = self._logs_get_delivery_status_serialize(
|
|
237
|
+
tracking_ids=tracking_ids,
|
|
238
|
+
_request_auth=_request_auth,
|
|
239
|
+
_content_type=_content_type,
|
|
240
|
+
_headers=_headers,
|
|
241
|
+
_host_index=_host_index
|
|
242
|
+
)
|
|
243
|
+
|
|
244
|
+
_response_types_map: Dict[str, Optional[str]] = {
|
|
245
|
+
'200': "LogsDeliveryStatusResponse",
|
|
246
|
+
'400': "ApiErrorResponse",
|
|
247
|
+
'401': None,
|
|
248
|
+
'402': "ApiErrorResponse",
|
|
249
|
+
'500': None,
|
|
250
|
+
'502': "ApiErrorResponse",
|
|
251
|
+
}
|
|
252
|
+
response_data = await self.api_client.call_api(
|
|
253
|
+
*_param,
|
|
254
|
+
_request_timeout=_request_timeout
|
|
255
|
+
)
|
|
256
|
+
return response_data.response
|
|
257
|
+
|
|
258
|
+
|
|
259
|
+
def _logs_get_delivery_status_serialize(
|
|
260
|
+
self,
|
|
261
|
+
tracking_ids,
|
|
262
|
+
_request_auth,
|
|
263
|
+
_content_type,
|
|
264
|
+
_headers,
|
|
265
|
+
_host_index,
|
|
266
|
+
) -> RequestSerialized:
|
|
267
|
+
|
|
268
|
+
_host = None
|
|
269
|
+
|
|
270
|
+
_collection_formats: Dict[str, str] = {
|
|
271
|
+
}
|
|
272
|
+
|
|
273
|
+
_path_params: Dict[str, str] = {}
|
|
274
|
+
_query_params: List[Tuple[str, str]] = []
|
|
275
|
+
_header_params: Dict[str, Optional[str]] = _headers or {}
|
|
276
|
+
_form_params: List[Tuple[str, str]] = []
|
|
277
|
+
_files: Dict[
|
|
278
|
+
str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]]
|
|
279
|
+
] = {}
|
|
280
|
+
_body_params: Optional[bytes] = None
|
|
281
|
+
|
|
282
|
+
# process the path parameters
|
|
283
|
+
if tracking_ids is not None:
|
|
284
|
+
_path_params['trackingIds'] = tracking_ids
|
|
285
|
+
# process the query parameters
|
|
286
|
+
# process the header parameters
|
|
287
|
+
# process the form parameters
|
|
288
|
+
# process the body parameter
|
|
289
|
+
|
|
290
|
+
|
|
291
|
+
# set the HTTP header `Accept`
|
|
292
|
+
if 'Accept' not in _header_params:
|
|
293
|
+
_header_params['Accept'] = self.api_client.select_header_accept(
|
|
294
|
+
[
|
|
295
|
+
'application/json'
|
|
296
|
+
]
|
|
297
|
+
)
|
|
298
|
+
|
|
299
|
+
|
|
300
|
+
# authentication setting
|
|
301
|
+
_auth_settings: List[str] = [
|
|
302
|
+
'endUserHashed',
|
|
303
|
+
'endUser',
|
|
304
|
+
'apiKey',
|
|
305
|
+
'clientCredentials'
|
|
306
|
+
]
|
|
307
|
+
|
|
308
|
+
return self.api_client.param_serialize(
|
|
309
|
+
method='GET',
|
|
310
|
+
resource_path='/logs/status/{trackingIds}',
|
|
311
|
+
path_params=_path_params,
|
|
312
|
+
query_params=_query_params,
|
|
313
|
+
header_params=_header_params,
|
|
314
|
+
body=_body_params,
|
|
315
|
+
post_params=_form_params,
|
|
316
|
+
files=_files,
|
|
317
|
+
auth_settings=_auth_settings,
|
|
318
|
+
collection_formats=_collection_formats,
|
|
319
|
+
_host=_host,
|
|
320
|
+
_request_auth=_request_auth
|
|
321
|
+
)
|
|
322
|
+
|
|
323
|
+
|
|
324
|
+
|
|
325
|
+
|
|
49
326
|
@validate_call
|
|
50
327
|
async def logs_get_log_retention(
|
|
51
328
|
self,
|
|
@@ -619,7 +896,7 @@ class LogsApi:
|
|
|
619
896
|
_headers: Optional[Dict[StrictStr, Any]] = None,
|
|
620
897
|
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
|
|
621
898
|
) -> LogsGetResponse:
|
|
622
|
-
"""Get logs by tracking IDs (comma-separated, max 25 IDs).
|
|
899
|
+
"""Get logs by tracking IDs (comma-separated, max 25 IDs). Returns full log objects with personally identifiable information (recipients, user ids, phone numbers, and request details). For a simple delivery check, use Get Delivery Status.
|
|
623
900
|
|
|
624
901
|
|
|
625
902
|
:param tracking_ids: Comma-separated tracking IDs (URL encoded) (required)
|
|
@@ -690,7 +967,7 @@ class LogsApi:
|
|
|
690
967
|
_headers: Optional[Dict[StrictStr, Any]] = None,
|
|
691
968
|
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
|
|
692
969
|
) -> ApiResponse[LogsGetResponse]:
|
|
693
|
-
"""Get logs by tracking IDs (comma-separated, max 25 IDs).
|
|
970
|
+
"""Get logs by tracking IDs (comma-separated, max 25 IDs). Returns full log objects with personally identifiable information (recipients, user ids, phone numbers, and request details). For a simple delivery check, use Get Delivery Status.
|
|
694
971
|
|
|
695
972
|
|
|
696
973
|
:param tracking_ids: Comma-separated tracking IDs (URL encoded) (required)
|
|
@@ -761,7 +1038,7 @@ class LogsApi:
|
|
|
761
1038
|
_headers: Optional[Dict[StrictStr, Any]] = None,
|
|
762
1039
|
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
|
|
763
1040
|
) -> RESTResponseType:
|
|
764
|
-
"""Get logs by tracking IDs (comma-separated, max 25 IDs).
|
|
1041
|
+
"""Get logs by tracking IDs (comma-separated, max 25 IDs). Returns full log objects with personally identifiable information (recipients, user ids, phone numbers, and request details). For a simple delivery check, use Get Delivery Status.
|
|
765
1042
|
|
|
766
1043
|
|
|
767
1044
|
:param tracking_ids: Comma-separated tracking IDs (URL encoded) (required)
|
pingram/api_client.py
CHANGED
|
@@ -91,7 +91,7 @@ class ApiClient:
|
|
|
91
91
|
self.default_headers[header_name] = header_value
|
|
92
92
|
self.cookie = cookie
|
|
93
93
|
# Set default User-Agent.
|
|
94
|
-
self.user_agent = 'pingram-python/1.0.
|
|
94
|
+
self.user_agent = 'pingram-python/1.0.39'
|
|
95
95
|
self.client_side_validation = configuration.client_side_validation
|
|
96
96
|
|
|
97
97
|
async def __aenter__(self):
|
pingram/configuration.py
CHANGED
|
@@ -551,7 +551,7 @@ conf = pingram.Configuration(
|
|
|
551
551
|
"OS: {env}\n"\
|
|
552
552
|
"Python Version: {pyversion}\n"\
|
|
553
553
|
"Version of the API: 1.0.0\n"\
|
|
554
|
-
"SDK Package Version: 1.0.
|
|
554
|
+
"SDK Package Version: 1.0.39".\
|
|
555
555
|
format(env=sys.platform, pyversion=sys.version)
|
|
556
556
|
|
|
557
557
|
def get_host_settings(self) -> List[HostSetting]:
|
pingram/models/__init__.py
CHANGED
|
@@ -198,6 +198,8 @@ from pingram.models.list_voice_calls_response import ListVoiceCallsResponse
|
|
|
198
198
|
from pingram.models.list_voice_calls_response_calls_inner import ListVoiceCallsResponseCallsInner
|
|
199
199
|
from pingram.models.log_query_post_body import LogQueryPostBody
|
|
200
200
|
from pingram.models.logs_bulk_request import LogsBulkRequest
|
|
201
|
+
from pingram.models.logs_delivery_status_response import LogsDeliveryStatusResponse
|
|
202
|
+
from pingram.models.logs_delivery_status_response_statuses_inner import LogsDeliveryStatusResponseStatusesInner
|
|
201
203
|
from pingram.models.logs_get_response import LogsGetResponse
|
|
202
204
|
from pingram.models.logs_get_response_logs_inner import LogsGetResponseLogsInner
|
|
203
205
|
from pingram.models.logs_query_response import LogsQueryResponse
|
|
@@ -0,0 +1,95 @@
|
|
|
1
|
+
# coding: utf-8
|
|
2
|
+
|
|
3
|
+
"""
|
|
4
|
+
Pingram
|
|
5
|
+
|
|
6
|
+
Internal API for notification delivery and management
|
|
7
|
+
|
|
8
|
+
The version of the OpenAPI document: 1.0.0
|
|
9
|
+
Generated by OpenAPI Generator (https://openapi-generator.tech)
|
|
10
|
+
|
|
11
|
+
Do not edit the class manually.
|
|
12
|
+
""" # noqa: E501
|
|
13
|
+
|
|
14
|
+
|
|
15
|
+
from __future__ import annotations
|
|
16
|
+
import pprint
|
|
17
|
+
import re # noqa: F401
|
|
18
|
+
import json
|
|
19
|
+
|
|
20
|
+
from pydantic import BaseModel, ConfigDict, Field
|
|
21
|
+
from typing import Any, ClassVar, Dict, List
|
|
22
|
+
from pingram.models.logs_delivery_status_response_statuses_inner import LogsDeliveryStatusResponseStatusesInner
|
|
23
|
+
from typing import Optional, Set
|
|
24
|
+
from typing_extensions import Self
|
|
25
|
+
|
|
26
|
+
class LogsDeliveryStatusResponse(BaseModel):
|
|
27
|
+
"""
|
|
28
|
+
Response type for GET /logs/status/{trackingIds}. Unknown tracking ids are omitted. A log that is still ingesting is omitted until it can be read.
|
|
29
|
+
""" # noqa: E501
|
|
30
|
+
statuses: List[LogsDeliveryStatusResponseStatusesInner] = Field(description="Delivery outcomes for the requested tracking ids.")
|
|
31
|
+
__properties: ClassVar[List[str]] = ["statuses"]
|
|
32
|
+
|
|
33
|
+
model_config = ConfigDict(
|
|
34
|
+
populate_by_name=True,
|
|
35
|
+
validate_assignment=True,
|
|
36
|
+
protected_namespaces=(),
|
|
37
|
+
)
|
|
38
|
+
|
|
39
|
+
|
|
40
|
+
def to_str(self) -> str:
|
|
41
|
+
"""Returns the string representation of the model using alias"""
|
|
42
|
+
return pprint.pformat(self.model_dump(by_alias=True))
|
|
43
|
+
|
|
44
|
+
def to_json(self) -> str:
|
|
45
|
+
"""Returns the JSON representation of the model using alias"""
|
|
46
|
+
# TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead
|
|
47
|
+
return json.dumps(self.to_dict())
|
|
48
|
+
|
|
49
|
+
@classmethod
|
|
50
|
+
def from_json(cls, json_str: str) -> Optional[Self]:
|
|
51
|
+
"""Create an instance of LogsDeliveryStatusResponse from a JSON string"""
|
|
52
|
+
return cls.from_dict(json.loads(json_str))
|
|
53
|
+
|
|
54
|
+
def to_dict(self) -> Dict[str, Any]:
|
|
55
|
+
"""Return the dictionary representation of the model using alias.
|
|
56
|
+
|
|
57
|
+
This has the following differences from calling pydantic's
|
|
58
|
+
`self.model_dump(by_alias=True)`:
|
|
59
|
+
|
|
60
|
+
* `None` is only added to the output dict for nullable fields that
|
|
61
|
+
were set at model initialization. Other fields with value `None`
|
|
62
|
+
are ignored.
|
|
63
|
+
"""
|
|
64
|
+
excluded_fields: Set[str] = set([
|
|
65
|
+
])
|
|
66
|
+
|
|
67
|
+
_dict = self.model_dump(
|
|
68
|
+
by_alias=True,
|
|
69
|
+
exclude=excluded_fields,
|
|
70
|
+
exclude_none=True,
|
|
71
|
+
)
|
|
72
|
+
# override the default output from pydantic by calling `to_dict()` of each item in statuses (list)
|
|
73
|
+
_items = []
|
|
74
|
+
if self.statuses:
|
|
75
|
+
for _item_statuses in self.statuses:
|
|
76
|
+
if _item_statuses:
|
|
77
|
+
_items.append(_item_statuses.to_dict())
|
|
78
|
+
_dict['statuses'] = _items
|
|
79
|
+
return _dict
|
|
80
|
+
|
|
81
|
+
@classmethod
|
|
82
|
+
def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]:
|
|
83
|
+
"""Create an instance of LogsDeliveryStatusResponse from a dict"""
|
|
84
|
+
if obj is None:
|
|
85
|
+
return None
|
|
86
|
+
|
|
87
|
+
if not isinstance(obj, dict):
|
|
88
|
+
return cls.model_validate(obj)
|
|
89
|
+
|
|
90
|
+
_obj = cls.model_validate({
|
|
91
|
+
"statuses": [LogsDeliveryStatusResponseStatusesInner.from_dict(_item) for _item in obj["statuses"]] if obj.get("statuses") is not None else None
|
|
92
|
+
})
|
|
93
|
+
return _obj
|
|
94
|
+
|
|
95
|
+
|
|
@@ -0,0 +1,110 @@
|
|
|
1
|
+
# coding: utf-8
|
|
2
|
+
|
|
3
|
+
"""
|
|
4
|
+
Pingram
|
|
5
|
+
|
|
6
|
+
Internal API for notification delivery and management
|
|
7
|
+
|
|
8
|
+
The version of the OpenAPI document: 1.0.0
|
|
9
|
+
Generated by OpenAPI Generator (https://openapi-generator.tech)
|
|
10
|
+
|
|
11
|
+
Do not edit the class manually.
|
|
12
|
+
""" # noqa: E501
|
|
13
|
+
|
|
14
|
+
|
|
15
|
+
from __future__ import annotations
|
|
16
|
+
import pprint
|
|
17
|
+
import re # noqa: F401
|
|
18
|
+
import json
|
|
19
|
+
|
|
20
|
+
from pydantic import BaseModel, ConfigDict, Field, StrictStr, field_validator
|
|
21
|
+
from typing import Any, ClassVar, Dict, List, Optional
|
|
22
|
+
from typing import Optional, Set
|
|
23
|
+
from typing_extensions import Self
|
|
24
|
+
|
|
25
|
+
class LogsDeliveryStatusResponseStatusesInner(BaseModel):
|
|
26
|
+
"""
|
|
27
|
+
One delivery outcome. Fields are limited to the tracking id, channel, status, and the time that status was recorded. `channel` is omitted when the outcome is for the whole request, before a channel was chosen.
|
|
28
|
+
""" # noqa: E501
|
|
29
|
+
tracking_id: StrictStr = Field(description="Opaque id returned when the notification was accepted.", alias="trackingId")
|
|
30
|
+
channel: Optional[StrictStr] = Field(default=None, description="Channel named on a delivery-status row. Email and SMS only. Coarse labels: no address or provider id.")
|
|
31
|
+
status: StrictStr = Field(description="Delivery outcome for one request or one channel. These are the same states shown in the dashboard status column.")
|
|
32
|
+
updated_at: StrictStr = Field(description="ISO 8601 time this outcome was recorded.", alias="updatedAt")
|
|
33
|
+
__properties: ClassVar[List[str]] = ["trackingId", "channel", "status", "updatedAt"]
|
|
34
|
+
|
|
35
|
+
@field_validator('channel')
|
|
36
|
+
def channel_validate_enum(cls, value):
|
|
37
|
+
"""Validates the enum"""
|
|
38
|
+
if value is None:
|
|
39
|
+
return value
|
|
40
|
+
|
|
41
|
+
if value not in set(['EMAIL', 'SMS']):
|
|
42
|
+
raise ValueError("must be one of enum values ('EMAIL', 'SMS')")
|
|
43
|
+
return value
|
|
44
|
+
|
|
45
|
+
@field_validator('status')
|
|
46
|
+
def status_validate_enum(cls, value):
|
|
47
|
+
"""Validates the enum"""
|
|
48
|
+
if value not in set(['PROCESSING', 'FAILED', 'IGNORED', 'SCHEDULED', 'UNSCHEDULED', 'BATCHED', 'SENT', 'DELIVERED', 'BOUNCED', 'COMPLAINT', 'THROTTLED', 'DEDUPLICATED', 'OPENED', 'CLICKED', 'INBOUND', 'AUTO_REPLY']):
|
|
49
|
+
raise ValueError("must be one of enum values ('PROCESSING', 'FAILED', 'IGNORED', 'SCHEDULED', 'UNSCHEDULED', 'BATCHED', 'SENT', 'DELIVERED', 'BOUNCED', 'COMPLAINT', 'THROTTLED', 'DEDUPLICATED', 'OPENED', 'CLICKED', 'INBOUND', 'AUTO_REPLY')")
|
|
50
|
+
return value
|
|
51
|
+
|
|
52
|
+
model_config = ConfigDict(
|
|
53
|
+
populate_by_name=True,
|
|
54
|
+
validate_assignment=True,
|
|
55
|
+
protected_namespaces=(),
|
|
56
|
+
)
|
|
57
|
+
|
|
58
|
+
|
|
59
|
+
def to_str(self) -> str:
|
|
60
|
+
"""Returns the string representation of the model using alias"""
|
|
61
|
+
return pprint.pformat(self.model_dump(by_alias=True))
|
|
62
|
+
|
|
63
|
+
def to_json(self) -> str:
|
|
64
|
+
"""Returns the JSON representation of the model using alias"""
|
|
65
|
+
# TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead
|
|
66
|
+
return json.dumps(self.to_dict())
|
|
67
|
+
|
|
68
|
+
@classmethod
|
|
69
|
+
def from_json(cls, json_str: str) -> Optional[Self]:
|
|
70
|
+
"""Create an instance of LogsDeliveryStatusResponseStatusesInner from a JSON string"""
|
|
71
|
+
return cls.from_dict(json.loads(json_str))
|
|
72
|
+
|
|
73
|
+
def to_dict(self) -> Dict[str, Any]:
|
|
74
|
+
"""Return the dictionary representation of the model using alias.
|
|
75
|
+
|
|
76
|
+
This has the following differences from calling pydantic's
|
|
77
|
+
`self.model_dump(by_alias=True)`:
|
|
78
|
+
|
|
79
|
+
* `None` is only added to the output dict for nullable fields that
|
|
80
|
+
were set at model initialization. Other fields with value `None`
|
|
81
|
+
are ignored.
|
|
82
|
+
"""
|
|
83
|
+
excluded_fields: Set[str] = set([
|
|
84
|
+
])
|
|
85
|
+
|
|
86
|
+
_dict = self.model_dump(
|
|
87
|
+
by_alias=True,
|
|
88
|
+
exclude=excluded_fields,
|
|
89
|
+
exclude_none=True,
|
|
90
|
+
)
|
|
91
|
+
return _dict
|
|
92
|
+
|
|
93
|
+
@classmethod
|
|
94
|
+
def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]:
|
|
95
|
+
"""Create an instance of LogsDeliveryStatusResponseStatusesInner from a dict"""
|
|
96
|
+
if obj is None:
|
|
97
|
+
return None
|
|
98
|
+
|
|
99
|
+
if not isinstance(obj, dict):
|
|
100
|
+
return cls.model_validate(obj)
|
|
101
|
+
|
|
102
|
+
_obj = cls.model_validate({
|
|
103
|
+
"trackingId": obj.get("trackingId"),
|
|
104
|
+
"channel": obj.get("channel"),
|
|
105
|
+
"status": obj.get("status"),
|
|
106
|
+
"updatedAt": obj.get("updatedAt")
|
|
107
|
+
})
|
|
108
|
+
return _obj
|
|
109
|
+
|
|
110
|
+
|
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
pingram/__init__.py,sha256=
|
|
2
|
-
pingram/api_client.py,sha256=
|
|
1
|
+
pingram/__init__.py,sha256=hcMlnlNkaCAqRP0KkDvlwwXFb8yP3xpZC2KmGLO9olw,51006
|
|
2
|
+
pingram/api_client.py,sha256=ILRY5UlJ_0vDl2nknV0joJ1mQXsHZZJxpNrgRclNa0I,27792
|
|
3
3
|
pingram/api_response.py,sha256=eMxw1mpmJcoGZ3gs9z6jM4oYoZ10Gjk333s9sKxGv7s,652
|
|
4
4
|
pingram/client_wrapper.py,sha256=sreT63NgmWEWLUzdYQWZTN0PneHhYITsfPTSjthCjqw,15358
|
|
5
|
-
pingram/configuration.py,sha256=
|
|
5
|
+
pingram/configuration.py,sha256=z7k31jmVQArQbzxmf0dAeXvhJKzDwz4PWcuSnN-7zmA,19466
|
|
6
6
|
pingram/exceptions.py,sha256=0l6B9dlFRwmPx-sfytj3wC9rdGgVPJY3AQ39qHx3GS4,8483
|
|
7
7
|
pingram/py.typed,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
8
8
|
pingram/rest.py,sha256=soB0_p6OMFlXrz5pDmdf2nIZchqPua9hgtuj8A5Yea4,6426
|
|
@@ -22,7 +22,7 @@ pingram/api/health_api.py,sha256=0c0CcuVQ2VaATvYlhjiIuGNuCygErc4oZjQUIRGoO-k,107
|
|
|
22
22
|
pingram/api/insights_api.py,sha256=SJcLUrd9PyU5WmMjo-RQPTfqA2XiH0GiBHFXMeg2i-o,12387
|
|
23
23
|
pingram/api/keys_api.py,sha256=sonPmnG5rfk80Gm2j-DQ_pdvbO3qMDPHwHjiO7UebTA,32790
|
|
24
24
|
pingram/api/library_api.py,sha256=CboFtuoW2ZaLTa3AIvIYzfcdu-0Hzq6XtbnoPpYZpDg,26055
|
|
25
|
-
pingram/api/logs_api.py,sha256=
|
|
25
|
+
pingram/api/logs_api.py,sha256=KATCoGigaQBkml8bNTK6Y2E9ku5sDxkJEx7CluHkZAk,89817
|
|
26
26
|
pingram/api/members_api.py,sha256=mo5TGL3TQMMcbHo24abKozxac0KseswMQMGN_8tZvSY,70113
|
|
27
27
|
pingram/api/numbers_api.py,sha256=2v0O4THsnhc0D1HV-JjPd1hufiUWbfIvSRW0TLB74QE,58330
|
|
28
28
|
pingram/api/profile_api.py,sha256=e-x3zcGCTwuS42Yra2-wzUWIjHx-6FM_rvoTK3Neer8,66434
|
|
@@ -36,7 +36,7 @@ pingram/api/user_api.py,sha256=333C444u7EnCowDoIRY6bogaoqlTf_exvM76xeM7QP4,33489
|
|
|
36
36
|
pingram/api/users_api.py,sha256=AERWQ8wGRve3TovcVBp9CamZOUV8lpjJb_P9HnsxV4g,37532
|
|
37
37
|
pingram/api/voice_api.py,sha256=ML4Xbnn64f47nkM7_Bn2kwvcvng_T4Nv1uLg6Jhd3-Y,125242
|
|
38
38
|
pingram/api/webhooks_api.py,sha256=U0CHXmPzK9W6U_ktArfZRHaArlhlUSyngeYXeg7NgCk,47863
|
|
39
|
-
pingram/models/__init__.py,sha256=
|
|
39
|
+
pingram/models/__init__.py,sha256=9JMV83tEf345jIlFdSWjiu57MCoQsqpEfcM48swFu9Q,27206
|
|
40
40
|
pingram/models/accept_invite_request.py,sha256=ZXIkBQFXWjD0g0Akfuz6CuWTWZ8AWpWXHfY8EMgo4XE,2443
|
|
41
41
|
pingram/models/accept_invite_response.py,sha256=R-fqCEzKwX1XxJscgtPSU7MUCeKGmuBkzh8fha-9KEM,2869
|
|
42
42
|
pingram/models/account_addresses_response.py,sha256=0nev-caxYCmHQHHTXSvpmrz6yYPx92UcB8Umzkt2RK8,3068
|
|
@@ -222,6 +222,8 @@ pingram/models/list_voice_calls_response.py,sha256=sDkEsyp4pr7WbVf29mxrPAA8yYNIK
|
|
|
222
222
|
pingram/models/list_voice_calls_response_calls_inner.py,sha256=ncBMGwHrTayeLJV6wSdJ4PC5fh4LptEJyHEzwIp3ouM,5996
|
|
223
223
|
pingram/models/log_query_post_body.py,sha256=ti396ju2KidR5YJTVczSHbIWpgr8--4XODJGIz3pyvQ,4090
|
|
224
224
|
pingram/models/logs_bulk_request.py,sha256=Gm7dbaWACc2MdKYYA-YhG3ZufTIkGSxdAdjVvItndDc,2511
|
|
225
|
+
pingram/models/logs_delivery_status_response.py,sha256=2cTd-8pcVRC6eBsWBOo3OBVUM5celfUdGkRYGMt8gT0,3269
|
|
226
|
+
pingram/models/logs_delivery_status_response_statuses_inner.py,sha256=iKEIcJ-OD1Kz2gxO3b7ZMcOkjST_G_Zs3p1RCj72YZA,4362
|
|
225
227
|
pingram/models/logs_get_response.py,sha256=AqWy0tdIKLgtSDA6dL6Yzv4sfFhv2co0JxjEsW4Sn9c,2962
|
|
226
228
|
pingram/models/logs_get_response_logs_inner.py,sha256=OmVLA0zeVaD1clmenTglh96s9R5PAD-fI-ibgGxGmVk,44962
|
|
227
229
|
pingram/models/logs_query_response.py,sha256=ym1yEiQUcc_1Y72Fqbqb2z9MmCUY2wB9Yk3fY_rQhlQ,2493
|
|
@@ -342,8 +344,8 @@ pingram/models/webhook_endpoints_response_endpoints_inner.py,sha256=CGjdTpATE7lC
|
|
|
342
344
|
pingram/models/webhook_event.py,sha256=Njpdjk6KdTvoXl-WYEOuQhFcuZcs3vPHCfYeoclo6aQ,7262
|
|
343
345
|
pingram/models/webhook_event_usage_value.py,sha256=6oTIeL15GY-JTn_2x8304bz-9Av66OEVMH5ukHKFgjM,2770
|
|
344
346
|
pingram/models/webhook_response.py,sha256=rwCh3OTCE3TK6tVEKOKVlq9w0b1fZ-fKKEoe9Tz0tIc,3233
|
|
345
|
-
pingram_python-1.0.
|
|
346
|
-
pingram_python-1.0.
|
|
347
|
-
pingram_python-1.0.
|
|
348
|
-
pingram_python-1.0.
|
|
349
|
-
pingram_python-1.0.
|
|
347
|
+
pingram_python-1.0.39.dist-info/licenses/LICENSE,sha256=jFcP99OXuZ-3f_86j4Q4OjmvvHNm7SG94ytcAhqvldk,1059
|
|
348
|
+
pingram_python-1.0.39.dist-info/METADATA,sha256=lf8AhNbkBq4EbsR_QpQsoIoF_m3G2oXeh-mhqDCtbBE,2268
|
|
349
|
+
pingram_python-1.0.39.dist-info/WHEEL,sha256=YVMoNqKzERt-wjUZwJ33xBGAwnFl-4cqbYkTtWa4itE,91
|
|
350
|
+
pingram_python-1.0.39.dist-info/top_level.txt,sha256=6BmMatn4_wswGo1u11HkRU892yP2gG5dddsmmRhSjD8,8
|
|
351
|
+
pingram_python-1.0.39.dist-info/RECORD,,
|
|
File without changes
|
|
File without changes
|
|
File without changes
|