pingram-python 0.1.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.
- pingram/__init__.py +395 -0
- pingram/api/__init__.py +21 -0
- pingram/api/account_api.py +2198 -0
- pingram/api/addresses_api.py +860 -0
- pingram/api/components_api.py +1681 -0
- pingram/api/default_api.py +320 -0
- pingram/api/domains_api.py +849 -0
- pingram/api/editor_api.py +320 -0
- pingram/api/environments_api.py +878 -0
- pingram/api/health_api.py +287 -0
- pingram/api/insights_api.py +321 -0
- pingram/api/keys_api.py +849 -0
- pingram/api/logs_api.py +1632 -0
- pingram/api/members_api.py +1780 -0
- pingram/api/sender_api.py +892 -0
- pingram/api/templates_api.py +1889 -0
- pingram/api/types_api.py +1411 -0
- pingram/api/user_api.py +2534 -0
- pingram/api/users_api.py +936 -0
- pingram/api_client.py +807 -0
- pingram/api_response.py +21 -0
- pingram/client_wrapper.py +357 -0
- pingram/configuration.py +623 -0
- pingram/exceptions.py +219 -0
- pingram/models/__init__.py +173 -0
- pingram/models/account_addresses_response.py +95 -0
- pingram/models/account_addresses_response_addresses_inner.py +104 -0
- pingram/models/account_get_response.py +143 -0
- pingram/models/account_get_response_pending_downgrade_usage_limit.py +99 -0
- pingram/models/address_response.py +91 -0
- pingram/models/auto_join_get_response.py +89 -0
- pingram/models/auto_join_post_response.py +89 -0
- pingram/models/auto_join_request_body.py +87 -0
- pingram/models/bee_token_v2.py +89 -0
- pingram/models/billing_post_request_body.py +91 -0
- pingram/models/billing_post_response_body.py +149 -0
- pingram/models/billing_post_response_body_pending_downgrade_usage_limit.py +99 -0
- pingram/models/channels_enum.py +42 -0
- pingram/models/create_account_request_body.py +87 -0
- pingram/models/create_account_response.py +89 -0
- pingram/models/create_address_request.py +91 -0
- pingram/models/create_key_request.py +98 -0
- pingram/models/create_key_response.py +104 -0
- pingram/models/delete_key_response.py +87 -0
- pingram/models/delete_user_response.py +87 -0
- pingram/models/email_auth_token_post_request.py +87 -0
- pingram/models/email_component_patch_request.py +93 -0
- pingram/models/email_component_post_request.py +95 -0
- pingram/models/email_component_response.py +120 -0
- pingram/models/email_component_response_referenced_by_inner.py +92 -0
- pingram/models/environment.py +96 -0
- pingram/models/environment_create_request.py +87 -0
- pingram/models/environment_patch_request.py +94 -0
- pingram/models/get_account_metadata_response.py +91 -0
- pingram/models/get_account_metadata_response_user_account_metadata.py +91 -0
- pingram/models/get_email_components_response_inner.py +120 -0
- pingram/models/get_environments_response_inner.py +96 -0
- pingram/models/get_inapp_notifications_response.py +95 -0
- pingram/models/get_inapp_notifications_response_notifications_inner.py +137 -0
- pingram/models/get_inapp_notifications_response_notifications_inner_delivery_options.py +106 -0
- pingram/models/get_inapp_notifications_response_notifications_inner_delivery_options_instant.py +93 -0
- pingram/models/get_inapp_notifications_response_notifications_inner_delivery_options_off.py +87 -0
- pingram/models/get_inapp_notifications_response_notifications_inner_replies_inner.py +89 -0
- pingram/models/get_inapp_notifications_response_notifications_inner_template.py +136 -0
- pingram/models/get_inapp_notifications_response_notifications_inner_template_any_of.py +98 -0
- pingram/models/get_keys_response.py +95 -0
- pingram/models/get_keys_response_keys_inner.py +110 -0
- pingram/models/get_logs_response.py +97 -0
- pingram/models/get_logs_response_messages_inner.py +141 -0
- pingram/models/get_logs_response_messages_inner_attachments_inner.py +93 -0
- pingram/models/get_members_response_inner.py +95 -0
- pingram/models/get_metrics_response_inner.py +116 -0
- pingram/models/get_metrics_response_inner_messages_inner.py +89 -0
- pingram/models/get_notifications_response_inner.py +126 -0
- pingram/models/get_notifications_response_inner_deduplication.py +87 -0
- pingram/models/get_notifications_response_inner_options.py +122 -0
- pingram/models/get_notifications_response_inner_options_email.py +128 -0
- pingram/models/get_notifications_response_inner_options_email_daily.py +89 -0
- pingram/models/get_notifications_response_inner_options_email_monthly.py +101 -0
- pingram/models/get_notifications_response_inner_options_email_weekly.py +91 -0
- pingram/models/get_notifications_response_inner_templates_inner.py +90 -0
- pingram/models/get_notifications_response_inner_throttling.py +111 -0
- pingram/models/get_senders_response_inner.py +128 -0
- pingram/models/get_templates_response.py +136 -0
- pingram/models/get_users_response.py +99 -0
- pingram/models/get_users_response_users_inner.py +133 -0
- pingram/models/get_users_response_users_inner_email_suppression_status.py +96 -0
- pingram/models/get_users_response_users_inner_push_tokens_inner.py +104 -0
- pingram/models/get_users_response_users_inner_push_tokens_inner_device.py +97 -0
- pingram/models/get_users_response_users_inner_slack_token.py +140 -0
- pingram/models/get_users_response_users_inner_slack_token_authed_user.py +97 -0
- pingram/models/get_users_response_users_inner_slack_token_enterprise.py +89 -0
- pingram/models/get_users_response_users_inner_slack_token_incoming_webhook.py +93 -0
- pingram/models/get_users_response_users_inner_slack_token_response_metadata.py +97 -0
- pingram/models/get_users_response_users_inner_web_push_tokens_inner.py +91 -0
- pingram/models/get_users_response_users_inner_web_push_tokens_inner_sub.py +93 -0
- pingram/models/get_users_response_users_inner_web_push_tokens_inner_sub_keys.py +89 -0
- pingram/models/in_app_notification_patch_request.py +112 -0
- pingram/models/in_app_notification_unread_clear_request.py +89 -0
- pingram/models/inapp_unread_count_response.py +87 -0
- pingram/models/inbound_request_body.py +138 -0
- pingram/models/inbound_response_body.py +104 -0
- pingram/models/inbound_response_body_results_inner.py +103 -0
- pingram/models/ingishts_post_request.py +121 -0
- pingram/models/ingishts_post_request_label_options.py +87 -0
- pingram/models/ingishts_post_request_metric_data_queries_inner.py +103 -0
- pingram/models/ingishts_post_request_metric_data_queries_inner_metric_stat.py +107 -0
- pingram/models/ingishts_post_request_metric_data_queries_inner_metric_stat_metric.py +99 -0
- pingram/models/ingishts_post_request_metric_data_queries_inner_metric_stat_metric_dimensions_inner.py +89 -0
- pingram/models/intercom_webhook.py +106 -0
- pingram/models/intercom_webhook_data.py +91 -0
- pingram/models/intercom_webhook_data_item.py +136 -0
- pingram/models/intercom_webhook_data_item_any_of.py +140 -0
- pingram/models/intercom_webhook_data_item_any_of_contacts.py +104 -0
- pingram/models/intercom_webhook_data_item_any_of_contacts_contacts_inner.py +91 -0
- pingram/models/intercom_webhook_data_item_any_of_source.py +101 -0
- pingram/models/intercom_webhook_data_item_any_of_source_author.py +93 -0
- pingram/models/invite_post_response.py +89 -0
- pingram/models/log_query_post_body.py +109 -0
- pingram/models/logs_bulk_request.py +87 -0
- pingram/models/logs_get_response.py +95 -0
- pingram/models/logs_get_response_logs_inner.py +627 -0
- pingram/models/logs_query_response.py +87 -0
- pingram/models/logs_query_result_response.py +101 -0
- pingram/models/logs_retention_response.py +87 -0
- pingram/models/logs_tail_response.py +95 -0
- pingram/models/member_invite_request.py +89 -0
- pingram/models/member_update_request.py +87 -0
- pingram/models/message_response.py +87 -0
- pingram/models/notification.py +126 -0
- pingram/models/notification_create_request.py +97 -0
- pingram/models/notification_patch_request.py +112 -0
- pingram/models/post_email_test_request.py +99 -0
- pingram/models/post_email_test_response.py +89 -0
- pingram/models/post_senders_request_body.py +87 -0
- pingram/models/post_user_request.py +121 -0
- pingram/models/sender_post_body.py +166 -0
- pingram/models/sender_post_body_email.py +95 -0
- pingram/models/sender_post_body_inapp.py +91 -0
- pingram/models/sender_post_body_mobile_push.py +89 -0
- pingram/models/sender_post_body_options.py +103 -0
- pingram/models/sender_post_body_options_apn.py +99 -0
- pingram/models/sender_post_body_options_email.py +107 -0
- pingram/models/sender_post_body_options_email_attachments_inner.py +134 -0
- pingram/models/sender_post_body_options_email_attachments_inner_any_of.py +89 -0
- pingram/models/sender_post_body_options_email_attachments_inner_any_of1.py +91 -0
- pingram/models/sender_post_body_options_fcm.py +91 -0
- pingram/models/sender_post_body_options_fcm_android.py +103 -0
- pingram/models/sender_post_body_slack.py +123 -0
- pingram/models/sender_post_body_slack_metadata.py +99 -0
- pingram/models/sender_post_body_slack_metadata_entities_inner.py +99 -0
- pingram/models/sender_post_body_slack_metadata_entities_inner_external_ref.py +89 -0
- pingram/models/sender_post_body_sms.py +93 -0
- pingram/models/sender_post_body_sms_auto_reply.py +87 -0
- pingram/models/sender_post_body_to.py +133 -0
- pingram/models/sender_post_body_user.py +133 -0
- pingram/models/sender_post_body_web_push.py +93 -0
- pingram/models/sender_post_response.py +89 -0
- pingram/models/set_default_template_request.py +97 -0
- pingram/models/slack_interactivity_response.py +87 -0
- pingram/models/slack_oauth_request.py +89 -0
- pingram/models/success_response.py +87 -0
- pingram/models/supabase_configure_request.py +93 -0
- pingram/models/supabase_configure_response.py +89 -0
- pingram/models/supabase_o_auth_request.py +91 -0
- pingram/models/supabase_o_auth_response.py +89 -0
- pingram/models/supabase_projects_response.py +95 -0
- pingram/models/supabase_projects_response_projects_inner.py +95 -0
- pingram/models/supabase_status_response.py +93 -0
- pingram/models/template.py +98 -0
- pingram/models/template_patch_request.py +134 -0
- pingram/models/template_patch_request_any_of.py +97 -0
- pingram/models/template_patch_request_any_of1.py +103 -0
- pingram/models/template_patch_request_any_of1_batch.py +91 -0
- pingram/models/template_patch_request_any_of1_instant.py +91 -0
- pingram/models/template_post_request.py +131 -0
- pingram/models/template_post_request_batch.py +91 -0
- pingram/models/template_post_request_instant.py +91 -0
- pingram/models/update_address_request.py +91 -0
- pingram/models/user.py +133 -0
- pingram/models/user_suppression_delete_response.py +91 -0
- pingram/models/webhook_response.py +104 -0
- pingram/py.typed +0 -0
- pingram/rest.py +199 -0
- pingram_python-0.1.0.dist-info/METADATA +69 -0
- pingram_python-0.1.0.dist-info/RECORD +189 -0
- pingram_python-0.1.0.dist-info/WHEEL +5 -0
- pingram_python-0.1.0.dist-info/licenses/LICENSE +21 -0
- pingram_python-0.1.0.dist-info/top_level.txt +1 -0
|
@@ -0,0 +1,860 @@
|
|
|
1
|
+
# coding: utf-8
|
|
2
|
+
|
|
3
|
+
"""
|
|
4
|
+
NotificationAPI
|
|
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
|
+
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 pingram.models.account_addresses_response import AccountAddressesResponse
|
|
20
|
+
from pingram.models.address_response import AddressResponse
|
|
21
|
+
from pingram.models.create_address_request import CreateAddressRequest
|
|
22
|
+
from pingram.models.update_address_request import UpdateAddressRequest
|
|
23
|
+
|
|
24
|
+
from pingram.api_client import ApiClient, RequestSerialized
|
|
25
|
+
from pingram.api_response import ApiResponse
|
|
26
|
+
from pingram.rest import RESTResponseType
|
|
27
|
+
|
|
28
|
+
|
|
29
|
+
class AddressesApi:
|
|
30
|
+
"""NOTE: This class is auto generated by OpenAPI Generator
|
|
31
|
+
Ref: https://openapi-generator.tech
|
|
32
|
+
|
|
33
|
+
Do not edit the class manually.
|
|
34
|
+
"""
|
|
35
|
+
|
|
36
|
+
def __init__(self, api_client=None) -> None:
|
|
37
|
+
if api_client is None:
|
|
38
|
+
api_client = ApiClient.get_default()
|
|
39
|
+
self.api_client = api_client
|
|
40
|
+
|
|
41
|
+
|
|
42
|
+
@validate_call
|
|
43
|
+
async def addresses_create_address(
|
|
44
|
+
self,
|
|
45
|
+
create_address_request: CreateAddressRequest,
|
|
46
|
+
_request_timeout: Union[
|
|
47
|
+
None,
|
|
48
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
49
|
+
Tuple[
|
|
50
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
51
|
+
Annotated[StrictFloat, Field(gt=0)]
|
|
52
|
+
]
|
|
53
|
+
] = None,
|
|
54
|
+
_request_auth: Optional[Dict[StrictStr, Any]] = None,
|
|
55
|
+
_content_type: Optional[StrictStr] = None,
|
|
56
|
+
_headers: Optional[Dict[StrictStr, Any]] = None,
|
|
57
|
+
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
|
|
58
|
+
) -> AddressResponse:
|
|
59
|
+
"""Create a new email address for inbound/outbound purposes. Each account can have one builtin address and many custom addresses. Custom addresses must belong to configured domains.
|
|
60
|
+
|
|
61
|
+
|
|
62
|
+
:param create_address_request: (required)
|
|
63
|
+
:type create_address_request: CreateAddressRequest
|
|
64
|
+
:param _request_timeout: timeout setting for this request. If one
|
|
65
|
+
number provided, it will be total request
|
|
66
|
+
timeout. It can also be a pair (tuple) of
|
|
67
|
+
(connection, read) timeouts.
|
|
68
|
+
:type _request_timeout: int, tuple(int, int), optional
|
|
69
|
+
:param _request_auth: set to override the auth_settings for an a single
|
|
70
|
+
request; this effectively ignores the
|
|
71
|
+
authentication in the spec for a single request.
|
|
72
|
+
:type _request_auth: dict, optional
|
|
73
|
+
:param _content_type: force content-type for the request.
|
|
74
|
+
:type _content_type: str, Optional
|
|
75
|
+
:param _headers: set to override the headers for a single
|
|
76
|
+
request; this effectively ignores the headers
|
|
77
|
+
in the spec for a single request.
|
|
78
|
+
:type _headers: dict, optional
|
|
79
|
+
:param _host_index: set to override the host_index for a single
|
|
80
|
+
request; this effectively ignores the host_index
|
|
81
|
+
in the spec for a single request.
|
|
82
|
+
:type _host_index: int, optional
|
|
83
|
+
:return: Returns the result object.
|
|
84
|
+
""" # noqa: E501
|
|
85
|
+
|
|
86
|
+
_param = self._addresses_create_address_serialize(
|
|
87
|
+
create_address_request=create_address_request,
|
|
88
|
+
_request_auth=_request_auth,
|
|
89
|
+
_content_type=_content_type,
|
|
90
|
+
_headers=_headers,
|
|
91
|
+
_host_index=_host_index
|
|
92
|
+
)
|
|
93
|
+
|
|
94
|
+
_response_types_map: Dict[str, Optional[str]] = {
|
|
95
|
+
'200': "AddressResponse",
|
|
96
|
+
'400': None,
|
|
97
|
+
'401': None,
|
|
98
|
+
'500': None,
|
|
99
|
+
}
|
|
100
|
+
response_data = await self.api_client.call_api(
|
|
101
|
+
*_param,
|
|
102
|
+
_request_timeout=_request_timeout
|
|
103
|
+
)
|
|
104
|
+
await response_data.read()
|
|
105
|
+
return self.api_client.response_deserialize(
|
|
106
|
+
response_data=response_data,
|
|
107
|
+
response_types_map=_response_types_map,
|
|
108
|
+
).data
|
|
109
|
+
|
|
110
|
+
|
|
111
|
+
@validate_call
|
|
112
|
+
async def addresses_create_address_with_http_info(
|
|
113
|
+
self,
|
|
114
|
+
create_address_request: CreateAddressRequest,
|
|
115
|
+
_request_timeout: Union[
|
|
116
|
+
None,
|
|
117
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
118
|
+
Tuple[
|
|
119
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
120
|
+
Annotated[StrictFloat, Field(gt=0)]
|
|
121
|
+
]
|
|
122
|
+
] = None,
|
|
123
|
+
_request_auth: Optional[Dict[StrictStr, Any]] = None,
|
|
124
|
+
_content_type: Optional[StrictStr] = None,
|
|
125
|
+
_headers: Optional[Dict[StrictStr, Any]] = None,
|
|
126
|
+
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
|
|
127
|
+
) -> ApiResponse[AddressResponse]:
|
|
128
|
+
"""Create a new email address for inbound/outbound purposes. Each account can have one builtin address and many custom addresses. Custom addresses must belong to configured domains.
|
|
129
|
+
|
|
130
|
+
|
|
131
|
+
:param create_address_request: (required)
|
|
132
|
+
:type create_address_request: CreateAddressRequest
|
|
133
|
+
:param _request_timeout: timeout setting for this request. If one
|
|
134
|
+
number provided, it will be total request
|
|
135
|
+
timeout. It can also be a pair (tuple) of
|
|
136
|
+
(connection, read) timeouts.
|
|
137
|
+
:type _request_timeout: int, tuple(int, int), optional
|
|
138
|
+
:param _request_auth: set to override the auth_settings for an a single
|
|
139
|
+
request; this effectively ignores the
|
|
140
|
+
authentication in the spec for a single request.
|
|
141
|
+
:type _request_auth: dict, optional
|
|
142
|
+
:param _content_type: force content-type for the request.
|
|
143
|
+
:type _content_type: str, Optional
|
|
144
|
+
:param _headers: set to override the headers for a single
|
|
145
|
+
request; this effectively ignores the headers
|
|
146
|
+
in the spec for a single request.
|
|
147
|
+
:type _headers: dict, optional
|
|
148
|
+
:param _host_index: set to override the host_index for a single
|
|
149
|
+
request; this effectively ignores the host_index
|
|
150
|
+
in the spec for a single request.
|
|
151
|
+
:type _host_index: int, optional
|
|
152
|
+
:return: Returns the result object.
|
|
153
|
+
""" # noqa: E501
|
|
154
|
+
|
|
155
|
+
_param = self._addresses_create_address_serialize(
|
|
156
|
+
create_address_request=create_address_request,
|
|
157
|
+
_request_auth=_request_auth,
|
|
158
|
+
_content_type=_content_type,
|
|
159
|
+
_headers=_headers,
|
|
160
|
+
_host_index=_host_index
|
|
161
|
+
)
|
|
162
|
+
|
|
163
|
+
_response_types_map: Dict[str, Optional[str]] = {
|
|
164
|
+
'200': "AddressResponse",
|
|
165
|
+
'400': None,
|
|
166
|
+
'401': None,
|
|
167
|
+
'500': None,
|
|
168
|
+
}
|
|
169
|
+
response_data = await self.api_client.call_api(
|
|
170
|
+
*_param,
|
|
171
|
+
_request_timeout=_request_timeout
|
|
172
|
+
)
|
|
173
|
+
await response_data.read()
|
|
174
|
+
return self.api_client.response_deserialize(
|
|
175
|
+
response_data=response_data,
|
|
176
|
+
response_types_map=_response_types_map,
|
|
177
|
+
)
|
|
178
|
+
|
|
179
|
+
|
|
180
|
+
@validate_call
|
|
181
|
+
async def addresses_create_address_without_preload_content(
|
|
182
|
+
self,
|
|
183
|
+
create_address_request: CreateAddressRequest,
|
|
184
|
+
_request_timeout: Union[
|
|
185
|
+
None,
|
|
186
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
187
|
+
Tuple[
|
|
188
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
189
|
+
Annotated[StrictFloat, Field(gt=0)]
|
|
190
|
+
]
|
|
191
|
+
] = None,
|
|
192
|
+
_request_auth: Optional[Dict[StrictStr, Any]] = None,
|
|
193
|
+
_content_type: Optional[StrictStr] = None,
|
|
194
|
+
_headers: Optional[Dict[StrictStr, Any]] = None,
|
|
195
|
+
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
|
|
196
|
+
) -> RESTResponseType:
|
|
197
|
+
"""Create a new email address for inbound/outbound purposes. Each account can have one builtin address and many custom addresses. Custom addresses must belong to configured domains.
|
|
198
|
+
|
|
199
|
+
|
|
200
|
+
:param create_address_request: (required)
|
|
201
|
+
:type create_address_request: CreateAddressRequest
|
|
202
|
+
:param _request_timeout: timeout setting for this request. If one
|
|
203
|
+
number provided, it will be total request
|
|
204
|
+
timeout. It can also be a pair (tuple) of
|
|
205
|
+
(connection, read) timeouts.
|
|
206
|
+
:type _request_timeout: int, tuple(int, int), optional
|
|
207
|
+
:param _request_auth: set to override the auth_settings for an a single
|
|
208
|
+
request; this effectively ignores the
|
|
209
|
+
authentication in the spec for a single request.
|
|
210
|
+
:type _request_auth: dict, optional
|
|
211
|
+
:param _content_type: force content-type for the request.
|
|
212
|
+
:type _content_type: str, Optional
|
|
213
|
+
:param _headers: set to override the headers for a single
|
|
214
|
+
request; this effectively ignores the headers
|
|
215
|
+
in the spec for a single request.
|
|
216
|
+
:type _headers: dict, optional
|
|
217
|
+
:param _host_index: set to override the host_index for a single
|
|
218
|
+
request; this effectively ignores the host_index
|
|
219
|
+
in the spec for a single request.
|
|
220
|
+
:type _host_index: int, optional
|
|
221
|
+
:return: Returns the result object.
|
|
222
|
+
""" # noqa: E501
|
|
223
|
+
|
|
224
|
+
_param = self._addresses_create_address_serialize(
|
|
225
|
+
create_address_request=create_address_request,
|
|
226
|
+
_request_auth=_request_auth,
|
|
227
|
+
_content_type=_content_type,
|
|
228
|
+
_headers=_headers,
|
|
229
|
+
_host_index=_host_index
|
|
230
|
+
)
|
|
231
|
+
|
|
232
|
+
_response_types_map: Dict[str, Optional[str]] = {
|
|
233
|
+
'200': "AddressResponse",
|
|
234
|
+
'400': None,
|
|
235
|
+
'401': None,
|
|
236
|
+
'500': None,
|
|
237
|
+
}
|
|
238
|
+
response_data = await self.api_client.call_api(
|
|
239
|
+
*_param,
|
|
240
|
+
_request_timeout=_request_timeout
|
|
241
|
+
)
|
|
242
|
+
return response_data.response
|
|
243
|
+
|
|
244
|
+
|
|
245
|
+
def _addresses_create_address_serialize(
|
|
246
|
+
self,
|
|
247
|
+
create_address_request,
|
|
248
|
+
_request_auth,
|
|
249
|
+
_content_type,
|
|
250
|
+
_headers,
|
|
251
|
+
_host_index,
|
|
252
|
+
) -> RequestSerialized:
|
|
253
|
+
|
|
254
|
+
_host = None
|
|
255
|
+
|
|
256
|
+
_collection_formats: Dict[str, str] = {
|
|
257
|
+
}
|
|
258
|
+
|
|
259
|
+
_path_params: Dict[str, str] = {}
|
|
260
|
+
_query_params: List[Tuple[str, str]] = []
|
|
261
|
+
_header_params: Dict[str, Optional[str]] = _headers or {}
|
|
262
|
+
_form_params: List[Tuple[str, str]] = []
|
|
263
|
+
_files: Dict[
|
|
264
|
+
str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]]
|
|
265
|
+
] = {}
|
|
266
|
+
_body_params: Optional[bytes] = None
|
|
267
|
+
|
|
268
|
+
# process the path parameters
|
|
269
|
+
# process the query parameters
|
|
270
|
+
# process the header parameters
|
|
271
|
+
# process the form parameters
|
|
272
|
+
# process the body parameter
|
|
273
|
+
if create_address_request is not None:
|
|
274
|
+
_body_params = create_address_request
|
|
275
|
+
|
|
276
|
+
|
|
277
|
+
# set the HTTP header `Accept`
|
|
278
|
+
if 'Accept' not in _header_params:
|
|
279
|
+
_header_params['Accept'] = self.api_client.select_header_accept(
|
|
280
|
+
[
|
|
281
|
+
'application/json'
|
|
282
|
+
]
|
|
283
|
+
)
|
|
284
|
+
|
|
285
|
+
# set the HTTP header `Content-Type`
|
|
286
|
+
if _content_type:
|
|
287
|
+
_header_params['Content-Type'] = _content_type
|
|
288
|
+
else:
|
|
289
|
+
_default_content_type = (
|
|
290
|
+
self.api_client.select_header_content_type(
|
|
291
|
+
[
|
|
292
|
+
'application/json'
|
|
293
|
+
]
|
|
294
|
+
)
|
|
295
|
+
)
|
|
296
|
+
if _default_content_type is not None:
|
|
297
|
+
_header_params['Content-Type'] = _default_content_type
|
|
298
|
+
|
|
299
|
+
# authentication setting
|
|
300
|
+
_auth_settings: List[str] = [
|
|
301
|
+
'endUserHashed',
|
|
302
|
+
'endUser',
|
|
303
|
+
'apiKey',
|
|
304
|
+
'clientCredentials'
|
|
305
|
+
]
|
|
306
|
+
|
|
307
|
+
return self.api_client.param_serialize(
|
|
308
|
+
method='POST',
|
|
309
|
+
resource_path='/addresses',
|
|
310
|
+
path_params=_path_params,
|
|
311
|
+
query_params=_query_params,
|
|
312
|
+
header_params=_header_params,
|
|
313
|
+
body=_body_params,
|
|
314
|
+
post_params=_form_params,
|
|
315
|
+
files=_files,
|
|
316
|
+
auth_settings=_auth_settings,
|
|
317
|
+
collection_formats=_collection_formats,
|
|
318
|
+
_host=_host,
|
|
319
|
+
_request_auth=_request_auth
|
|
320
|
+
)
|
|
321
|
+
|
|
322
|
+
|
|
323
|
+
|
|
324
|
+
|
|
325
|
+
@validate_call
|
|
326
|
+
async def addresses_list_addresses(
|
|
327
|
+
self,
|
|
328
|
+
_request_timeout: Union[
|
|
329
|
+
None,
|
|
330
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
331
|
+
Tuple[
|
|
332
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
333
|
+
Annotated[StrictFloat, Field(gt=0)]
|
|
334
|
+
]
|
|
335
|
+
] = None,
|
|
336
|
+
_request_auth: Optional[Dict[StrictStr, Any]] = None,
|
|
337
|
+
_content_type: Optional[StrictStr] = None,
|
|
338
|
+
_headers: Optional[Dict[StrictStr, Any]] = None,
|
|
339
|
+
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
|
|
340
|
+
) -> AccountAddressesResponse:
|
|
341
|
+
"""Lists all email addresses the account has configured to send and receive emails. Custom addresses must belong to configured domains.
|
|
342
|
+
|
|
343
|
+
|
|
344
|
+
:param _request_timeout: timeout setting for this request. If one
|
|
345
|
+
number provided, it will be total request
|
|
346
|
+
timeout. It can also be a pair (tuple) of
|
|
347
|
+
(connection, read) timeouts.
|
|
348
|
+
:type _request_timeout: int, tuple(int, int), optional
|
|
349
|
+
:param _request_auth: set to override the auth_settings for an a single
|
|
350
|
+
request; this effectively ignores the
|
|
351
|
+
authentication in the spec for a single request.
|
|
352
|
+
:type _request_auth: dict, optional
|
|
353
|
+
:param _content_type: force content-type for the request.
|
|
354
|
+
:type _content_type: str, Optional
|
|
355
|
+
:param _headers: set to override the headers for a single
|
|
356
|
+
request; this effectively ignores the headers
|
|
357
|
+
in the spec for a single request.
|
|
358
|
+
:type _headers: dict, optional
|
|
359
|
+
:param _host_index: set to override the host_index for a single
|
|
360
|
+
request; this effectively ignores the host_index
|
|
361
|
+
in the spec for a single request.
|
|
362
|
+
:type _host_index: int, optional
|
|
363
|
+
:return: Returns the result object.
|
|
364
|
+
""" # noqa: E501
|
|
365
|
+
|
|
366
|
+
_param = self._addresses_list_addresses_serialize(
|
|
367
|
+
_request_auth=_request_auth,
|
|
368
|
+
_content_type=_content_type,
|
|
369
|
+
_headers=_headers,
|
|
370
|
+
_host_index=_host_index
|
|
371
|
+
)
|
|
372
|
+
|
|
373
|
+
_response_types_map: Dict[str, Optional[str]] = {
|
|
374
|
+
'200': "AccountAddressesResponse",
|
|
375
|
+
'400': None,
|
|
376
|
+
'401': None,
|
|
377
|
+
'500': None,
|
|
378
|
+
}
|
|
379
|
+
response_data = await self.api_client.call_api(
|
|
380
|
+
*_param,
|
|
381
|
+
_request_timeout=_request_timeout
|
|
382
|
+
)
|
|
383
|
+
await response_data.read()
|
|
384
|
+
return self.api_client.response_deserialize(
|
|
385
|
+
response_data=response_data,
|
|
386
|
+
response_types_map=_response_types_map,
|
|
387
|
+
).data
|
|
388
|
+
|
|
389
|
+
|
|
390
|
+
@validate_call
|
|
391
|
+
async def addresses_list_addresses_with_http_info(
|
|
392
|
+
self,
|
|
393
|
+
_request_timeout: Union[
|
|
394
|
+
None,
|
|
395
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
396
|
+
Tuple[
|
|
397
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
398
|
+
Annotated[StrictFloat, Field(gt=0)]
|
|
399
|
+
]
|
|
400
|
+
] = None,
|
|
401
|
+
_request_auth: Optional[Dict[StrictStr, Any]] = None,
|
|
402
|
+
_content_type: Optional[StrictStr] = None,
|
|
403
|
+
_headers: Optional[Dict[StrictStr, Any]] = None,
|
|
404
|
+
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
|
|
405
|
+
) -> ApiResponse[AccountAddressesResponse]:
|
|
406
|
+
"""Lists all email addresses the account has configured to send and receive emails. Custom addresses must belong to configured domains.
|
|
407
|
+
|
|
408
|
+
|
|
409
|
+
:param _request_timeout: timeout setting for this request. If one
|
|
410
|
+
number provided, it will be total request
|
|
411
|
+
timeout. It can also be a pair (tuple) of
|
|
412
|
+
(connection, read) timeouts.
|
|
413
|
+
:type _request_timeout: int, tuple(int, int), optional
|
|
414
|
+
:param _request_auth: set to override the auth_settings for an a single
|
|
415
|
+
request; this effectively ignores the
|
|
416
|
+
authentication in the spec for a single request.
|
|
417
|
+
:type _request_auth: dict, optional
|
|
418
|
+
:param _content_type: force content-type for the request.
|
|
419
|
+
:type _content_type: str, Optional
|
|
420
|
+
:param _headers: set to override the headers for a single
|
|
421
|
+
request; this effectively ignores the headers
|
|
422
|
+
in the spec for a single request.
|
|
423
|
+
:type _headers: dict, optional
|
|
424
|
+
:param _host_index: set to override the host_index for a single
|
|
425
|
+
request; this effectively ignores the host_index
|
|
426
|
+
in the spec for a single request.
|
|
427
|
+
:type _host_index: int, optional
|
|
428
|
+
:return: Returns the result object.
|
|
429
|
+
""" # noqa: E501
|
|
430
|
+
|
|
431
|
+
_param = self._addresses_list_addresses_serialize(
|
|
432
|
+
_request_auth=_request_auth,
|
|
433
|
+
_content_type=_content_type,
|
|
434
|
+
_headers=_headers,
|
|
435
|
+
_host_index=_host_index
|
|
436
|
+
)
|
|
437
|
+
|
|
438
|
+
_response_types_map: Dict[str, Optional[str]] = {
|
|
439
|
+
'200': "AccountAddressesResponse",
|
|
440
|
+
'400': None,
|
|
441
|
+
'401': None,
|
|
442
|
+
'500': None,
|
|
443
|
+
}
|
|
444
|
+
response_data = await self.api_client.call_api(
|
|
445
|
+
*_param,
|
|
446
|
+
_request_timeout=_request_timeout
|
|
447
|
+
)
|
|
448
|
+
await response_data.read()
|
|
449
|
+
return self.api_client.response_deserialize(
|
|
450
|
+
response_data=response_data,
|
|
451
|
+
response_types_map=_response_types_map,
|
|
452
|
+
)
|
|
453
|
+
|
|
454
|
+
|
|
455
|
+
@validate_call
|
|
456
|
+
async def addresses_list_addresses_without_preload_content(
|
|
457
|
+
self,
|
|
458
|
+
_request_timeout: Union[
|
|
459
|
+
None,
|
|
460
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
461
|
+
Tuple[
|
|
462
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
463
|
+
Annotated[StrictFloat, Field(gt=0)]
|
|
464
|
+
]
|
|
465
|
+
] = None,
|
|
466
|
+
_request_auth: Optional[Dict[StrictStr, Any]] = None,
|
|
467
|
+
_content_type: Optional[StrictStr] = None,
|
|
468
|
+
_headers: Optional[Dict[StrictStr, Any]] = None,
|
|
469
|
+
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
|
|
470
|
+
) -> RESTResponseType:
|
|
471
|
+
"""Lists all email addresses the account has configured to send and receive emails. Custom addresses must belong to configured domains.
|
|
472
|
+
|
|
473
|
+
|
|
474
|
+
:param _request_timeout: timeout setting for this request. If one
|
|
475
|
+
number provided, it will be total request
|
|
476
|
+
timeout. It can also be a pair (tuple) of
|
|
477
|
+
(connection, read) timeouts.
|
|
478
|
+
:type _request_timeout: int, tuple(int, int), optional
|
|
479
|
+
:param _request_auth: set to override the auth_settings for an a single
|
|
480
|
+
request; this effectively ignores the
|
|
481
|
+
authentication in the spec for a single request.
|
|
482
|
+
:type _request_auth: dict, optional
|
|
483
|
+
:param _content_type: force content-type for the request.
|
|
484
|
+
:type _content_type: str, Optional
|
|
485
|
+
:param _headers: set to override the headers for a single
|
|
486
|
+
request; this effectively ignores the headers
|
|
487
|
+
in the spec for a single request.
|
|
488
|
+
:type _headers: dict, optional
|
|
489
|
+
:param _host_index: set to override the host_index for a single
|
|
490
|
+
request; this effectively ignores the host_index
|
|
491
|
+
in the spec for a single request.
|
|
492
|
+
:type _host_index: int, optional
|
|
493
|
+
:return: Returns the result object.
|
|
494
|
+
""" # noqa: E501
|
|
495
|
+
|
|
496
|
+
_param = self._addresses_list_addresses_serialize(
|
|
497
|
+
_request_auth=_request_auth,
|
|
498
|
+
_content_type=_content_type,
|
|
499
|
+
_headers=_headers,
|
|
500
|
+
_host_index=_host_index
|
|
501
|
+
)
|
|
502
|
+
|
|
503
|
+
_response_types_map: Dict[str, Optional[str]] = {
|
|
504
|
+
'200': "AccountAddressesResponse",
|
|
505
|
+
'400': None,
|
|
506
|
+
'401': None,
|
|
507
|
+
'500': None,
|
|
508
|
+
}
|
|
509
|
+
response_data = await self.api_client.call_api(
|
|
510
|
+
*_param,
|
|
511
|
+
_request_timeout=_request_timeout
|
|
512
|
+
)
|
|
513
|
+
return response_data.response
|
|
514
|
+
|
|
515
|
+
|
|
516
|
+
def _addresses_list_addresses_serialize(
|
|
517
|
+
self,
|
|
518
|
+
_request_auth,
|
|
519
|
+
_content_type,
|
|
520
|
+
_headers,
|
|
521
|
+
_host_index,
|
|
522
|
+
) -> RequestSerialized:
|
|
523
|
+
|
|
524
|
+
_host = None
|
|
525
|
+
|
|
526
|
+
_collection_formats: Dict[str, str] = {
|
|
527
|
+
}
|
|
528
|
+
|
|
529
|
+
_path_params: Dict[str, str] = {}
|
|
530
|
+
_query_params: List[Tuple[str, str]] = []
|
|
531
|
+
_header_params: Dict[str, Optional[str]] = _headers or {}
|
|
532
|
+
_form_params: List[Tuple[str, str]] = []
|
|
533
|
+
_files: Dict[
|
|
534
|
+
str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]]
|
|
535
|
+
] = {}
|
|
536
|
+
_body_params: Optional[bytes] = None
|
|
537
|
+
|
|
538
|
+
# process the path parameters
|
|
539
|
+
# process the query parameters
|
|
540
|
+
# process the header parameters
|
|
541
|
+
# process the form parameters
|
|
542
|
+
# process the body parameter
|
|
543
|
+
|
|
544
|
+
|
|
545
|
+
# set the HTTP header `Accept`
|
|
546
|
+
if 'Accept' not in _header_params:
|
|
547
|
+
_header_params['Accept'] = self.api_client.select_header_accept(
|
|
548
|
+
[
|
|
549
|
+
'application/json'
|
|
550
|
+
]
|
|
551
|
+
)
|
|
552
|
+
|
|
553
|
+
|
|
554
|
+
# authentication setting
|
|
555
|
+
_auth_settings: List[str] = [
|
|
556
|
+
'endUserHashed',
|
|
557
|
+
'endUser',
|
|
558
|
+
'apiKey',
|
|
559
|
+
'clientCredentials'
|
|
560
|
+
]
|
|
561
|
+
|
|
562
|
+
return self.api_client.param_serialize(
|
|
563
|
+
method='GET',
|
|
564
|
+
resource_path='/addresses',
|
|
565
|
+
path_params=_path_params,
|
|
566
|
+
query_params=_query_params,
|
|
567
|
+
header_params=_header_params,
|
|
568
|
+
body=_body_params,
|
|
569
|
+
post_params=_form_params,
|
|
570
|
+
files=_files,
|
|
571
|
+
auth_settings=_auth_settings,
|
|
572
|
+
collection_formats=_collection_formats,
|
|
573
|
+
_host=_host,
|
|
574
|
+
_request_auth=_request_auth
|
|
575
|
+
)
|
|
576
|
+
|
|
577
|
+
|
|
578
|
+
|
|
579
|
+
|
|
580
|
+
@validate_call
|
|
581
|
+
async def addresses_update_address(
|
|
582
|
+
self,
|
|
583
|
+
update_address_request: UpdateAddressRequest,
|
|
584
|
+
_request_timeout: Union[
|
|
585
|
+
None,
|
|
586
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
587
|
+
Tuple[
|
|
588
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
589
|
+
Annotated[StrictFloat, Field(gt=0)]
|
|
590
|
+
]
|
|
591
|
+
] = None,
|
|
592
|
+
_request_auth: Optional[Dict[StrictStr, Any]] = None,
|
|
593
|
+
_content_type: Optional[StrictStr] = None,
|
|
594
|
+
_headers: Optional[Dict[StrictStr, Any]] = None,
|
|
595
|
+
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
|
|
596
|
+
) -> AddressResponse:
|
|
597
|
+
"""Update an existing address
|
|
598
|
+
|
|
599
|
+
|
|
600
|
+
:param update_address_request: (required)
|
|
601
|
+
:type update_address_request: UpdateAddressRequest
|
|
602
|
+
:param _request_timeout: timeout setting for this request. If one
|
|
603
|
+
number provided, it will be total request
|
|
604
|
+
timeout. It can also be a pair (tuple) of
|
|
605
|
+
(connection, read) timeouts.
|
|
606
|
+
:type _request_timeout: int, tuple(int, int), optional
|
|
607
|
+
:param _request_auth: set to override the auth_settings for an a single
|
|
608
|
+
request; this effectively ignores the
|
|
609
|
+
authentication in the spec for a single request.
|
|
610
|
+
:type _request_auth: dict, optional
|
|
611
|
+
:param _content_type: force content-type for the request.
|
|
612
|
+
:type _content_type: str, Optional
|
|
613
|
+
:param _headers: set to override the headers for a single
|
|
614
|
+
request; this effectively ignores the headers
|
|
615
|
+
in the spec for a single request.
|
|
616
|
+
:type _headers: dict, optional
|
|
617
|
+
:param _host_index: set to override the host_index for a single
|
|
618
|
+
request; this effectively ignores the host_index
|
|
619
|
+
in the spec for a single request.
|
|
620
|
+
:type _host_index: int, optional
|
|
621
|
+
:return: Returns the result object.
|
|
622
|
+
""" # noqa: E501
|
|
623
|
+
|
|
624
|
+
_param = self._addresses_update_address_serialize(
|
|
625
|
+
update_address_request=update_address_request,
|
|
626
|
+
_request_auth=_request_auth,
|
|
627
|
+
_content_type=_content_type,
|
|
628
|
+
_headers=_headers,
|
|
629
|
+
_host_index=_host_index
|
|
630
|
+
)
|
|
631
|
+
|
|
632
|
+
_response_types_map: Dict[str, Optional[str]] = {
|
|
633
|
+
'200': "AddressResponse",
|
|
634
|
+
'400': None,
|
|
635
|
+
'401': None,
|
|
636
|
+
'500': None,
|
|
637
|
+
}
|
|
638
|
+
response_data = await self.api_client.call_api(
|
|
639
|
+
*_param,
|
|
640
|
+
_request_timeout=_request_timeout
|
|
641
|
+
)
|
|
642
|
+
await response_data.read()
|
|
643
|
+
return self.api_client.response_deserialize(
|
|
644
|
+
response_data=response_data,
|
|
645
|
+
response_types_map=_response_types_map,
|
|
646
|
+
).data
|
|
647
|
+
|
|
648
|
+
|
|
649
|
+
@validate_call
|
|
650
|
+
async def addresses_update_address_with_http_info(
|
|
651
|
+
self,
|
|
652
|
+
update_address_request: UpdateAddressRequest,
|
|
653
|
+
_request_timeout: Union[
|
|
654
|
+
None,
|
|
655
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
656
|
+
Tuple[
|
|
657
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
658
|
+
Annotated[StrictFloat, Field(gt=0)]
|
|
659
|
+
]
|
|
660
|
+
] = None,
|
|
661
|
+
_request_auth: Optional[Dict[StrictStr, Any]] = None,
|
|
662
|
+
_content_type: Optional[StrictStr] = None,
|
|
663
|
+
_headers: Optional[Dict[StrictStr, Any]] = None,
|
|
664
|
+
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
|
|
665
|
+
) -> ApiResponse[AddressResponse]:
|
|
666
|
+
"""Update an existing address
|
|
667
|
+
|
|
668
|
+
|
|
669
|
+
:param update_address_request: (required)
|
|
670
|
+
:type update_address_request: UpdateAddressRequest
|
|
671
|
+
:param _request_timeout: timeout setting for this request. If one
|
|
672
|
+
number provided, it will be total request
|
|
673
|
+
timeout. It can also be a pair (tuple) of
|
|
674
|
+
(connection, read) timeouts.
|
|
675
|
+
:type _request_timeout: int, tuple(int, int), optional
|
|
676
|
+
:param _request_auth: set to override the auth_settings for an a single
|
|
677
|
+
request; this effectively ignores the
|
|
678
|
+
authentication in the spec for a single request.
|
|
679
|
+
:type _request_auth: dict, optional
|
|
680
|
+
:param _content_type: force content-type for the request.
|
|
681
|
+
:type _content_type: str, Optional
|
|
682
|
+
:param _headers: set to override the headers for a single
|
|
683
|
+
request; this effectively ignores the headers
|
|
684
|
+
in the spec for a single request.
|
|
685
|
+
:type _headers: dict, optional
|
|
686
|
+
:param _host_index: set to override the host_index for a single
|
|
687
|
+
request; this effectively ignores the host_index
|
|
688
|
+
in the spec for a single request.
|
|
689
|
+
:type _host_index: int, optional
|
|
690
|
+
:return: Returns the result object.
|
|
691
|
+
""" # noqa: E501
|
|
692
|
+
|
|
693
|
+
_param = self._addresses_update_address_serialize(
|
|
694
|
+
update_address_request=update_address_request,
|
|
695
|
+
_request_auth=_request_auth,
|
|
696
|
+
_content_type=_content_type,
|
|
697
|
+
_headers=_headers,
|
|
698
|
+
_host_index=_host_index
|
|
699
|
+
)
|
|
700
|
+
|
|
701
|
+
_response_types_map: Dict[str, Optional[str]] = {
|
|
702
|
+
'200': "AddressResponse",
|
|
703
|
+
'400': None,
|
|
704
|
+
'401': None,
|
|
705
|
+
'500': None,
|
|
706
|
+
}
|
|
707
|
+
response_data = await self.api_client.call_api(
|
|
708
|
+
*_param,
|
|
709
|
+
_request_timeout=_request_timeout
|
|
710
|
+
)
|
|
711
|
+
await response_data.read()
|
|
712
|
+
return self.api_client.response_deserialize(
|
|
713
|
+
response_data=response_data,
|
|
714
|
+
response_types_map=_response_types_map,
|
|
715
|
+
)
|
|
716
|
+
|
|
717
|
+
|
|
718
|
+
@validate_call
|
|
719
|
+
async def addresses_update_address_without_preload_content(
|
|
720
|
+
self,
|
|
721
|
+
update_address_request: UpdateAddressRequest,
|
|
722
|
+
_request_timeout: Union[
|
|
723
|
+
None,
|
|
724
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
725
|
+
Tuple[
|
|
726
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
727
|
+
Annotated[StrictFloat, Field(gt=0)]
|
|
728
|
+
]
|
|
729
|
+
] = None,
|
|
730
|
+
_request_auth: Optional[Dict[StrictStr, Any]] = None,
|
|
731
|
+
_content_type: Optional[StrictStr] = None,
|
|
732
|
+
_headers: Optional[Dict[StrictStr, Any]] = None,
|
|
733
|
+
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
|
|
734
|
+
) -> RESTResponseType:
|
|
735
|
+
"""Update an existing address
|
|
736
|
+
|
|
737
|
+
|
|
738
|
+
:param update_address_request: (required)
|
|
739
|
+
:type update_address_request: UpdateAddressRequest
|
|
740
|
+
:param _request_timeout: timeout setting for this request. If one
|
|
741
|
+
number provided, it will be total request
|
|
742
|
+
timeout. It can also be a pair (tuple) of
|
|
743
|
+
(connection, read) timeouts.
|
|
744
|
+
:type _request_timeout: int, tuple(int, int), optional
|
|
745
|
+
:param _request_auth: set to override the auth_settings for an a single
|
|
746
|
+
request; this effectively ignores the
|
|
747
|
+
authentication in the spec for a single request.
|
|
748
|
+
:type _request_auth: dict, optional
|
|
749
|
+
:param _content_type: force content-type for the request.
|
|
750
|
+
:type _content_type: str, Optional
|
|
751
|
+
:param _headers: set to override the headers for a single
|
|
752
|
+
request; this effectively ignores the headers
|
|
753
|
+
in the spec for a single request.
|
|
754
|
+
:type _headers: dict, optional
|
|
755
|
+
:param _host_index: set to override the host_index for a single
|
|
756
|
+
request; this effectively ignores the host_index
|
|
757
|
+
in the spec for a single request.
|
|
758
|
+
:type _host_index: int, optional
|
|
759
|
+
:return: Returns the result object.
|
|
760
|
+
""" # noqa: E501
|
|
761
|
+
|
|
762
|
+
_param = self._addresses_update_address_serialize(
|
|
763
|
+
update_address_request=update_address_request,
|
|
764
|
+
_request_auth=_request_auth,
|
|
765
|
+
_content_type=_content_type,
|
|
766
|
+
_headers=_headers,
|
|
767
|
+
_host_index=_host_index
|
|
768
|
+
)
|
|
769
|
+
|
|
770
|
+
_response_types_map: Dict[str, Optional[str]] = {
|
|
771
|
+
'200': "AddressResponse",
|
|
772
|
+
'400': None,
|
|
773
|
+
'401': None,
|
|
774
|
+
'500': None,
|
|
775
|
+
}
|
|
776
|
+
response_data = await self.api_client.call_api(
|
|
777
|
+
*_param,
|
|
778
|
+
_request_timeout=_request_timeout
|
|
779
|
+
)
|
|
780
|
+
return response_data.response
|
|
781
|
+
|
|
782
|
+
|
|
783
|
+
def _addresses_update_address_serialize(
|
|
784
|
+
self,
|
|
785
|
+
update_address_request,
|
|
786
|
+
_request_auth,
|
|
787
|
+
_content_type,
|
|
788
|
+
_headers,
|
|
789
|
+
_host_index,
|
|
790
|
+
) -> RequestSerialized:
|
|
791
|
+
|
|
792
|
+
_host = None
|
|
793
|
+
|
|
794
|
+
_collection_formats: Dict[str, str] = {
|
|
795
|
+
}
|
|
796
|
+
|
|
797
|
+
_path_params: Dict[str, str] = {}
|
|
798
|
+
_query_params: List[Tuple[str, str]] = []
|
|
799
|
+
_header_params: Dict[str, Optional[str]] = _headers or {}
|
|
800
|
+
_form_params: List[Tuple[str, str]] = []
|
|
801
|
+
_files: Dict[
|
|
802
|
+
str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]]
|
|
803
|
+
] = {}
|
|
804
|
+
_body_params: Optional[bytes] = None
|
|
805
|
+
|
|
806
|
+
# process the path parameters
|
|
807
|
+
# process the query parameters
|
|
808
|
+
# process the header parameters
|
|
809
|
+
# process the form parameters
|
|
810
|
+
# process the body parameter
|
|
811
|
+
if update_address_request is not None:
|
|
812
|
+
_body_params = update_address_request
|
|
813
|
+
|
|
814
|
+
|
|
815
|
+
# set the HTTP header `Accept`
|
|
816
|
+
if 'Accept' not in _header_params:
|
|
817
|
+
_header_params['Accept'] = self.api_client.select_header_accept(
|
|
818
|
+
[
|
|
819
|
+
'application/json'
|
|
820
|
+
]
|
|
821
|
+
)
|
|
822
|
+
|
|
823
|
+
# set the HTTP header `Content-Type`
|
|
824
|
+
if _content_type:
|
|
825
|
+
_header_params['Content-Type'] = _content_type
|
|
826
|
+
else:
|
|
827
|
+
_default_content_type = (
|
|
828
|
+
self.api_client.select_header_content_type(
|
|
829
|
+
[
|
|
830
|
+
'application/json'
|
|
831
|
+
]
|
|
832
|
+
)
|
|
833
|
+
)
|
|
834
|
+
if _default_content_type is not None:
|
|
835
|
+
_header_params['Content-Type'] = _default_content_type
|
|
836
|
+
|
|
837
|
+
# authentication setting
|
|
838
|
+
_auth_settings: List[str] = [
|
|
839
|
+
'endUserHashed',
|
|
840
|
+
'endUser',
|
|
841
|
+
'apiKey',
|
|
842
|
+
'clientCredentials'
|
|
843
|
+
]
|
|
844
|
+
|
|
845
|
+
return self.api_client.param_serialize(
|
|
846
|
+
method='PATCH',
|
|
847
|
+
resource_path='/addresses',
|
|
848
|
+
path_params=_path_params,
|
|
849
|
+
query_params=_query_params,
|
|
850
|
+
header_params=_header_params,
|
|
851
|
+
body=_body_params,
|
|
852
|
+
post_params=_form_params,
|
|
853
|
+
files=_files,
|
|
854
|
+
auth_settings=_auth_settings,
|
|
855
|
+
collection_formats=_collection_formats,
|
|
856
|
+
_host=_host,
|
|
857
|
+
_request_auth=_request_auth
|
|
858
|
+
)
|
|
859
|
+
|
|
860
|
+
|