Skip to content

Commit 266f658

Browse files
Merge pull request #23 from sendinblue/feature_updated_swagger_sync
Swagger updates for additional parameters in email campaigns
2 parents a7a7aad + e3e1909 commit 266f658

9 files changed

+112
-25
lines changed

docs/CreateEmailCampaign.md

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -6,12 +6,13 @@ Name | Type | Description | Notes
66
**tag** | **str** | Tag of the campaign | [optional]
77
**sender** | [**CreateEmailCampaignSender**](CreateEmailCampaignSender.md) | |
88
**name** | **str** | Name of the campaign |
9-
**html_content** | **str** | Mandatory if htmlUrl is empty. Body of the message (HTML) | [optional]
10-
**html_url** | **str** | Mandatory if htmlContent is empty. Url to the message (HTML) | [optional]
9+
**html_content** | **str** | Mandatory if htmlUrl and templateId are empty. Body of the message (HTML) | [optional]
10+
**html_url** | **str** | Mandatory if htmlContent and templateId are empty. Url to the message (HTML) | [optional]
11+
**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]
1112
**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]
1213
**subject** | **str** | Subject of the campaign |
1314
**reply_to** | **str** | Email on which the campaign recipients will be able to reply to | [optional]
14-
**to_field** | **str** | To personalize the «To» Field, e.g. if you want to include the first name and last name of your recipient, use {FNAME} {LNAME}. These attributes must already exist in your contact database | [optional]
15+
**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]
1516
**recipients** | [**CreateEmailCampaignRecipients**](CreateEmailCampaignRecipients.md) | | [optional]
1617
**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]
1718
**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]
@@ -21,6 +22,7 @@ Name | Type | Description | Notes
2122
**footer** | **str** | Footer of the email campaign | [optional]
2223
**header** | **str** | Header of the email campaign | [optional]
2324
**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]
25+
**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' | [optional]
2426

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

docs/CreateSmtpTemplate.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ Name | Type | Description | Notes
1010
**html_url** | **str** | Url which contents the body of the email message. REQUIRED if htmlContent is empty | [optional]
1111
**subject** | **str** | Subject of the template |
1212
**reply_to** | **str** | Email on which campaign recipients will be able to reply to | [optional]
13-
**to_field** | **str** | This is to personalize the «To» Field. If you want to include the first name and last name of your recipient, add {FNAME} {LNAME}. To use the contact attributes here, these must already exist in SendinBlue account | [optional]
13+
**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]
1414
**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]
1515
**is_active** | **bool** | Status of template. isActive = true means template is active and isActive = false means template is inactive | [optional]
1616

docs/UpdateEmailCampaign.md

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ Name | Type | Description | Notes
1111
**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]
1212
**subject** | **str** | Subject of the campaign | [optional]
1313
**reply_to** | **str** | Email on which campaign recipients will be able to reply to | [optional]
14-
**to_field** | **str** | This is to personalize the «To» Field. If you want to include the first name and last name of your recipient, add {FNAME} {LNAME}. To use the contact attributes here, these must already exist in SendinBlue account | [optional]
14+
**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]
1515
**recipients** | [**UpdateEmailCampaignRecipients**](UpdateEmailCampaignRecipients.md) | | [optional]
1616
**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]
1717
**inline_image_activation** | **bool** | Status of inline image. inlineImageActivation = false means image can’t be embedded, & inlineImageActivation = true means image can be embedded, in the email. You cannot send a campaign of more than 4MB with images embedded in the email. Campaigns with the images embedded in the email must be sent to less than 5000 contacts. | [optional] [default to False]
@@ -20,6 +20,7 @@ Name | Type | Description | Notes
2020
**footer** | **str** | Footer of the email campaign | [optional]
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]
23+
**params** | **object** | Pass the set of attributes to customize the type 'classic' campaign. For example, {'FNAME':'Joe', 'LNAME':'Doe'}. | [optional]
2324

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

docs/UpdateSmtpTemplate.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ Name | Type | Description | Notes
1010
**html_url** | **str** | Required if htmlContent is empty. URL to the body of the email (HTML) | [optional]
1111
**subject** | **str** | Subject of the email | [optional]
1212
**reply_to** | **str** | Email on which campaign recipients will be able to reply to | [optional]
13-
**to_field** | **str** | To personalize the «To» Field, e.g. if you want to include the first name and last name of your recipient, add {FNAME} {LNAME}. These attributes must already exist in contacts database | [optional]
13+
**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]
1414
**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]
1515
**is_active** | **bool** | Status of the template. isActive = false means template is inactive, isActive = true means template is active | [optional]
1616

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.0"
18+
VERSION = "4.1.1"
1919
# To install the library, run the following
2020
#
2121
# python setup.py install

sib_api_v3_sdk/models/create_email_campaign.py

Lines changed: 65 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -39,6 +39,7 @@ class CreateEmailCampaign(object):
3939
'name': 'str',
4040
'html_content': 'str',
4141
'html_url': 'str',
42+
'template_id': 'int',
4243
'scheduled_at': 'datetime',
4344
'subject': 'str',
4445
'reply_to': 'str',
@@ -51,7 +52,8 @@ class CreateEmailCampaign(object):
5152
'type': 'str',
5253
'footer': 'str',
5354
'header': 'str',
54-
'utm_campaign': 'str'
55+
'utm_campaign': 'str',
56+
'params': 'object'
5557
}
5658

5759
attribute_map = {
@@ -60,6 +62,7 @@ class CreateEmailCampaign(object):
6062
'name': 'name',
6163
'html_content': 'htmlContent',
6264
'html_url': 'htmlUrl',
65+
'template_id': 'templateId',
6366
'scheduled_at': 'scheduledAt',
6467
'subject': 'subject',
6568
'reply_to': 'replyTo',
@@ -72,17 +75,19 @@ class CreateEmailCampaign(object):
7275
'type': 'type',
7376
'footer': 'footer',
7477
'header': 'header',
75-
'utm_campaign': 'utmCampaign'
78+
'utm_campaign': 'utmCampaign',
79+
'params': 'params'
7680
}
7781

78-
def __init__(self, tag=None, sender=None, name=None, html_content=None, html_url=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): # noqa: E501
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
7983
"""CreateEmailCampaign - a model defined in Swagger""" # noqa: E501
8084

8185
self._tag = None
8286
self._sender = None
8387
self._name = None
8488
self._html_content = None
8589
self._html_url = None
90+
self._template_id = None
8691
self._scheduled_at = None
8792
self._subject = None
8893
self._reply_to = None
@@ -96,6 +101,7 @@ def __init__(self, tag=None, sender=None, name=None, html_content=None, html_url
96101
self._footer = None
97102
self._header = None
98103
self._utm_campaign = None
104+
self._params = None
99105
self.discriminator = None
100106

101107
if tag is not None:
@@ -106,6 +112,8 @@ def __init__(self, tag=None, sender=None, name=None, html_content=None, html_url
106112
self.html_content = html_content
107113
if html_url is not None:
108114
self.html_url = html_url
115+
if template_id is not None:
116+
self.template_id = template_id
109117
if scheduled_at is not None:
110118
self.scheduled_at = scheduled_at
111119
self.subject = subject
@@ -130,6 +138,8 @@ def __init__(self, tag=None, sender=None, name=None, html_content=None, html_url
130138
self.header = header
131139
if utm_campaign is not None:
132140
self.utm_campaign = utm_campaign
141+
if params is not None:
142+
self.params = params
133143

134144
@property
135145
def tag(self):
@@ -206,7 +216,7 @@ def name(self, name):
206216
def html_content(self):
207217
"""Gets the html_content of this CreateEmailCampaign. # noqa: E501
208218
209-
Mandatory if htmlUrl is empty. Body of the message (HTML) # noqa: E501
219+
Mandatory if htmlUrl and templateId are empty. Body of the message (HTML) # noqa: E501
210220
211221
:return: The html_content of this CreateEmailCampaign. # noqa: E501
212222
:rtype: str
@@ -217,7 +227,7 @@ def html_content(self):
217227
def html_content(self, html_content):
218228
"""Sets the html_content of this CreateEmailCampaign.
219229
220-
Mandatory if htmlUrl is empty. Body of the message (HTML) # noqa: E501
230+
Mandatory if htmlUrl and templateId are empty. Body of the message (HTML) # noqa: E501
221231
222232
:param html_content: The html_content of this CreateEmailCampaign. # noqa: E501
223233
:type: str
@@ -229,7 +239,7 @@ def html_content(self, html_content):
229239
def html_url(self):
230240
"""Gets the html_url of this CreateEmailCampaign. # noqa: E501
231241
232-
Mandatory if htmlContent is empty. Url to the message (HTML) # noqa: E501
242+
Mandatory if htmlContent and templateId are empty. Url to the message (HTML) # noqa: E501
233243
234244
:return: The html_url of this CreateEmailCampaign. # noqa: E501
235245
:rtype: str
@@ -240,14 +250,37 @@ def html_url(self):
240250
def html_url(self, html_url):
241251
"""Sets the html_url of this CreateEmailCampaign.
242252
243-
Mandatory if htmlContent is empty. Url to the message (HTML) # noqa: E501
253+
Mandatory if htmlContent and templateId are empty. Url to the message (HTML) # noqa: E501
244254
245255
:param html_url: The html_url of this CreateEmailCampaign. # noqa: E501
246256
:type: str
247257
"""
248258

249259
self._html_url = html_url
250260

261+
@property
262+
def template_id(self):
263+
"""Gets the template_id of this CreateEmailCampaign. # noqa: E501
264+
265+
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. # noqa: E501
266+
267+
:return: The template_id of this CreateEmailCampaign. # noqa: E501
268+
:rtype: int
269+
"""
270+
return self._template_id
271+
272+
@template_id.setter
273+
def template_id(self, template_id):
274+
"""Sets the template_id of this CreateEmailCampaign.
275+
276+
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. # noqa: E501
277+
278+
:param template_id: The template_id of this CreateEmailCampaign. # noqa: E501
279+
:type: int
280+
"""
281+
282+
self._template_id = template_id
283+
251284
@property
252285
def scheduled_at(self):
253286
"""Gets the scheduled_at of this CreateEmailCampaign. # noqa: E501
@@ -323,7 +356,7 @@ def reply_to(self, reply_to):
323356
def to_field(self):
324357
"""Gets the to_field of this CreateEmailCampaign. # noqa: E501
325358
326-
To personalize the «To» Field, e.g. if you want to include the first name and last name of your recipient, use {FNAME} {LNAME}. These attributes must already exist in your contact database # noqa: E501
359+
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 # noqa: E501
327360
328361
:return: The to_field of this CreateEmailCampaign. # noqa: E501
329362
:rtype: str
@@ -334,7 +367,7 @@ def to_field(self):
334367
def to_field(self, to_field):
335368
"""Sets the to_field of this CreateEmailCampaign.
336369
337-
To personalize the «To» Field, e.g. if you want to include the first name and last name of your recipient, use {FNAME} {LNAME}. These attributes must already exist in your contact database # noqa: E501
370+
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 # noqa: E501
338371
339372
:param to_field: The to_field of this CreateEmailCampaign. # noqa: E501
340373
:type: str
@@ -555,6 +588,29 @@ def utm_campaign(self, utm_campaign):
555588

556589
self._utm_campaign = utm_campaign
557590

591+
@property
592+
def params(self):
593+
"""Gets the params of this CreateEmailCampaign. # noqa: E501
594+
595+
Pass the set of attributes to customize the type classic campaign. For example, {'FNAME':'Joe', 'LNAME':'Doe'}. Only available if 'type' is 'classic' # noqa: E501
596+
597+
:return: The params of this CreateEmailCampaign. # noqa: E501
598+
:rtype: object
599+
"""
600+
return self._params
601+
602+
@params.setter
603+
def params(self, params):
604+
"""Sets the params of this CreateEmailCampaign.
605+
606+
Pass the set of attributes to customize the type classic campaign. For example, {'FNAME':'Joe', 'LNAME':'Doe'}. Only available if 'type' is 'classic' # noqa: E501
607+
608+
:param params: The params of this CreateEmailCampaign. # noqa: E501
609+
:type: object
610+
"""
611+
612+
self._params = params
613+
558614
def to_dict(self):
559615
"""Returns the model properties as a dict"""
560616
result = {}

sib_api_v3_sdk/models/create_smtp_template.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -260,7 +260,7 @@ def reply_to(self, reply_to):
260260
def to_field(self):
261261
"""Gets the to_field of this CreateSmtpTemplate. # noqa: E501
262262
263-
This is to personalize the «To» Field. If you want to include the first name and last name of your recipient, add {FNAME} {LNAME}. To use the contact attributes here, these must already exist in SendinBlue account # noqa: E501
263+
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 # noqa: E501
264264
265265
:return: The to_field of this CreateSmtpTemplate. # noqa: E501
266266
:rtype: str
@@ -271,7 +271,7 @@ def to_field(self):
271271
def to_field(self, to_field):
272272
"""Sets the to_field of this CreateSmtpTemplate.
273273
274-
This is to personalize the «To» Field. If you want to include the first name and last name of your recipient, add {FNAME} {LNAME}. To use the contact attributes here, these must already exist in SendinBlue account # noqa: E501
274+
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 # noqa: E501
275275
276276
:param to_field: The to_field of this CreateSmtpTemplate. # noqa: E501
277277
:type: str

0 commit comments

Comments
 (0)