Skip to content

Commit 6c6d625

Browse files
Merge pull request #25 from sendinblue/feature_updated_swagger_sync
Swagger updates for sms api's
2 parents 266f658 + 545c544 commit 6c6d625

26 files changed

+112
-100
lines changed

docs/CreateEmailCampaign.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@ Name | Type | Description | Notes
2222
**footer** | **str** | Footer of the email campaign | [optional]
2323
**header** | **str** | Header of the email campaign | [optional]
2424
**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]
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'. 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]
2626

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

docs/CreateSmsCampaign.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ Name | Type | Description | Notes
55
------------ | ------------- | ------------- | -------------
66
**name** | **str** | Name of the campaign |
77
**sender** | **str** | Name of the sender. The number of characters is limited to 11 |
8-
**content** | **str** | Content of the message. The maximum characters used per SMS is 160, if used more than that, it will be counted as more than one SMS | [optional]
8+
**content** | **str** | Content of the message. The maximum characters used per SMS is 160, if used more than that, it will be counted as more than one SMS |
99
**recipients** | [**CreateSmsCampaignRecipients**](CreateSmsCampaignRecipients.md) | | [optional]
1010
**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]
1111

docs/CreateSmsCampaignRecipients.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
Name | Type | Description | Notes
55
------------ | ------------- | ------------- | -------------
66
**list_ids** | **list[int]** | Lists Ids to send the campaign to. REQUIRED if scheduledAt is not empty |
7-
**exclusion_list_ids** | **list[int]** | List ids which have to be excluded from a campaign |
7+
**exclusion_list_ids** | **list[int]** | List ids which have to be excluded from a campaign | [optional]
88

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

docs/GetAggregatedReport.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,7 @@ Name | Type | Description | Notes
1515
**spam_reports** | **int** | Number of complaint (spam report) for the timeframe |
1616
**blocked** | **int** | Number of blocked contact emails for the timeframe |
1717
**invalid** | **int** | Number of invalid emails for the timeframe |
18+
**unsubscribed** | **int** | Number of unsubscribed emails for the timeframe |
1819

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

docs/GetReportsReports.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,7 @@ Name | Type | Description | Notes
1515
**spam_reports** | **int** | Number of complaints (spam reports) for the date |
1616
**blocked** | **int** | Number of blocked emails for the date |
1717
**invalid** | **int** | Number of invalid emails for the date |
18+
**unsubscribed** | **int** | Number of unsubscribed emails for the date |
1819

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

docs/GetSmsCampaign.md

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,6 @@ Name | Type | Description | Notes
88
**status** | **str** | Status of the SMS Campaign |
99
**content** | **str** | Content of the SMS Campaign |
1010
**scheduled_at** | **datetime** | UTC date-time on which SMS campaign is scheduled. Should be in YYYY-MM-DDTHH:mm:ss.SSSZ format |
11-
**test_sent** | **bool** | Retrieved the status of test SMS sending. (true=Test SMS has been sent false=Test SMS has not been sent) |
1211
**sender** | **str** | Sender of the SMS Campaign |
1312
**created_at** | **datetime** | Creation UTC date-time of the SMS campaign (YYYY-MM-DDTHH:mm:ss.SSSZ) |
1413
**modified_at** | **datetime** | UTC date-time of last modification of the SMS campaign (YYYY-MM-DDTHH:mm:ss.SSSZ) |

docs/GetSmsCampaignOverview.md

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,6 @@ Name | Type | Description | Notes
88
**status** | **str** | Status of the SMS Campaign |
99
**content** | **str** | Content of the SMS Campaign |
1010
**scheduled_at** | **datetime** | UTC date-time on which SMS campaign is scheduled. Should be in YYYY-MM-DDTHH:mm:ss.SSSZ format |
11-
**test_sent** | **bool** | Retrieved the status of test SMS sending. (true=Test SMS has been sent false=Test SMS has not been sent) |
1211
**sender** | **str** | Sender of the SMS Campaign |
1312
**created_at** | **datetime** | Creation UTC date-time of the SMS campaign (YYYY-MM-DDTHH:mm:ss.SSSZ) |
1413
**modified_at** | **datetime** | UTC date-time of last modification of the SMS campaign (YYYY-MM-DDTHH:mm:ss.SSSZ) |

docs/SMSCampaignsApi.md

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -174,7 +174,7 @@ Name | Type | Description | Notes
174174
[[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)
175175

176176
# **get_sms_campaigns**
177-
> GetSmsCampaigns get_sms_campaigns(status=status, limit=limit, offset=offset)
177+
> GetSmsCampaigns get_sms_campaigns(status=status, start_date=start_date, end_date=end_date, limit=limit, offset=offset)
178178
179179
Returns the informations for all your created SMS campaigns
180180

@@ -195,12 +195,14 @@ configuration.api_key['api-key'] = 'YOUR_API_KEY'
195195
# create an instance of the API class
196196
api_instance = sib_api_v3_sdk.SMSCampaignsApi(sib_api_v3_sdk.ApiClient(configuration))
197197
status = 'status_example' # str | Status of campaign. (optional)
198+
start_date = '2013-10-20T19:20:30+01:00' # datetime | Mandatory if endDate is used. Starting (urlencoded) UTC date-time (YYYY-MM-DDTHH:mm:ss.SSSZ) to filter the sent sms campaigns. Prefer to pass your timezone in date-time format for accurate result ( only available if either 'status' not passed and if passed is set to 'sent' ) (optional)
199+
end_date = '2013-10-20T19:20:30+01:00' # datetime | Mandatory if startDate is used. Ending (urlencoded) UTC date-time (YYYY-MM-DDTHH:mm:ss.SSSZ) to filter the sent sms campaigns. Prefer to pass your timezone in date-time format for accurate result ( only available if either 'status' not passed and if passed is set to 'sent' ) (optional)
198200
limit = 500 # int | Number limitation for the result returned (optional) (default to 500)
199201
offset = 0 # int | Beginning point in the list to retrieve from. (optional) (default to 0)
200202

201203
try:
202204
# Returns the informations for all your created SMS campaigns
203-
api_response = api_instance.get_sms_campaigns(status=status, limit=limit, offset=offset)
205+
api_response = api_instance.get_sms_campaigns(status=status, start_date=start_date, end_date=end_date, limit=limit, offset=offset)
204206
pprint(api_response)
205207
except ApiException as e:
206208
print("Exception when calling SMSCampaignsApi->get_sms_campaigns: %s\n" % e)
@@ -211,6 +213,8 @@ except ApiException as e:
211213
Name | Type | Description | Notes
212214
------------- | ------------- | ------------- | -------------
213215
**status** | **str**| Status of campaign. | [optional]
216+
**start_date** | **datetime**| Mandatory if endDate is used. Starting (urlencoded) UTC date-time (YYYY-MM-DDTHH:mm:ss.SSSZ) to filter the sent sms campaigns. Prefer to pass your timezone in date-time format for accurate result ( only available if either 'status' not passed and if passed is set to 'sent' ) | [optional]
217+
**end_date** | **datetime**| Mandatory if startDate is used. Ending (urlencoded) UTC date-time (YYYY-MM-DDTHH:mm:ss.SSSZ) to filter the sent sms campaigns. Prefer to pass your timezone in date-time format for accurate result ( only available if either 'status' not passed and if passed is set to 'sent' ) | [optional]
214218
**limit** | **int**| Number limitation for the result returned | [optional] [default to 500]
215219
**offset** | **int**| Beginning point in the list to retrieve from. | [optional] [default to 0]
216220

docs/SendEmail.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ Name | Type | Description | Notes
99
**reply_to** | **str** | Email address which shall be used by campaign recipients to reply back | [optional]
1010
**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]
1111
**attachment** | [**list[SendEmailAttachment]**](SendEmailAttachment.md) | Pass the list of content (base64 encoded) and name of the attachment. For example, [{'content':'base64 encoded content 1', 'name':'attcahment1'}, {'content':'base64 encoded content 2', 'name':'attcahment2'}]. | [optional]
12-
**headers** | **object** | Pass the set of headers that shall be sent along the mail headers in the original email. 'X-Mailin-IP' header can be set (only for dedicated ip users) to mention the IP to be used for sending transactional emails. For example, {'Content-Type':'text/html', 'charset':'iso-8859-1', 'X-Mailin-IP':'1.2.3.4'} | [optional]
12+
**headers** | **object** | Pass the set of headers that shall be sent along the mail headers in the original email. 'sender.ip' header can be set (only for dedicated ip users) to mention the IP to be used for sending transactional emails. For example, {'Content-Type':'text/html', 'charset':'iso-8859-1', 'sender.ip':'1.2.3.4'} | [optional]
1313
**attributes** | **object** | Pass the set of attributes to customize the template. For example, {'FNAME':'Joe', 'LNAME':'Doe'} | [optional]
1414
**tags** | **list[str]** | Tag your emails to find them more easily | [optional]
1515

docs/SendSmtpEmail.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -12,9 +12,9 @@ Name | Type | Description | Notes
1212
**subject** | **str** | Subject of the message. Mandatory if 'templateId' is not passed | [optional]
1313
**reply_to** | [**SendSmtpEmailReplyTo**](SendSmtpEmailReplyTo.md) | | [optional]
1414
**attachment** | [**list[SendSmtpEmailAttachment]**](SendSmtpEmailAttachment.md) | Pass the absolute URL (no local file) or the base64 content of the attachment along with the attachment name (Mandatory if attachment content is passed). For example, [{'url':'https://attachment.domain.com/myAttachmentFromUrl.jpg', 'name':'My attachment 1'}, {'content':'base64 exmaple content', 'name':'My attachment 2'}]. Allowed extensions for attachment file: 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 ( Ignored if 'templateId' is passed ) | [optional]
15-
**headers** | **object** | Pass the set of headers that shall be sent along the mail headers in the original email. 'X-Mailin-IP' header can be set (only for dedicated ip users) to mention the IP to be used for sending transactional emails. For example, {'Content-Type':'text/html', 'charset':'iso-8859-1', 'X-Mailin-IP':'1.2.3.4'} | [optional]
15+
**headers** | **object** | Pass the set of headers that shall be sent along the mail headers in the original email. 'sender.ip' header can be set (only for dedicated ip users) to mention the IP to be used for sending transactional emails. For example, {'Content-Type':'text/html', 'charset':'iso-8859-1', 'sender.ip':'1.2.3.4'} | [optional]
1616
**template_id** | **int** | Id of the template | [optional]
17-
**params** | **object** | Pass the set of attributes to customize the template. For example, {'FNAME':'Joe', 'LNAME':'Doe'}. | [optional]
17+
**params** | **object** | Pass the set of attributes to customize the template. For example, {'FNAME':'Joe', 'LNAME':'Doe'}. It's considered only if template is in New Template Language format. | [optional]
1818
**tags** | **list[str]** | Tag your emails to find them more easily | [optional]
1919

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

docs/SendTransacSms.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ Name | Type | Description | Notes
66
**sender** | **str** | Name of the sender. Only alphanumeric characters. No more than 11 characters |
77
**recipient** | **str** | Mobile number to send SMS with the country code |
88
**content** | **str** | Content of the message. If more than 160 characters long, will be sent as multiple text messages |
9-
**type** | **str** | Type of the SMS | [optional] [default to 'transactional']
9+
**type** | **str** | Type of the SMS. Marketing SMS messages are those sent typically with marketing content. Transactional SMS messages are sent to individuals and are triggered in response to some action, such as a sign-up, purchase, etc. | [optional] [default to 'transactional']
1010
**tag** | **str** | Tag of the message | [optional]
1111
**web_url** | **str** | Webhook to call for each event triggered by the message (delivered etc.) | [optional]
1212

docs/UpdateEmailCampaign.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,7 +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]
23+
**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]
2424

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

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

sib_api_v3_sdk/api/sms_campaigns_api.py

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -342,6 +342,8 @@ def get_sms_campaigns(self, **kwargs): # noqa: E501
342342
343343
:param async bool
344344
:param str status: Status of campaign.
345+
:param datetime start_date: Mandatory if endDate is used. Starting (urlencoded) UTC date-time (YYYY-MM-DDTHH:mm:ss.SSSZ) to filter the sent sms campaigns. Prefer to pass your timezone in date-time format for accurate result ( only available if either 'status' not passed and if passed is set to 'sent' )
346+
:param datetime end_date: Mandatory if startDate is used. Ending (urlencoded) UTC date-time (YYYY-MM-DDTHH:mm:ss.SSSZ) to filter the sent sms campaigns. Prefer to pass your timezone in date-time format for accurate result ( only available if either 'status' not passed and if passed is set to 'sent' )
345347
:param int limit: Number limitation for the result returned
346348
:param int offset: Beginning point in the list to retrieve from.
347349
:return: GetSmsCampaigns
@@ -365,14 +367,16 @@ def get_sms_campaigns_with_http_info(self, **kwargs): # noqa: E501
365367
366368
:param async bool
367369
:param str status: Status of campaign.
370+
:param datetime start_date: Mandatory if endDate is used. Starting (urlencoded) UTC date-time (YYYY-MM-DDTHH:mm:ss.SSSZ) to filter the sent sms campaigns. Prefer to pass your timezone in date-time format for accurate result ( only available if either 'status' not passed and if passed is set to 'sent' )
371+
:param datetime end_date: Mandatory if startDate is used. Ending (urlencoded) UTC date-time (YYYY-MM-DDTHH:mm:ss.SSSZ) to filter the sent sms campaigns. Prefer to pass your timezone in date-time format for accurate result ( only available if either 'status' not passed and if passed is set to 'sent' )
368372
:param int limit: Number limitation for the result returned
369373
:param int offset: Beginning point in the list to retrieve from.
370374
:return: GetSmsCampaigns
371375
If the method is called asynchronously,
372376
returns the request thread.
373377
"""
374378

375-
all_params = ['status', 'limit', 'offset'] # noqa: E501
379+
all_params = ['status', 'start_date', 'end_date', 'limit', 'offset'] # noqa: E501
376380
all_params.append('async')
377381
all_params.append('_return_http_data_only')
378382
all_params.append('_preload_content')
@@ -397,6 +401,10 @@ def get_sms_campaigns_with_http_info(self, **kwargs): # noqa: E501
397401
query_params = []
398402
if 'status' in params:
399403
query_params.append(('status', params['status'])) # noqa: E501
404+
if 'start_date' in params:
405+
query_params.append(('startDate', params['start_date'])) # noqa: E501
406+
if 'end_date' in params:
407+
query_params.append(('endDate', params['end_date'])) # noqa: E501
400408
if 'limit' in params:
401409
query_params.append(('limit', params['limit'])) # noqa: E501
402410
if 'offset' in params:

sib_api_v3_sdk/models/create_email_campaign.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -592,7 +592,7 @@ def utm_campaign(self, utm_campaign):
592592
def params(self):
593593
"""Gets the params of this CreateEmailCampaign. # noqa: E501
594594
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
595+
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' # noqa: E501
596596
597597
:return: The params of this CreateEmailCampaign. # noqa: E501
598598
:rtype: object
@@ -603,7 +603,7 @@ def params(self):
603603
def params(self, params):
604604
"""Sets the params of this CreateEmailCampaign.
605605
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
606+
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' # noqa: E501
607607
608608
:param params: The params of this CreateEmailCampaign. # noqa: E501
609609
:type: object

sib_api_v3_sdk/models/create_sms_campaign.py

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -60,8 +60,7 @@ def __init__(self, name=None, sender=None, content=None, recipients=None, schedu
6060

6161
self.name = name
6262
self.sender = sender
63-
if content is not None:
64-
self.content = content
63+
self.content = content
6564
if recipients is not None:
6665
self.recipients = recipients
6766
if scheduled_at is not None:
@@ -139,6 +138,8 @@ def content(self, content):
139138
:param content: The content of this CreateSmsCampaign. # noqa: E501
140139
:type: str
141140
"""
141+
if content is None:
142+
raise ValueError("Invalid value for `content`, must not be `None`") # noqa: E501
142143

143144
self._content = content
144145

0 commit comments

Comments
 (0)