Skip to content

Commit 99036e7

Browse files
author
Elasticemail
committed
api update
1 parent 9a367c7 commit 99036e7

File tree

142 files changed

+7612
-7340
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

142 files changed

+7612
-7340
lines changed

ElasticEmail/__init__.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@
1111
"""
1212

1313

14-
__version__ = "4.0.13"
14+
__version__ = "4.0.15"
1515

1616
# import ApiClient
1717
from ElasticEmail.api_client import ApiClient

ElasticEmail/api/campaigns_api.py

+347-356
Large diffs are not rendered by default.

ElasticEmail/api/contacts_api.py

+696-713
Large diffs are not rendered by default.

ElasticEmail/api/emails_api.py

+273-280
Large diffs are not rendered by default.

ElasticEmail/api/events_api.py

+506-516
Large diffs are not rendered by default.

ElasticEmail/api/files_api.py

+343-352
Large diffs are not rendered by default.

ElasticEmail/api/inbound_route_api.py

+413-424
Large diffs are not rendered by default.

ElasticEmail/api/lists_api.py

+492-505
Large diffs are not rendered by default.

ElasticEmail/api/security_api.py

+694-713
Large diffs are not rendered by default.

ElasticEmail/api/segments_api.py

+346-355
Large diffs are not rendered by default.

ElasticEmail/api/statistics_api.py

+340-349
Large diffs are not rendered by default.

ElasticEmail/api/sub_accounts_api.py

+419-430
Large diffs are not rendered by default.

ElasticEmail/api/suppressions_api.py

+807-830
Large diffs are not rendered by default.

ElasticEmail/api/templates_api.py

+354-363
Large diffs are not rendered by default.

ElasticEmail/api/verifications_api.py

+680-699
Large diffs are not rendered by default.

ElasticEmail/api_client.py

+8-7
Original file line numberDiff line numberDiff line change
@@ -77,7 +77,7 @@ def __init__(self, configuration=None, header_name=None, header_value=None,
7777
self.default_headers[header_name] = header_value
7878
self.cookie = cookie
7979
# Set default User-Agent.
80-
self.user_agent = 'OpenAPI-Generator/4.0.13/python'
80+
self.user_agent = 'OpenAPI-Generator/4.0.15/python'
8181

8282
def __enter__(self):
8383
return self
@@ -589,12 +589,12 @@ def select_header_content_type(self, content_types):
589589
else:
590590
return content_types[0]
591591

592-
def update_params_for_auth(self, headers, querys, auth_settings,
592+
def update_params_for_auth(self, headers, queries, auth_settings,
593593
resource_path, method, body):
594594
"""Updates header and query params based on authentication setting.
595595
596596
:param headers: Header parameters dict to be updated.
597-
:param querys: Query parameters tuple list to be updated.
597+
:param queries: Query parameters tuple list to be updated.
598598
:param auth_settings: Authentication setting identifiers list.
599599
:param resource_path: A string representation of the HTTP request resource path.
600600
:param method: A string representation of the HTTP request method.
@@ -613,7 +613,7 @@ def update_params_for_auth(self, headers, querys, auth_settings,
613613
if auth_setting['type'] != 'http-signature':
614614
headers[auth_setting['key']] = auth_setting['value']
615615
elif auth_setting['in'] == 'query':
616-
querys.append((auth_setting['key'], auth_setting['value']))
616+
queries.append((auth_setting['key'], auth_setting['value']))
617617
else:
618618
raise ApiValueError(
619619
'Authentication token must be in `query` or `header`'
@@ -827,9 +827,10 @@ def call_with_http_info(self, **kwargs):
827827

828828
content_type_headers_list = self.headers_map['content_type']
829829
if content_type_headers_list:
830-
header_list = self.api_client.select_header_content_type(
831-
content_type_headers_list)
832-
params['header']['Content-Type'] = header_list
830+
if params['body'] != "":
831+
header_list = self.api_client.select_header_content_type(
832+
content_type_headers_list)
833+
params['header']['Content-Type'] = header_list
833834

834835
return self.api_client.call_api(
835836
self.settings['endpoint_path'], self.settings['http_method'],

ElasticEmail/configuration.py

+2-2
Original file line numberDiff line numberDiff line change
@@ -74,7 +74,7 @@ class Configuration(object):
7474
:param server_operation_variables: Mapping from operation ID to a mapping with
7575
string values to replace variables in templated server configuration.
7676
The validation of enums is performed for variables with defined enum values before.
77-
:param ssl_ca_cert: str - the path to a file of concatenated CA certificates
77+
:param ssl_ca_cert: str - the path to a file of concatenated CA certificates
7878
in PEM format
7979
8080
:Example:
@@ -407,7 +407,7 @@ def to_debug_report(self):
407407
"OS: {env}\n"\
408408
"Python Version: {pyversion}\n"\
409409
"Version of the API: 4.0.0\n"\
410-
"SDK Package Version: 4.0.13".\
410+
"SDK Package Version: 4.0.15".\
411411
format(env=sys.platform, pyversion=sys.version)
412412

413413
def get_host_settings(self):

ElasticEmail/model/access_level.py

+1-7
Original file line numberDiff line numberDiff line change
@@ -106,13 +106,7 @@ class AccessLevel(ModelSimple):
106106
validations = {
107107
}
108108

109-
@cached_property
110-
def additional_properties_type():
111-
"""
112-
This must be a method because a model may have properties that are
113-
of type self, this must run after the class is loaded
114-
"""
115-
return (bool, date, datetime, dict, float, int, list, str, none_type,) # noqa: E501
109+
additional_properties_type = None
116110

117111
_nullable = False
118112

ElasticEmail/model/account_status_enum.py

+1-7
Original file line numberDiff line numberDiff line change
@@ -64,13 +64,7 @@ class AccountStatusEnum(ModelSimple):
6464
validations = {
6565
}
6666

67-
@cached_property
68-
def additional_properties_type():
69-
"""
70-
This must be a method because a model may have properties that are
71-
of type self, this must run after the class is loaded
72-
"""
73-
return (bool, date, datetime, dict, float, int, list, str, none_type,) # noqa: E501
67+
additional_properties_type = None
7468

7569
_nullable = False
7670

ElasticEmail/model/body_content_type.py

+1-7
Original file line numberDiff line numberDiff line change
@@ -63,13 +63,7 @@ class BodyContentType(ModelSimple):
6363
validations = {
6464
}
6565

66-
@cached_property
67-
def additional_properties_type():
68-
"""
69-
This must be a method because a model may have properties that are
70-
of type self, this must run after the class is loaded
71-
"""
72-
return (bool, date, datetime, dict, float, int, list, str, none_type,) # noqa: E501
66+
additional_properties_type = None
7367

7468
_nullable = False
7569

ElasticEmail/model/body_part.py

+9-3
Original file line numberDiff line numberDiff line change
@@ -30,6 +30,10 @@
3030
from ElasticEmail.exceptions import ApiAttributeError
3131

3232

33+
def lazy_import():
34+
from ElasticEmail.model.body_content_type import BodyContentType
35+
globals()['BodyContentType'] = BodyContentType
36+
3337

3438
class BodyPart(ModelNormal):
3539
"""NOTE: This class is auto generated by OpenAPI Generator.
@@ -67,6 +71,7 @@ def additional_properties_type():
6771
This must be a method because a model may have properties that are
6872
of type self, this must run after the class is loaded
6973
"""
74+
lazy_import()
7075
return (bool, date, datetime, dict, float, int, list, str, none_type,) # noqa: E501
7176

7277
_nullable = False
@@ -81,8 +86,9 @@ def openapi_types():
8186
openapi_types (dict): The key is attribute name
8287
and the value is attribute type.
8388
"""
89+
lazy_import()
8490
return {
85-
'content_type': (dict,), # noqa: E501
91+
'content_type': (BodyContentType,), # noqa: E501
8692
'content': (str,), # noqa: E501
8793
'charset': (str,), # noqa: E501
8894
}
@@ -109,7 +115,7 @@ def _from_openapi_data(cls, content_type, *args, **kwargs): # noqa: E501
109115
"""BodyPart - a model defined in OpenAPI
110116
111117
Args:
112-
content_type (dict): Type of the body part
118+
content_type (BodyContentType):
113119
114120
Keyword Args:
115121
_check_type (bool): if True, values for parameters in openapi_types
@@ -196,7 +202,7 @@ def __init__(self, content_type, *args, **kwargs): # noqa: E501
196202
"""BodyPart - a model defined in OpenAPI
197203
198204
Args:
199-
content_type (dict): Type of the body part
205+
content_type (BodyContentType):
200206
201207
Keyword Args:
202208
_check_type (bool): if True, values for parameters in openapi_types

ElasticEmail/model/campaign.py

+15-9
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,13 @@
3131

3232

3333
def lazy_import():
34+
from ElasticEmail.model.campaign_options import CampaignOptions
35+
from ElasticEmail.model.campaign_recipient import CampaignRecipient
36+
from ElasticEmail.model.campaign_status import CampaignStatus
3437
from ElasticEmail.model.campaign_template import CampaignTemplate
38+
globals()['CampaignOptions'] = CampaignOptions
39+
globals()['CampaignRecipient'] = CampaignRecipient
40+
globals()['CampaignStatus'] = CampaignStatus
3541
globals()['CampaignTemplate'] = CampaignTemplate
3642

3743

@@ -89,10 +95,10 @@ def openapi_types():
8995
lazy_import()
9096
return {
9197
'name': (str,), # noqa: E501
92-
'recipients': (dict,), # noqa: E501
98+
'recipients': (CampaignRecipient,), # noqa: E501
9399
'content': ([CampaignTemplate],), # noqa: E501
94-
'status': (dict,), # noqa: E501
95-
'options': (dict,), # noqa: E501
100+
'status': (CampaignStatus,), # noqa: E501
101+
'options': (CampaignOptions,), # noqa: E501
96102
}
97103

98104
@cached_property
@@ -120,7 +126,7 @@ def _from_openapi_data(cls, name, recipients, *args, **kwargs): # noqa: E501
120126
121127
Args:
122128
name (str): Campaign name
123-
recipients (dict): Recipients this campaign should be sent to
129+
recipients (CampaignRecipient):
124130
125131
Keyword Args:
126132
_check_type (bool): if True, values for parameters in openapi_types
@@ -154,8 +160,8 @@ def _from_openapi_data(cls, name, recipients, *args, **kwargs): # noqa: E501
154160
through its discriminator because we passed in
155161
_visited_composed_classes = (Animal,)
156162
content ([CampaignTemplate]): Campaign's email content. Provide multiple items to send an A/X Split Campaign. [optional] # noqa: E501
157-
status (dict): Campaign status. [optional] # noqa: E501
158-
options (dict): Campaign sending options. [optional] # noqa: E501
163+
status (CampaignStatus): [optional] # noqa: E501
164+
options (CampaignOptions): [optional] # noqa: E501
159165
"""
160166

161167
_check_type = kwargs.pop('_check_type', True)
@@ -210,7 +216,7 @@ def __init__(self, name, recipients, *args, **kwargs): # noqa: E501
210216
211217
Args:
212218
name (str): Campaign name
213-
recipients (dict): Recipients this campaign should be sent to
219+
recipients (CampaignRecipient):
214220
215221
Keyword Args:
216222
_check_type (bool): if True, values for parameters in openapi_types
@@ -244,8 +250,8 @@ def __init__(self, name, recipients, *args, **kwargs): # noqa: E501
244250
through its discriminator because we passed in
245251
_visited_composed_classes = (Animal,)
246252
content ([CampaignTemplate]): Campaign's email content. Provide multiple items to send an A/X Split Campaign. [optional] # noqa: E501
247-
status (dict): Campaign status. [optional] # noqa: E501
248-
options (dict): Campaign sending options. [optional] # noqa: E501
253+
status (CampaignStatus): [optional] # noqa: E501
254+
options (CampaignOptions): [optional] # noqa: E501
249255
"""
250256

251257
_check_type = kwargs.pop('_check_type', True)

ElasticEmail/model/campaign_options.py

+14-6
Original file line numberDiff line numberDiff line change
@@ -30,6 +30,12 @@
3030
from ElasticEmail.exceptions import ApiAttributeError
3131

3232

33+
def lazy_import():
34+
from ElasticEmail.model.delivery_optimization_type import DeliveryOptimizationType
35+
from ElasticEmail.model.split_options import SplitOptions
36+
globals()['DeliveryOptimizationType'] = DeliveryOptimizationType
37+
globals()['SplitOptions'] = SplitOptions
38+
3339

3440
class CampaignOptions(ModelNormal):
3541
"""NOTE: This class is auto generated by OpenAPI Generator.
@@ -67,6 +73,7 @@ def additional_properties_type():
6773
This must be a method because a model may have properties that are
6874
of type self, this must run after the class is loaded
6975
"""
76+
lazy_import()
7077
return (bool, date, datetime, dict, float, int, list, str, none_type,) # noqa: E501
7178

7279
_nullable = False
@@ -81,12 +88,13 @@ def openapi_types():
8188
openapi_types (dict): The key is attribute name
8289
and the value is attribute type.
8390
"""
91+
lazy_import()
8492
return {
85-
'delivery_optimization': (dict,), # noqa: E501
93+
'delivery_optimization': (DeliveryOptimizationType,), # noqa: E501
8694
'track_opens': (bool, none_type,), # noqa: E501
8795
'track_clicks': (bool, none_type,), # noqa: E501
8896
'schedule_for': (datetime, none_type,), # noqa: E501
89-
'split_options': (dict,), # noqa: E501
97+
'split_options': (SplitOptions,), # noqa: E501
9098
}
9199

92100
@cached_property
@@ -143,11 +151,11 @@ def _from_openapi_data(cls, *args, **kwargs): # noqa: E501
143151
Animal class but this time we won't travel
144152
through its discriminator because we passed in
145153
_visited_composed_classes = (Animal,)
146-
delivery_optimization (dict): How to order email delivery - by recipients' engagement score or by the time they open the most of the emails that were sent to them. [optional] # noqa: E501
154+
delivery_optimization (DeliveryOptimizationType): [optional] # noqa: E501
147155
track_opens (bool, none_type): Should the opens be tracked? If no value has been provided, Account's default setting will be used.. [optional] # noqa: E501
148156
track_clicks (bool, none_type): Should the clicks be tracked? If no value has been provided, Account's default setting will be used.. [optional] # noqa: E501
149157
schedule_for (datetime, none_type): Date when this Campaign is scheduled to be sent on. [optional] # noqa: E501
150-
split_options (dict): Optional options for A/X split campaigns. Will be ignored if only one template content was provided. [optional] # noqa: E501
158+
split_options (SplitOptions): [optional] # noqa: E501
151159
"""
152160

153161
_check_type = kwargs.pop('_check_type', True)
@@ -229,11 +237,11 @@ def __init__(self, *args, **kwargs): # noqa: E501
229237
Animal class but this time we won't travel
230238
through its discriminator because we passed in
231239
_visited_composed_classes = (Animal,)
232-
delivery_optimization (dict): How to order email delivery - by recipients' engagement score or by the time they open the most of the emails that were sent to them. [optional] # noqa: E501
240+
delivery_optimization (DeliveryOptimizationType): [optional] # noqa: E501
233241
track_opens (bool, none_type): Should the opens be tracked? If no value has been provided, Account's default setting will be used.. [optional] # noqa: E501
234242
track_clicks (bool, none_type): Should the clicks be tracked? If no value has been provided, Account's default setting will be used.. [optional] # noqa: E501
235243
schedule_for (datetime, none_type): Date when this Campaign is scheduled to be sent on. [optional] # noqa: E501
236-
split_options (dict): Optional options for A/X split campaigns. Will be ignored if only one template content was provided. [optional] # noqa: E501
244+
split_options (SplitOptions): [optional] # noqa: E501
237245
"""
238246

239247
_check_type = kwargs.pop('_check_type', True)

ElasticEmail/model/campaign_status.py

+1-7
Original file line numberDiff line numberDiff line change
@@ -67,13 +67,7 @@ class CampaignStatus(ModelSimple):
6767
validations = {
6868
}
6969

70-
@cached_property
71-
def additional_properties_type():
72-
"""
73-
This must be a method because a model may have properties that are
74-
of type self, this must run after the class is loaded
75-
"""
76-
return (bool, date, datetime, dict, float, int, list, str, none_type,) # noqa: E501
70+
additional_properties_type = None
7771

7872
_nullable = False
7973

ElasticEmail/model/campaign_template.py

+9-3
Original file line numberDiff line numberDiff line change
@@ -30,6 +30,10 @@
3030
from ElasticEmail.exceptions import ApiAttributeError
3131

3232

33+
def lazy_import():
34+
from ElasticEmail.model.utm import Utm
35+
globals()['Utm'] = Utm
36+
3337

3438
class CampaignTemplate(ModelNormal):
3539
"""NOTE: This class is auto generated by OpenAPI Generator.
@@ -67,6 +71,7 @@ def additional_properties_type():
6771
This must be a method because a model may have properties that are
6872
of type self, this must run after the class is loaded
6973
"""
74+
lazy_import()
7075
return (bool, date, datetime, dict, float, int, list, str, none_type,) # noqa: E501
7176

7277
_nullable = False
@@ -81,14 +86,15 @@ def openapi_types():
8186
openapi_types (dict): The key is attribute name
8287
and the value is attribute type.
8388
"""
89+
lazy_import()
8490
return {
8591
'poolname': (str,), # noqa: E501
8692
'_from': (str,), # noqa: E501
8793
'reply_to': (str,), # noqa: E501
8894
'subject': (str,), # noqa: E501
8995
'template_name': (str,), # noqa: E501
9096
'attach_files': ([str],), # noqa: E501
91-
'utm': (dict,), # noqa: E501
97+
'utm': (Utm,), # noqa: E501
9298
}
9399

94100
@cached_property
@@ -153,7 +159,7 @@ def _from_openapi_data(cls, *args, **kwargs): # noqa: E501
153159
subject (str): Default subject of email.. [optional] # noqa: E501
154160
template_name (str): Name of template.. [optional] # noqa: E501
155161
attach_files ([str]): Names of previously uploaded files that should be sent as downloadable attachments. [optional] # noqa: E501
156-
utm (dict): Utm marketing data to be attached to every link in this e-mail.. [optional] # noqa: E501
162+
utm (Utm): [optional] # noqa: E501
157163
"""
158164

159165
_check_type = kwargs.pop('_check_type', True)
@@ -241,7 +247,7 @@ def __init__(self, *args, **kwargs): # noqa: E501
241247
subject (str): Default subject of email.. [optional] # noqa: E501
242248
template_name (str): Name of template.. [optional] # noqa: E501
243249
attach_files ([str]): Names of previously uploaded files that should be sent as downloadable attachments. [optional] # noqa: E501
244-
utm (dict): Utm marketing data to be attached to every link in this e-mail.. [optional] # noqa: E501
250+
utm (Utm): [optional] # noqa: E501
245251
"""
246252

247253
_check_type = kwargs.pop('_check_type', True)

ElasticEmail/model/compression_format.py

+1-7
Original file line numberDiff line numberDiff line change
@@ -61,13 +61,7 @@ class CompressionFormat(ModelSimple):
6161
validations = {
6262
}
6363

64-
@cached_property
65-
def additional_properties_type():
66-
"""
67-
This must be a method because a model may have properties that are
68-
of type self, this must run after the class is loaded
69-
"""
70-
return (bool, date, datetime, dict, float, int, list, str, none_type,) # noqa: E501
64+
additional_properties_type = None
7165

7266
_nullable = False
7367

0 commit comments

Comments
 (0)