one-msg-sdk 1.0.0__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.
Files changed (85) hide show
  1. one_msg_sdk/__init__.py +189 -0
  2. one_msg_sdk/api/__init__.py +14 -0
  3. one_msg_sdk/api/calling_api.py +901 -0
  4. one_msg_sdk/api/catalog_api.py +607 -0
  5. one_msg_sdk/api/channel_api.py +874 -0
  6. one_msg_sdk/api/flows_api.py +3212 -0
  7. one_msg_sdk/api/groups_api.py +1935 -0
  8. one_msg_sdk/api/messaging_api.py +7419 -0
  9. one_msg_sdk/api/profile_api.py +609 -0
  10. one_msg_sdk/api/templates_api.py +1180 -0
  11. one_msg_sdk/api/users_api.py +903 -0
  12. one_msg_sdk/api/webhooks_api.py +605 -0
  13. one_msg_sdk/api_client.py +805 -0
  14. one_msg_sdk/api_response.py +21 -0
  15. one_msg_sdk/configuration.py +635 -0
  16. one_msg_sdk/exceptions.py +219 -0
  17. one_msg_sdk/models/__init__.py +78 -0
  18. one_msg_sdk/models/add_template_request.py +108 -0
  19. one_msg_sdk/models/block_user_request.py +102 -0
  20. one_msg_sdk/models/conversational_automation.py +115 -0
  21. one_msg_sdk/models/conversational_automation_commands_inner.py +105 -0
  22. one_msg_sdk/models/create_commerce200_response.py +102 -0
  23. one_msg_sdk/models/create_commerce_request.py +106 -0
  24. one_msg_sdk/models/create_commerce_request_params.py +104 -0
  25. one_msg_sdk/models/create_groups200_response.py +107 -0
  26. one_msg_sdk/models/create_read_message200_response.py +102 -0
  27. one_msg_sdk/models/create_read_message401_response.py +89 -0
  28. one_msg_sdk/models/create_read_message_request.py +93 -0
  29. one_msg_sdk/models/delete_flows_flow_id200_response.py +109 -0
  30. one_msg_sdk/models/delete_groups_group_id200_response.py +104 -0
  31. one_msg_sdk/models/delete_media_legacy_request.py +102 -0
  32. one_msg_sdk/models/error_response.py +89 -0
  33. one_msg_sdk/models/get_commerce200_response_inner.py +106 -0
  34. one_msg_sdk/models/get_mm_lite_status200_response.py +106 -0
  35. one_msg_sdk/models/get_webhook200_response.py +102 -0
  36. one_msg_sdk/models/get_whatsapp_business_encryption200_response.py +116 -0
  37. one_msg_sdk/models/list_blocked_users200_response.py +102 -0
  38. one_msg_sdk/models/list_flows200_response.py +115 -0
  39. one_msg_sdk/models/list_messages200_response.py +104 -0
  40. one_msg_sdk/models/list_templates200_response.py +106 -0
  41. one_msg_sdk/models/message_sent_response.py +108 -0
  42. one_msg_sdk/models/patch_flows_flow_id_assets200_response.py +111 -0
  43. one_msg_sdk/models/profile_info.py +126 -0
  44. one_msg_sdk/models/retrieve_media200_response.py +110 -0
  45. one_msg_sdk/models/send_address_message_request.py +126 -0
  46. one_msg_sdk/models/send_button_request.py +103 -0
  47. one_msg_sdk/models/send_button_request_sections_inner.py +95 -0
  48. one_msg_sdk/models/send_button_request_sections_inner_reply.py +91 -0
  49. one_msg_sdk/models/send_carousel_request1.py +97 -0
  50. one_msg_sdk/models/send_contact_request.py +99 -0
  51. one_msg_sdk/models/send_contact_request_contacts_inner.py +117 -0
  52. one_msg_sdk/models/send_contact_request_contacts_inner_name.py +99 -0
  53. one_msg_sdk/models/send_contact_request_contacts_inner_org.py +93 -0
  54. one_msg_sdk/models/send_contact_request_contacts_inner_phones_inner.py +93 -0
  55. one_msg_sdk/models/send_cta_url_request.py +116 -0
  56. one_msg_sdk/models/send_file_request.py +129 -0
  57. one_msg_sdk/models/send_flow_request1.py +141 -0
  58. one_msg_sdk/models/send_flow_request1_header.py +144 -0
  59. one_msg_sdk/models/send_flow_request_header.py +144 -0
  60. one_msg_sdk/models/send_list_request.py +105 -0
  61. one_msg_sdk/models/send_list_request_sections_inner.py +99 -0
  62. one_msg_sdk/models/send_list_request_sections_inner_rows_inner.py +93 -0
  63. one_msg_sdk/models/send_location_request1.py +101 -0
  64. one_msg_sdk/models/send_location_request_request.py +91 -0
  65. one_msg_sdk/models/send_message_request.py +122 -0
  66. one_msg_sdk/models/send_order_details_request.py +128 -0
  67. one_msg_sdk/models/send_order_details_request_language.py +104 -0
  68. one_msg_sdk/models/send_order_details_request_order.py +124 -0
  69. one_msg_sdk/models/send_order_details_request_order_items_inner.py +112 -0
  70. one_msg_sdk/models/send_order_details_request_order_items_inner_amount.py +104 -0
  71. one_msg_sdk/models/send_payment_request_request.py +117 -0
  72. one_msg_sdk/models/send_reaction_request.py +93 -0
  73. one_msg_sdk/models/send_sticker_request.py +110 -0
  74. one_msg_sdk/models/send_template_request.py +107 -0
  75. one_msg_sdk/models/send_template_request_language.py +91 -0
  76. one_msg_sdk/models/set_whatsapp_business_encryption_request.py +89 -0
  77. one_msg_sdk/models/success_response.py +102 -0
  78. one_msg_sdk/models/update_me_request.py +114 -0
  79. one_msg_sdk/py.typed +0 -0
  80. one_msg_sdk/rest.py +264 -0
  81. one_msg_sdk-1.0.0.dist-info/METADATA +19 -0
  82. one_msg_sdk-1.0.0.dist-info/RECORD +85 -0
  83. one_msg_sdk-1.0.0.dist-info/WHEEL +5 -0
  84. one_msg_sdk-1.0.0.dist-info/licenses/LICENSE +21 -0
  85. one_msg_sdk-1.0.0.dist-info/top_level.txt +1 -0
@@ -0,0 +1,609 @@
1
+ """
2
+ 1MSG WhatsApp Business API (Public)
3
+
4
+ Public client API for sending messages, managing groups, flows, and templates. This is the API exposed to end customers via platform.1msg.io **Authentication:** All requests require `token` query parameter with JWT or API key. **Documentation:** https://help.1msg.io/platform-1msg/getting-start/quick-start **API Docs:** https://docs.1msg.io/
5
+
6
+ The version of the OpenAPI document: 1.0.0
7
+ Contact: support@1msg.io
8
+ Generated by OpenAPI Generator (https://openapi-generator.tech)
9
+
10
+ Do not edit the class manually.
11
+ """ # noqa: E501
12
+
13
+
14
+ import warnings
15
+ from pydantic import validate_call, Field, StrictFloat, StrictStr, StrictInt
16
+ from typing import Any, Dict, List, Optional, Tuple, Union
17
+ from typing_extensions import Annotated
18
+
19
+ from pydantic import Field, StrictStr
20
+ from typing import Any, Dict, Optional
21
+ from typing_extensions import Annotated
22
+ from one_msg_sdk.models.profile_info import ProfileInfo
23
+ from one_msg_sdk.models.update_me_request import UpdateMeRequest
24
+
25
+ from one_msg_sdk.api_client import ApiClient, RequestSerialized
26
+ from one_msg_sdk.api_response import ApiResponse
27
+ from one_msg_sdk.rest import RESTResponseType
28
+
29
+
30
+ class ProfileApi:
31
+ """NOTE: This class is auto generated by OpenAPI Generator
32
+ Ref: https://openapi-generator.tech
33
+
34
+ Do not edit the class manually.
35
+ """
36
+
37
+ def __init__(self, api_client=None) -> None:
38
+ if api_client is None:
39
+ api_client = ApiClient.get_default()
40
+ self.api_client = api_client
41
+
42
+
43
+ @validate_call
44
+ def get_me(
45
+ self,
46
+ token: Annotated[StrictStr, Field(description="JWT token or API key for authorization")],
47
+ _request_timeout: Union[
48
+ None,
49
+ Annotated[StrictFloat, Field(gt=0)],
50
+ Tuple[
51
+ Annotated[StrictFloat, Field(gt=0)],
52
+ Annotated[StrictFloat, Field(gt=0)]
53
+ ]
54
+ ] = None,
55
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
56
+ _content_type: Optional[StrictStr] = None,
57
+ _headers: Optional[Dict[StrictStr, Any]] = None,
58
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
59
+ ) -> ProfileInfo:
60
+ """Get Profile Info
61
+
62
+ Get WhatsApp Business Account profile information
63
+
64
+ :param token: JWT token or API key for authorization (required)
65
+ :type token: str
66
+ :param _request_timeout: timeout setting for this request. If one
67
+ number provided, it will be total request
68
+ timeout. It can also be a pair (tuple) of
69
+ (connection, read) timeouts.
70
+ :type _request_timeout: int, tuple(int, int), optional
71
+ :param _request_auth: set to override the auth_settings for an a single
72
+ request; this effectively ignores the
73
+ authentication in the spec for a single request.
74
+ :type _request_auth: dict, optional
75
+ :param _content_type: force content-type for the request.
76
+ :type _content_type: str, Optional
77
+ :param _headers: set to override the headers for a single
78
+ request; this effectively ignores the headers
79
+ in the spec for a single request.
80
+ :type _headers: dict, optional
81
+ :param _host_index: set to override the host_index for a single
82
+ request; this effectively ignores the host_index
83
+ in the spec for a single request.
84
+ :type _host_index: int, optional
85
+ :return: Returns the result object.
86
+ """ # noqa: E501
87
+
88
+ _param = self._get_me_serialize(
89
+ token=token,
90
+ _request_auth=_request_auth,
91
+ _content_type=_content_type,
92
+ _headers=_headers,
93
+ _host_index=_host_index
94
+ )
95
+
96
+ _response_types_map: Dict[str, Optional[str]] = {
97
+ '200': "ProfileInfo",
98
+ '401': "ErrorResponse",
99
+ '500': "ErrorResponse",
100
+ }
101
+ response_data = self.api_client.call_api(
102
+ *_param,
103
+ _request_timeout=_request_timeout
104
+ )
105
+ response_data.read()
106
+ return self.api_client.response_deserialize(
107
+ response_data=response_data,
108
+ response_types_map=_response_types_map,
109
+ ).data
110
+
111
+
112
+ @validate_call
113
+ def get_me_with_http_info(
114
+ self,
115
+ token: Annotated[StrictStr, Field(description="JWT token or API key for authorization")],
116
+ _request_timeout: Union[
117
+ None,
118
+ Annotated[StrictFloat, Field(gt=0)],
119
+ Tuple[
120
+ Annotated[StrictFloat, Field(gt=0)],
121
+ Annotated[StrictFloat, Field(gt=0)]
122
+ ]
123
+ ] = None,
124
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
125
+ _content_type: Optional[StrictStr] = None,
126
+ _headers: Optional[Dict[StrictStr, Any]] = None,
127
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
128
+ ) -> ApiResponse[ProfileInfo]:
129
+ """Get Profile Info
130
+
131
+ Get WhatsApp Business Account profile information
132
+
133
+ :param token: JWT token or API key for authorization (required)
134
+ :type token: str
135
+ :param _request_timeout: timeout setting for this request. If one
136
+ number provided, it will be total request
137
+ timeout. It can also be a pair (tuple) of
138
+ (connection, read) timeouts.
139
+ :type _request_timeout: int, tuple(int, int), optional
140
+ :param _request_auth: set to override the auth_settings for an a single
141
+ request; this effectively ignores the
142
+ authentication in the spec for a single request.
143
+ :type _request_auth: dict, optional
144
+ :param _content_type: force content-type for the request.
145
+ :type _content_type: str, Optional
146
+ :param _headers: set to override the headers for a single
147
+ request; this effectively ignores the headers
148
+ in the spec for a single request.
149
+ :type _headers: dict, optional
150
+ :param _host_index: set to override the host_index for a single
151
+ request; this effectively ignores the host_index
152
+ in the spec for a single request.
153
+ :type _host_index: int, optional
154
+ :return: Returns the result object.
155
+ """ # noqa: E501
156
+
157
+ _param = self._get_me_serialize(
158
+ token=token,
159
+ _request_auth=_request_auth,
160
+ _content_type=_content_type,
161
+ _headers=_headers,
162
+ _host_index=_host_index
163
+ )
164
+
165
+ _response_types_map: Dict[str, Optional[str]] = {
166
+ '200': "ProfileInfo",
167
+ '401': "ErrorResponse",
168
+ '500': "ErrorResponse",
169
+ }
170
+ response_data = self.api_client.call_api(
171
+ *_param,
172
+ _request_timeout=_request_timeout
173
+ )
174
+ response_data.read()
175
+ return self.api_client.response_deserialize(
176
+ response_data=response_data,
177
+ response_types_map=_response_types_map,
178
+ )
179
+
180
+
181
+ @validate_call
182
+ def get_me_without_preload_content(
183
+ self,
184
+ token: Annotated[StrictStr, Field(description="JWT token or API key for authorization")],
185
+ _request_timeout: Union[
186
+ None,
187
+ Annotated[StrictFloat, Field(gt=0)],
188
+ Tuple[
189
+ Annotated[StrictFloat, Field(gt=0)],
190
+ Annotated[StrictFloat, Field(gt=0)]
191
+ ]
192
+ ] = None,
193
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
194
+ _content_type: Optional[StrictStr] = None,
195
+ _headers: Optional[Dict[StrictStr, Any]] = None,
196
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
197
+ ) -> RESTResponseType:
198
+ """Get Profile Info
199
+
200
+ Get WhatsApp Business Account profile information
201
+
202
+ :param token: JWT token or API key for authorization (required)
203
+ :type token: str
204
+ :param _request_timeout: timeout setting for this request. If one
205
+ number provided, it will be total request
206
+ timeout. It can also be a pair (tuple) of
207
+ (connection, read) timeouts.
208
+ :type _request_timeout: int, tuple(int, int), optional
209
+ :param _request_auth: set to override the auth_settings for an a single
210
+ request; this effectively ignores the
211
+ authentication in the spec for a single request.
212
+ :type _request_auth: dict, optional
213
+ :param _content_type: force content-type for the request.
214
+ :type _content_type: str, Optional
215
+ :param _headers: set to override the headers for a single
216
+ request; this effectively ignores the headers
217
+ in the spec for a single request.
218
+ :type _headers: dict, optional
219
+ :param _host_index: set to override the host_index for a single
220
+ request; this effectively ignores the host_index
221
+ in the spec for a single request.
222
+ :type _host_index: int, optional
223
+ :return: Returns the result object.
224
+ """ # noqa: E501
225
+
226
+ _param = self._get_me_serialize(
227
+ token=token,
228
+ _request_auth=_request_auth,
229
+ _content_type=_content_type,
230
+ _headers=_headers,
231
+ _host_index=_host_index
232
+ )
233
+
234
+ _response_types_map: Dict[str, Optional[str]] = {
235
+ '200': "ProfileInfo",
236
+ '401': "ErrorResponse",
237
+ '500': "ErrorResponse",
238
+ }
239
+ response_data = self.api_client.call_api(
240
+ *_param,
241
+ _request_timeout=_request_timeout
242
+ )
243
+ return response_data.response
244
+
245
+
246
+ def _get_me_serialize(
247
+ self,
248
+ token,
249
+ _request_auth,
250
+ _content_type,
251
+ _headers,
252
+ _host_index,
253
+ ) -> RequestSerialized:
254
+
255
+ _host = None
256
+
257
+ _collection_formats: Dict[str, str] = {
258
+ }
259
+
260
+ _path_params: Dict[str, str] = {}
261
+ _query_params: List[Tuple[str, str]] = []
262
+ _header_params: Dict[str, Optional[str]] = _headers or {}
263
+ _form_params: List[Tuple[str, str]] = []
264
+ _files: Dict[
265
+ str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]]
266
+ ] = {}
267
+ _body_params: Optional[bytes] = None
268
+
269
+ # process the path parameters
270
+ # process the query parameters
271
+ if token is not None:
272
+
273
+ _query_params.append(('token', token))
274
+
275
+ # process the header parameters
276
+ # process the form parameters
277
+ # process the body parameter
278
+
279
+
280
+ # set the HTTP header `Accept`
281
+ if 'Accept' not in _header_params:
282
+ _header_params['Accept'] = self.api_client.select_header_accept(
283
+ [
284
+ 'application/json'
285
+ ]
286
+ )
287
+
288
+
289
+ # authentication setting
290
+ _auth_settings: List[str] = [
291
+ 'tokenAuth'
292
+ ]
293
+
294
+ return self.api_client.param_serialize(
295
+ method='GET',
296
+ resource_path='/me',
297
+ path_params=_path_params,
298
+ query_params=_query_params,
299
+ header_params=_header_params,
300
+ body=_body_params,
301
+ post_params=_form_params,
302
+ files=_files,
303
+ auth_settings=_auth_settings,
304
+ collection_formats=_collection_formats,
305
+ _host=_host,
306
+ _request_auth=_request_auth
307
+ )
308
+
309
+
310
+
311
+
312
+ @validate_call
313
+ def update_me(
314
+ self,
315
+ token: Annotated[StrictStr, Field(description="JWT token or API key for authorization")],
316
+ update_me_request: Optional[UpdateMeRequest] = None,
317
+ _request_timeout: Union[
318
+ None,
319
+ Annotated[StrictFloat, Field(gt=0)],
320
+ Tuple[
321
+ Annotated[StrictFloat, Field(gt=0)],
322
+ Annotated[StrictFloat, Field(gt=0)]
323
+ ]
324
+ ] = None,
325
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
326
+ _content_type: Optional[StrictStr] = None,
327
+ _headers: Optional[Dict[StrictStr, Any]] = None,
328
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
329
+ ) -> Dict[str, object]:
330
+ """Update profile info
331
+
332
+ Update WhatsApp Business Account profile fields. At least one of about, description, email, photo, address, vertical, websites is required. Blocked when the channel subscription limit is exceeded.
333
+
334
+ :param token: JWT token or API key for authorization (required)
335
+ :type token: str
336
+ :param update_me_request:
337
+ :type update_me_request: UpdateMeRequest
338
+ :param _request_timeout: timeout setting for this request. If one
339
+ number provided, it will be total request
340
+ timeout. It can also be a pair (tuple) of
341
+ (connection, read) timeouts.
342
+ :type _request_timeout: int, tuple(int, int), optional
343
+ :param _request_auth: set to override the auth_settings for an a single
344
+ request; this effectively ignores the
345
+ authentication in the spec for a single request.
346
+ :type _request_auth: dict, optional
347
+ :param _content_type: force content-type for the request.
348
+ :type _content_type: str, Optional
349
+ :param _headers: set to override the headers for a single
350
+ request; this effectively ignores the headers
351
+ in the spec for a single request.
352
+ :type _headers: dict, optional
353
+ :param _host_index: set to override the host_index for a single
354
+ request; this effectively ignores the host_index
355
+ in the spec for a single request.
356
+ :type _host_index: int, optional
357
+ :return: Returns the result object.
358
+ """ # noqa: E501
359
+
360
+ _param = self._update_me_serialize(
361
+ token=token,
362
+ update_me_request=update_me_request,
363
+ _request_auth=_request_auth,
364
+ _content_type=_content_type,
365
+ _headers=_headers,
366
+ _host_index=_host_index
367
+ )
368
+
369
+ _response_types_map: Dict[str, Optional[str]] = {
370
+ '200': "Dict[str, object]",
371
+ '401': "ErrorResponse",
372
+ '422': "ErrorResponse",
373
+ '500': "ErrorResponse",
374
+ }
375
+ response_data = self.api_client.call_api(
376
+ *_param,
377
+ _request_timeout=_request_timeout
378
+ )
379
+ response_data.read()
380
+ return self.api_client.response_deserialize(
381
+ response_data=response_data,
382
+ response_types_map=_response_types_map,
383
+ ).data
384
+
385
+
386
+ @validate_call
387
+ def update_me_with_http_info(
388
+ self,
389
+ token: Annotated[StrictStr, Field(description="JWT token or API key for authorization")],
390
+ update_me_request: Optional[UpdateMeRequest] = None,
391
+ _request_timeout: Union[
392
+ None,
393
+ Annotated[StrictFloat, Field(gt=0)],
394
+ Tuple[
395
+ Annotated[StrictFloat, Field(gt=0)],
396
+ Annotated[StrictFloat, Field(gt=0)]
397
+ ]
398
+ ] = None,
399
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
400
+ _content_type: Optional[StrictStr] = None,
401
+ _headers: Optional[Dict[StrictStr, Any]] = None,
402
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
403
+ ) -> ApiResponse[Dict[str, object]]:
404
+ """Update profile info
405
+
406
+ Update WhatsApp Business Account profile fields. At least one of about, description, email, photo, address, vertical, websites is required. Blocked when the channel subscription limit is exceeded.
407
+
408
+ :param token: JWT token or API key for authorization (required)
409
+ :type token: str
410
+ :param update_me_request:
411
+ :type update_me_request: UpdateMeRequest
412
+ :param _request_timeout: timeout setting for this request. If one
413
+ number provided, it will be total request
414
+ timeout. It can also be a pair (tuple) of
415
+ (connection, read) timeouts.
416
+ :type _request_timeout: int, tuple(int, int), optional
417
+ :param _request_auth: set to override the auth_settings for an a single
418
+ request; this effectively ignores the
419
+ authentication in the spec for a single request.
420
+ :type _request_auth: dict, optional
421
+ :param _content_type: force content-type for the request.
422
+ :type _content_type: str, Optional
423
+ :param _headers: set to override the headers for a single
424
+ request; this effectively ignores the headers
425
+ in the spec for a single request.
426
+ :type _headers: dict, optional
427
+ :param _host_index: set to override the host_index for a single
428
+ request; this effectively ignores the host_index
429
+ in the spec for a single request.
430
+ :type _host_index: int, optional
431
+ :return: Returns the result object.
432
+ """ # noqa: E501
433
+
434
+ _param = self._update_me_serialize(
435
+ token=token,
436
+ update_me_request=update_me_request,
437
+ _request_auth=_request_auth,
438
+ _content_type=_content_type,
439
+ _headers=_headers,
440
+ _host_index=_host_index
441
+ )
442
+
443
+ _response_types_map: Dict[str, Optional[str]] = {
444
+ '200': "Dict[str, object]",
445
+ '401': "ErrorResponse",
446
+ '422': "ErrorResponse",
447
+ '500': "ErrorResponse",
448
+ }
449
+ response_data = self.api_client.call_api(
450
+ *_param,
451
+ _request_timeout=_request_timeout
452
+ )
453
+ response_data.read()
454
+ return self.api_client.response_deserialize(
455
+ response_data=response_data,
456
+ response_types_map=_response_types_map,
457
+ )
458
+
459
+
460
+ @validate_call
461
+ def update_me_without_preload_content(
462
+ self,
463
+ token: Annotated[StrictStr, Field(description="JWT token or API key for authorization")],
464
+ update_me_request: Optional[UpdateMeRequest] = None,
465
+ _request_timeout: Union[
466
+ None,
467
+ Annotated[StrictFloat, Field(gt=0)],
468
+ Tuple[
469
+ Annotated[StrictFloat, Field(gt=0)],
470
+ Annotated[StrictFloat, Field(gt=0)]
471
+ ]
472
+ ] = None,
473
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
474
+ _content_type: Optional[StrictStr] = None,
475
+ _headers: Optional[Dict[StrictStr, Any]] = None,
476
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
477
+ ) -> RESTResponseType:
478
+ """Update profile info
479
+
480
+ Update WhatsApp Business Account profile fields. At least one of about, description, email, photo, address, vertical, websites is required. Blocked when the channel subscription limit is exceeded.
481
+
482
+ :param token: JWT token or API key for authorization (required)
483
+ :type token: str
484
+ :param update_me_request:
485
+ :type update_me_request: UpdateMeRequest
486
+ :param _request_timeout: timeout setting for this request. If one
487
+ number provided, it will be total request
488
+ timeout. It can also be a pair (tuple) of
489
+ (connection, read) timeouts.
490
+ :type _request_timeout: int, tuple(int, int), optional
491
+ :param _request_auth: set to override the auth_settings for an a single
492
+ request; this effectively ignores the
493
+ authentication in the spec for a single request.
494
+ :type _request_auth: dict, optional
495
+ :param _content_type: force content-type for the request.
496
+ :type _content_type: str, Optional
497
+ :param _headers: set to override the headers for a single
498
+ request; this effectively ignores the headers
499
+ in the spec for a single request.
500
+ :type _headers: dict, optional
501
+ :param _host_index: set to override the host_index for a single
502
+ request; this effectively ignores the host_index
503
+ in the spec for a single request.
504
+ :type _host_index: int, optional
505
+ :return: Returns the result object.
506
+ """ # noqa: E501
507
+
508
+ _param = self._update_me_serialize(
509
+ token=token,
510
+ update_me_request=update_me_request,
511
+ _request_auth=_request_auth,
512
+ _content_type=_content_type,
513
+ _headers=_headers,
514
+ _host_index=_host_index
515
+ )
516
+
517
+ _response_types_map: Dict[str, Optional[str]] = {
518
+ '200': "Dict[str, object]",
519
+ '401': "ErrorResponse",
520
+ '422': "ErrorResponse",
521
+ '500': "ErrorResponse",
522
+ }
523
+ response_data = self.api_client.call_api(
524
+ *_param,
525
+ _request_timeout=_request_timeout
526
+ )
527
+ return response_data.response
528
+
529
+
530
+ def _update_me_serialize(
531
+ self,
532
+ token,
533
+ update_me_request,
534
+ _request_auth,
535
+ _content_type,
536
+ _headers,
537
+ _host_index,
538
+ ) -> RequestSerialized:
539
+
540
+ _host = None
541
+
542
+ _collection_formats: Dict[str, str] = {
543
+ }
544
+
545
+ _path_params: Dict[str, str] = {}
546
+ _query_params: List[Tuple[str, str]] = []
547
+ _header_params: Dict[str, Optional[str]] = _headers or {}
548
+ _form_params: List[Tuple[str, str]] = []
549
+ _files: Dict[
550
+ str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]]
551
+ ] = {}
552
+ _body_params: Optional[bytes] = None
553
+
554
+ # process the path parameters
555
+ # process the query parameters
556
+ if token is not None:
557
+
558
+ _query_params.append(('token', token))
559
+
560
+ # process the header parameters
561
+ # process the form parameters
562
+ # process the body parameter
563
+ if update_me_request is not None:
564
+ _body_params = update_me_request
565
+
566
+
567
+ # set the HTTP header `Accept`
568
+ if 'Accept' not in _header_params:
569
+ _header_params['Accept'] = self.api_client.select_header_accept(
570
+ [
571
+ 'application/json'
572
+ ]
573
+ )
574
+
575
+ # set the HTTP header `Content-Type`
576
+ if _content_type:
577
+ _header_params['Content-Type'] = _content_type
578
+ else:
579
+ _default_content_type = (
580
+ self.api_client.select_header_content_type(
581
+ [
582
+ 'application/json'
583
+ ]
584
+ )
585
+ )
586
+ if _default_content_type is not None:
587
+ _header_params['Content-Type'] = _default_content_type
588
+
589
+ # authentication setting
590
+ _auth_settings: List[str] = [
591
+ 'tokenAuth'
592
+ ]
593
+
594
+ return self.api_client.param_serialize(
595
+ method='POST',
596
+ resource_path='/me',
597
+ path_params=_path_params,
598
+ query_params=_query_params,
599
+ header_params=_header_params,
600
+ body=_body_params,
601
+ post_params=_form_params,
602
+ files=_files,
603
+ auth_settings=_auth_settings,
604
+ collection_formats=_collection_formats,
605
+ _host=_host,
606
+ _request_auth=_request_auth
607
+ )
608
+
609
+