Skip to content

Commit 2b216de

Browse files
Merge pull request #28 from sendinblue/feature_updated_swagger_sync
SABT functionality updates and response schemas correction
2 parents 1927281 + 81d6a4f commit 2b216de

15 files changed

+278
-90
lines changed

README.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -209,6 +209,7 @@ Class | Method | HTTP request | Description
209209
- [CreateSmtpEmail](docs/CreateSmtpEmail.md)
210210
- [CreateSmtpTemplate](docs/CreateSmtpTemplate.md)
211211
- [CreateSmtpTemplateSender](docs/CreateSmtpTemplateSender.md)
212+
- [CreateUpdateContactModel](docs/CreateUpdateContactModel.md)
212213
- [CreateUpdateFolder](docs/CreateUpdateFolder.md)
213214
- [CreateWebhook](docs/CreateWebhook.md)
214215
- [CreatedProcessId](docs/CreatedProcessId.md)

docs/ContactsApi.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -142,7 +142,7 @@ void (empty response body)
142142
[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md)
143143

144144
# **create_contact**
145-
> CreateModel create_contact(create_contact)
145+
> CreateUpdateContactModel create_contact(create_contact)
146146
147147
Create a contact
148148

@@ -180,7 +180,7 @@ Name | Type | Description | Notes
180180

181181
### Return type
182182

183-
[**CreateModel**](CreateModel.md)
183+
[**CreateUpdateContactModel**](CreateUpdateContactModel.md)
184184

185185
### Authorization
186186

docs/CreateEmailCampaign.md

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -9,20 +9,19 @@ Name | Type | Description | Notes
99
**html_content** | **str** | Mandatory if htmlUrl and templateId are empty. Body of the message (HTML) | [optional]
1010
**html_url** | **str** | Mandatory if htmlContent and templateId are empty. Url to the message (HTML) | [optional]
1111
**template_id** | **int** | Mandatory if htmlContent and htmlUrl are empty. Id of the SMTP template with status 'active'. Used to copy only its content fetched from htmlContent/htmlUrl to an email campaign for RSS feature. | [optional]
12-
**scheduled_at** | **datetime** | Sending UTC date-time (YYYY-MM-DDTHH:mm:ss.SSSZ). Prefer to pass your timezone in date-time format for accurate result. | [optional]
12+
**scheduled_at** | **datetime** | Sending UTC date-time (YYYY-MM-DDTHH:mm:ss.SSSZ). Prefer to pass your timezone in date-time format for accurate result. If sendAtBestTime is set to true, your campaign will be sent according to the date passed (ignoring the time part). | [optional]
1313
**subject** | **str** | Subject of the campaign |
1414
**reply_to** | **str** | Email on which the campaign recipients will be able to reply to | [optional]
1515
**to_field** | **str** | To personalize the «To» Field. If you want to include the first name and last name of your recipient, add {FNAME} {LNAME}. These contact attributes must already exist in your SendinBlue account. If input parameter 'params' used please use {{contact.FNAME}} {{contact.LNAME}} for personalization | [optional]
1616
**recipients** | [**CreateEmailCampaignRecipients**](CreateEmailCampaignRecipients.md) | | [optional]
1717
**attachment_url** | **str** | Absolute url of the attachment (no local file). Extension allowed: xlsx, xls, ods, docx, docm, doc, csv, pdf, txt, gif, jpg, jpeg, png, tif, tiff, rtf, bmp, cgm, css, shtml, html, htm, zip, xml, ppt, pptx, tar, ez, ics, mobi, msg, pub and eps | [optional]
1818
**inline_image_activation** | **bool** | Use true to embedded the images in your email. Final size of the email should be less than 4MB. Campaigns with embedded images can not be sent to more than 5000 contacts | [optional] [default to False]
1919
**mirror_active** | **bool** | Use true to enable the mirror link | [optional]
20-
**recurring** | **bool** | For trigger campagins use false to make sure a contact receives the same campaign only once | [optional] [default to False]
21-
**type** | **str** | Type of the campaign |
2220
**footer** | **str** | Footer of the email campaign | [optional]
2321
**header** | **str** | Header of the email campaign | [optional]
2422
**utm_campaign** | **str** | Customize the utm_campaign value. If this field is empty, the campaign name will be used. Only alphanumeric characters and spaces are allowed | [optional]
2523
**params** | **object** | Pass the set of attributes to customize the type classic campaign. For example, {'FNAME':'Joe', 'LNAME':'Doe'}. Only available if 'type' is 'classic'. It's considered only if campaign is in New Template Language format. The New Template Language is dependent on the values of 'subject', 'htmlContent/htmlUrl', 'sender.name' & 'toField' | [optional]
24+
**send_at_best_time** | **bool** | Set this to true if you want to send your campaign at best time. | [optional] [default to False]
2625

2726
[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)
2827

docs/CreateUpdateContactModel.md

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
# CreateUpdateContactModel
2+
3+
## Properties
4+
Name | Type | Description | Notes
5+
------------ | ------------- | ------------- | -------------
6+
**id** | **int** | ID of the object created | [optional]
7+
8+
[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)
9+
10+

docs/PostContactInfoContacts.md

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,8 +3,9 @@
33
## Properties
44
Name | Type | Description | Notes
55
------------ | ------------- | ------------- | -------------
6-
**success** | **list[str]** | |
6+
**success** | **list[str]** | | [optional]
77
**failure** | **list[str]** | | [optional]
8+
**total** | **int** | Displays the count of total number of contacts removed from list when user opts for \"all\" option. | [optional]
89

910
[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)
1011

docs/UpdateEmailCampaign.md

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ Name | Type | Description | Notes
88
**name** | **str** | Name of the campaign | [optional]
99
**html_content** | **str** | Body of the message (HTML version). REQUIRED if htmlUrl is empty | [optional]
1010
**html_url** | **str** | Url which contents the body of the email message. REQUIRED if htmlContent is empty | [optional]
11-
**scheduled_at** | **datetime** | UTC date-time on which the campaign has to run (YYYY-MM-DDTHH:mm:ss.SSSZ). Prefer to pass your timezone in date-time format for accurate result. | [optional]
11+
**scheduled_at** | **datetime** | UTC date-time on which the campaign has to run (YYYY-MM-DDTHH:mm:ss.SSSZ). Prefer to pass your timezone in date-time format for accurate result. If sendAtBestTime is set to true, your campaign will be sent according to the date passed (ignoring the time part). | [optional]
1212
**subject** | **str** | Subject of the campaign | [optional]
1313
**reply_to** | **str** | Email on which campaign recipients will be able to reply to | [optional]
1414
**to_field** | **str** | To personalize the «To» Field. If you want to include the first name and last name of your recipient, add {FNAME} {LNAME}. These contact attributes must already exist in your SendinBlue account. If input parameter 'params' used please use {{contact.FNAME}} {{contact.LNAME}} for personalization | [optional]
@@ -21,6 +21,7 @@ Name | Type | Description | Notes
2121
**header** | **str** | Header of the email campaign | [optional]
2222
**utm_campaign** | **str** | Customize the utm_campaign value. If this field is empty, the campaign name will be used. Only alphanumeric characters and spaces are allowed | [optional]
2323
**params** | **object** | Pass the set of attributes to customize the type 'classic' campaign. For example, {'FNAME':'Joe', 'LNAME':'Doe'}. The 'params' field will get updated, only if the campaign is in New Template Language, else ignored. The New Template Language is dependent on the values of 'subject', 'htmlContent/htmlUrl', 'sender.name' & 'toField' | [optional]
24+
**send_at_best_time** | **bool** | Set this to true if you want to send your campaign at best time. Note:- if true, warmup ip will be disabled. | [optional]
2425

2526
[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)
2627

setup.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@
1515
from setuptools import setup, find_packages
1616

1717
NAME = "sib-api-v3-sdk"
18-
VERSION = "4.1.3"
18+
VERSION = "4.2.0"
1919
# To install the library, run the following
2020
#
2121
# python setup.py install

sib_api_v3_sdk/__init__.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -54,6 +54,7 @@
5454
from sib_api_v3_sdk.models.create_smtp_email import CreateSmtpEmail
5555
from sib_api_v3_sdk.models.create_smtp_template import CreateSmtpTemplate
5656
from sib_api_v3_sdk.models.create_smtp_template_sender import CreateSmtpTemplateSender
57+
from sib_api_v3_sdk.models.create_update_contact_model import CreateUpdateContactModel
5758
from sib_api_v3_sdk.models.create_update_folder import CreateUpdateFolder
5859
from sib_api_v3_sdk.models.create_webhook import CreateWebhook
5960
from sib_api_v3_sdk.models.created_process_id import CreatedProcessId

sib_api_v3_sdk/api/contacts_api.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -261,7 +261,7 @@ def create_contact(self, create_contact, **kwargs): # noqa: E501
261261
262262
:param async bool
263263
:param CreateContact create_contact: Values to create a contact (required)
264-
:return: CreateModel
264+
:return: CreateUpdateContactModel
265265
If the method is called asynchronously,
266266
returns the request thread.
267267
"""
@@ -282,7 +282,7 @@ def create_contact_with_http_info(self, create_contact, **kwargs): # noqa: E501
282282
283283
:param async bool
284284
:param CreateContact create_contact: Values to create a contact (required)
285-
:return: CreateModel
285+
:return: CreateUpdateContactModel
286286
If the method is called asynchronously,
287287
returns the request thread.
288288
"""
@@ -340,7 +340,7 @@ def create_contact_with_http_info(self, create_contact, **kwargs): # noqa: E501
340340
body=body_params,
341341
post_params=form_params,
342342
files=local_var_files,
343-
response_type='CreateModel', # noqa: E501
343+
response_type='CreateUpdateContactModel', # noqa: E501
344344
auth_settings=auth_settings,
345345
async=params.get('async'),
346346
_return_http_data_only=params.get('_return_http_data_only'),

sib_api_v3_sdk/models/__init__.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -35,6 +35,7 @@
3535
from sib_api_v3_sdk.models.create_smtp_email import CreateSmtpEmail
3636
from sib_api_v3_sdk.models.create_smtp_template import CreateSmtpTemplate
3737
from sib_api_v3_sdk.models.create_smtp_template_sender import CreateSmtpTemplateSender
38+
from sib_api_v3_sdk.models.create_update_contact_model import CreateUpdateContactModel
3839
from sib_api_v3_sdk.models.create_update_folder import CreateUpdateFolder
3940
from sib_api_v3_sdk.models.create_webhook import CreateWebhook
4041
from sib_api_v3_sdk.models.created_process_id import CreatedProcessId

sib_api_v3_sdk/models/create_email_campaign.py

Lines changed: 33 additions & 68 deletions
Original file line numberDiff line numberDiff line change
@@ -48,12 +48,11 @@ class CreateEmailCampaign(object):
4848
'attachment_url': 'str',
4949
'inline_image_activation': 'bool',
5050
'mirror_active': 'bool',
51-
'recurring': 'bool',
52-
'type': 'str',
5351
'footer': 'str',
5452
'header': 'str',
5553
'utm_campaign': 'str',
56-
'params': 'object'
54+
'params': 'object',
55+
'send_at_best_time': 'bool'
5756
}
5857

5958
attribute_map = {
@@ -71,15 +70,14 @@ class CreateEmailCampaign(object):
7170
'attachment_url': 'attachmentUrl',
7271
'inline_image_activation': 'inlineImageActivation',
7372
'mirror_active': 'mirrorActive',
74-
'recurring': 'recurring',
75-
'type': 'type',
7673
'footer': 'footer',
7774
'header': 'header',
7875
'utm_campaign': 'utmCampaign',
79-
'params': 'params'
76+
'params': 'params',
77+
'send_at_best_time': 'sendAtBestTime'
8078
}
8179

82-
def __init__(self, tag=None, sender=None, name=None, html_content=None, html_url=None, template_id=None, scheduled_at=None, subject=None, reply_to=None, to_field=None, recipients=None, attachment_url=None, inline_image_activation=False, mirror_active=None, recurring=False, type=None, footer=None, header=None, utm_campaign=None, params=None): # noqa: E501
80+
def __init__(self, tag=None, sender=None, name=None, html_content=None, html_url=None, template_id=None, scheduled_at=None, subject=None, reply_to=None, to_field=None, recipients=None, attachment_url=None, inline_image_activation=False, mirror_active=None, footer=None, header=None, utm_campaign=None, params=None, send_at_best_time=False): # noqa: E501
8381
"""CreateEmailCampaign - a model defined in Swagger""" # noqa: E501
8482

8583
self._tag = None
@@ -96,12 +94,11 @@ def __init__(self, tag=None, sender=None, name=None, html_content=None, html_url
9694
self._attachment_url = None
9795
self._inline_image_activation = None
9896
self._mirror_active = None
99-
self._recurring = None
100-
self._type = None
10197
self._footer = None
10298
self._header = None
10399
self._utm_campaign = None
104100
self._params = None
101+
self._send_at_best_time = None
105102
self.discriminator = None
106103

107104
if tag is not None:
@@ -129,9 +126,6 @@ def __init__(self, tag=None, sender=None, name=None, html_content=None, html_url
129126
self.inline_image_activation = inline_image_activation
130127
if mirror_active is not None:
131128
self.mirror_active = mirror_active
132-
if recurring is not None:
133-
self.recurring = recurring
134-
self.type = type
135129
if footer is not None:
136130
self.footer = footer
137131
if header is not None:
@@ -140,6 +134,8 @@ def __init__(self, tag=None, sender=None, name=None, html_content=None, html_url
140134
self.utm_campaign = utm_campaign
141135
if params is not None:
142136
self.params = params
137+
if send_at_best_time is not None:
138+
self.send_at_best_time = send_at_best_time
143139

144140
@property
145141
def tag(self):
@@ -285,7 +281,7 @@ def template_id(self, template_id):
285281
def scheduled_at(self):
286282
"""Gets the scheduled_at of this CreateEmailCampaign. # noqa: E501
287283
288-
Sending UTC date-time (YYYY-MM-DDTHH:mm:ss.SSSZ). Prefer to pass your timezone in date-time format for accurate result. # noqa: E501
284+
Sending UTC date-time (YYYY-MM-DDTHH:mm:ss.SSSZ). Prefer to pass your timezone in date-time format for accurate result. If sendAtBestTime is set to true, your campaign will be sent according to the date passed (ignoring the time part). # noqa: E501
289285
290286
:return: The scheduled_at of this CreateEmailCampaign. # noqa: E501
291287
:rtype: datetime
@@ -296,7 +292,7 @@ def scheduled_at(self):
296292
def scheduled_at(self, scheduled_at):
297293
"""Sets the scheduled_at of this CreateEmailCampaign.
298294
299-
Sending UTC date-time (YYYY-MM-DDTHH:mm:ss.SSSZ). Prefer to pass your timezone in date-time format for accurate result. # noqa: E501
295+
Sending UTC date-time (YYYY-MM-DDTHH:mm:ss.SSSZ). Prefer to pass your timezone in date-time format for accurate result. If sendAtBestTime is set to true, your campaign will be sent according to the date passed (ignoring the time part). # noqa: E501
300296
301297
:param scheduled_at: The scheduled_at of this CreateEmailCampaign. # noqa: E501
302298
:type: datetime
@@ -465,60 +461,6 @@ def mirror_active(self, mirror_active):
465461

466462
self._mirror_active = mirror_active
467463

468-
@property
469-
def recurring(self):
470-
"""Gets the recurring of this CreateEmailCampaign. # noqa: E501
471-
472-
For trigger campagins use false to make sure a contact receives the same campaign only once # noqa: E501
473-
474-
:return: The recurring of this CreateEmailCampaign. # noqa: E501
475-
:rtype: bool
476-
"""
477-
return self._recurring
478-
479-
@recurring.setter
480-
def recurring(self, recurring):
481-
"""Sets the recurring of this CreateEmailCampaign.
482-
483-
For trigger campagins use false to make sure a contact receives the same campaign only once # noqa: E501
484-
485-
:param recurring: The recurring of this CreateEmailCampaign. # noqa: E501
486-
:type: bool
487-
"""
488-
489-
self._recurring = recurring
490-
491-
@property
492-
def type(self):
493-
"""Gets the type of this CreateEmailCampaign. # noqa: E501
494-
495-
Type of the campaign # noqa: E501
496-
497-
:return: The type of this CreateEmailCampaign. # noqa: E501
498-
:rtype: str
499-
"""
500-
return self._type
501-
502-
@type.setter
503-
def type(self, type):
504-
"""Sets the type of this CreateEmailCampaign.
505-
506-
Type of the campaign # noqa: E501
507-
508-
:param type: The type of this CreateEmailCampaign. # noqa: E501
509-
:type: str
510-
"""
511-
if type is None:
512-
raise ValueError("Invalid value for `type`, must not be `None`") # noqa: E501
513-
allowed_values = ["classic", "trigger"] # noqa: E501
514-
if type not in allowed_values:
515-
raise ValueError(
516-
"Invalid value for `type` ({0}), must be one of {1}" # noqa: E501
517-
.format(type, allowed_values)
518-
)
519-
520-
self._type = type
521-
522464
@property
523465
def footer(self):
524466
"""Gets the footer of this CreateEmailCampaign. # noqa: E501
@@ -611,6 +553,29 @@ def params(self, params):
611553

612554
self._params = params
613555

556+
@property
557+
def send_at_best_time(self):
558+
"""Gets the send_at_best_time of this CreateEmailCampaign. # noqa: E501
559+
560+
Set this to true if you want to send your campaign at best time. # noqa: E501
561+
562+
:return: The send_at_best_time of this CreateEmailCampaign. # noqa: E501
563+
:rtype: bool
564+
"""
565+
return self._send_at_best_time
566+
567+
@send_at_best_time.setter
568+
def send_at_best_time(self, send_at_best_time):
569+
"""Sets the send_at_best_time of this CreateEmailCampaign.
570+
571+
Set this to true if you want to send your campaign at best time. # noqa: E501
572+
573+
:param send_at_best_time: The send_at_best_time of this CreateEmailCampaign. # noqa: E501
574+
:type: bool
575+
"""
576+
577+
self._send_at_best_time = send_at_best_time
578+
614579
def to_dict(self):
615580
"""Returns the model properties as a dict"""
616581
result = {}

0 commit comments

Comments
 (0)