sib-api-v3-sdk 5.1.2 → 5.1.3
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/LICENSE.md +2 -2
- data/docs/CreateWebhook.md +1 -1
- data/docs/GetSmsEventReportEvents.md +1 -1
- data/docs/RequestContactImport.md +1 -0
- data/docs/RequestSMSRecipientExport.md +1 -1
- data/docs/SMSCampaignsApi.md +4 -4
- data/docs/SendReportEmail.md +4 -4
- data/docs/SendSms.md +3 -0
- data/docs/SendSmtpEmail.md +1 -1
- data/docs/SendTestSms.md +1 -1
- data/docs/UpdateCampaignStatus.md +1 -1
- data/docs/UpdateContact.md +1 -1
- data/lib/sib-api-v3-sdk/api/sms_campaigns_api.rb +9 -9
- data/lib/sib-api-v3-sdk/models/create_webhook.rb +5 -0
- data/lib/sib-api-v3-sdk/models/get_sms_event_report_events.rb +2 -2
- data/lib/sib-api-v3-sdk/models/request_contact_import.rb +16 -4
- data/lib/sib-api-v3-sdk/models/request_sms_recipient_export.rb +0 -2
- data/lib/sib-api-v3-sdk/models/send_report_email.rb +17 -0
- data/lib/sib-api-v3-sdk/models/send_sms.rb +34 -4
- data/lib/sib-api-v3-sdk/models/send_smtp_email.rb +1 -1
- data/lib/sib-api-v3-sdk/models/send_test_sms.rb +8 -10
- data/lib/sib-api-v3-sdk/models/update_campaign_status.rb +1 -0
- data/lib/sib-api-v3-sdk/models/update_contact.rb +1 -1
- data/lib/sib-api-v3-sdk/version.rb +1 -1
- data/spec/api/sms_campaigns_api_spec.rb +1 -1
- data/spec/models/request_contact_import_spec.rb +6 -0
- data/spec/models/send_sms_spec.rb +18 -0
- data/spec/models/send_test_sms_spec.rb +1 -1
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: c740d75fcc3c4eddc9f7c811299b05858b4be67508136249c2b5b2ae79ed2f3a
|
4
|
+
data.tar.gz: 3a8a42376fe2657b7085fe622f8f4244bd5dc9349dfec9d9397586dd22b416ab
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 6870ea49833b4c8b6f06a4bb43b51d80e3cec454e4d10dcae173acbdaae7c23ac858586e6a8e0cf264da6a6de6ac0580ce4858bb9f313872b54fbf5ccf73433e
|
7
|
+
data.tar.gz: 3dd8d0c1179cd5506ea04f5c5644a15ba271a99d8117a90c2591f151730610d7b85a8ca6b190e2469d050ce5f71bfe8be08b4014872b1e10658807b46817495f
|
data/LICENSE.md
CHANGED
@@ -1,6 +1,6 @@
|
|
1
1
|
The MIT License (MIT)
|
2
2
|
|
3
|
-
Copyright (c)
|
3
|
+
Copyright (c) 2019 SendinBlue
|
4
4
|
|
5
5
|
Permission is hereby granted, free of charge, to any person obtaining a copy
|
6
6
|
of this software and associated documentation files (the "Software"), to deal
|
@@ -18,4 +18,4 @@ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
18
18
|
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
19
19
|
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
20
20
|
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
|
21
|
-
THE SOFTWARE.
|
21
|
+
THE SOFTWARE.
|
data/docs/CreateWebhook.md
CHANGED
@@ -5,7 +5,7 @@ Name | Type | Description | Notes
|
|
5
5
|
------------ | ------------- | ------------- | -------------
|
6
6
|
**url** | **String** | URL of the webhook |
|
7
7
|
**description** | **String** | Description of the webhook | [optional]
|
8
|
-
**events** | **Array<String>** | Events triggering the webhook. Possible values for Transactional type webhook – request, delivered, hardBounce, softBounce, blocked, spam, invalid, deferred, click, opened, uniqueOpened and unsubscribed and possible values for Marketing type webhook – spam, opened, click, hardBounce, softBounce, unsubscribed, listAddition & delivered |
|
8
|
+
**events** | **Array<String>** | Events triggering the webhook. Possible values for Transactional type webhook – request, delivered, hardBounce, softBounce, blocked, spam, invalid, deferred, click, opened, uniqueOpened and unsubscribed and possible values for Marketing type webhook – spam, opened, click, hardBounce, softBounce, unsubscribed, listAddition & delivered |
|
9
9
|
**type** | **String** | Type of the webhook | [optional] [default to "transactional"]
|
10
10
|
|
11
11
|
|
@@ -4,7 +4,7 @@
|
|
4
4
|
Name | Type | Description | Notes
|
5
5
|
------------ | ------------- | ------------- | -------------
|
6
6
|
**phone_number** | **String** | Phone number which has generated the event |
|
7
|
-
**date** | **
|
7
|
+
**date** | **DateTime** | UTC date-time on which the event has been generated |
|
8
8
|
**message_id** | **String** | Message ID which generated the event |
|
9
9
|
**event** | **String** | Event which occurred |
|
10
10
|
**reason** | **String** | Reason of bounce (only available if the event is hardbounce or softbounce) | [optional]
|
@@ -11,5 +11,6 @@ Name | Type | Description | Notes
|
|
11
11
|
**email_blacklist** | **BOOLEAN** | To blacklist all the contacts for email | [optional] [default to false]
|
12
12
|
**sms_blacklist** | **BOOLEAN** | To blacklist all the contacts for sms | [optional] [default to false]
|
13
13
|
**update_existing_contacts** | **BOOLEAN** | To facilitate the choice to update the existing contacts | [optional] [default to true]
|
14
|
+
**empty_contacts_attributes** | **BOOLEAN** | To facilitate the choice to erase any attribute of the existing contacts with empty value. emptyContactsAttributes = true means the empty fields in your import will erase any attribute that currently contain data in SendinBlue, & emptyContactsAttributes = false means the empty fields will not affect your existing data ( only available if `updateExistingContacts` set to true ) | [optional] [default to false]
|
14
15
|
|
15
16
|
|
@@ -4,6 +4,6 @@
|
|
4
4
|
Name | Type | Description | Notes
|
5
5
|
------------ | ------------- | ------------- | -------------
|
6
6
|
**notify_url** | **String** | URL that will be called once the export process is finished | [optional]
|
7
|
-
**recipients_type** | **String** | Filter the recipients based on how they interacted with the campaign |
|
7
|
+
**recipients_type** | **String** | Filter the recipients based on how they interacted with the campaign |
|
8
8
|
|
9
9
|
|
data/docs/SMSCampaignsApi.md
CHANGED
@@ -401,7 +401,7 @@ nil (empty response body)
|
|
401
401
|
|
402
402
|
|
403
403
|
# **send_test_sms**
|
404
|
-
> send_test_sms(campaign_id,
|
404
|
+
> send_test_sms(campaign_id, phone_number)
|
405
405
|
|
406
406
|
Send an SMS
|
407
407
|
|
@@ -421,12 +421,12 @@ api_instance = SibApiV3Sdk::SMSCampaignsApi.new
|
|
421
421
|
|
422
422
|
campaign_id = 789 # Integer | Id of the SMS campaign
|
423
423
|
|
424
|
-
|
424
|
+
phone_number = SibApiV3Sdk::SendTestSms.new # SendTestSms | Mobile number of the recipient with the country code. This number must belong to one of your contacts in SendinBlue account and must not be blacklisted
|
425
425
|
|
426
426
|
|
427
427
|
begin
|
428
428
|
#Send an SMS
|
429
|
-
api_instance.send_test_sms(campaign_id,
|
429
|
+
api_instance.send_test_sms(campaign_id, phone_number)
|
430
430
|
rescue SibApiV3Sdk::ApiError => e
|
431
431
|
puts "Exception when calling SMSCampaignsApi->send_test_sms: #{e}"
|
432
432
|
end
|
@@ -437,7 +437,7 @@ end
|
|
437
437
|
Name | Type | Description | Notes
|
438
438
|
------------- | ------------- | ------------- | -------------
|
439
439
|
**campaign_id** | **Integer**| Id of the SMS campaign |
|
440
|
-
**
|
440
|
+
**phone_number** | [**SendTestSms**](SendTestSms.md)| Mobile number of the recipient with the country code. This number must belong to one of your contacts in SendinBlue account and must not be blacklisted |
|
441
441
|
|
442
442
|
### Return type
|
443
443
|
|
data/docs/SendReportEmail.md
CHANGED
@@ -3,11 +3,11 @@
|
|
3
3
|
## Properties
|
4
4
|
Name | Type | Description | Notes
|
5
5
|
------------ | ------------- | ------------- | -------------
|
6
|
-
**subject** | **String** | Subject of the email message |
|
7
|
-
**to** | **Array<String>** | Email addresses of the recipients |
|
8
|
-
**content_type** | **String** | Type of the message body | [optional]
|
6
|
+
**subject** | **String** | Subject of the email message |
|
7
|
+
**to** | **Array<String>** | Email addresses of the recipients |
|
8
|
+
**content_type** | **String** | Type of the message body | [optional] [default to "html"]
|
9
9
|
**bcc** | **Array<String>** | Email addresses of the recipients in bcc | [optional]
|
10
10
|
**cc** | **Array<String>** | Email addresses of the recipients in cc | [optional]
|
11
|
-
**body** | **String** | Body of the email message |
|
11
|
+
**body** | **String** | Body of the email message |
|
12
12
|
|
13
13
|
|
data/docs/SendSms.md
CHANGED
@@ -5,5 +5,8 @@ Name | Type | Description | Notes
|
|
5
5
|
------------ | ------------- | ------------- | -------------
|
6
6
|
**reference** | **String** | |
|
7
7
|
**message_id** | **Integer** | |
|
8
|
+
**sms_count** | **Integer** | Count of SMS's to send multiple text messages | [optional]
|
9
|
+
**used_credits** | **Float** | SMS credits used per text message | [optional]
|
10
|
+
**remaining_credits** | **Float** | Remaining SMS credits of the user | [optional]
|
8
11
|
|
9
12
|
|
data/docs/SendSmtpEmail.md
CHANGED
@@ -11,7 +11,7 @@ Name | Type | Description | Notes
|
|
11
11
|
**text_content** | **String** | Plain Text body of the message ( Ignored if 'templateId' is passed ) | [optional]
|
12
12
|
**subject** | **String** | Subject of the message. Mandatory if 'templateId' is not passed | [optional]
|
13
13
|
**reply_to** | [**SendSmtpEmailReplyTo**](SendSmtpEmailReplyTo.md) | | [optional]
|
14
|
-
**attachment** | [**Array<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
|
14
|
+
**attachment** | [**Array<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, eps and odt ( Ignored if 'templateId' is passed ) | [optional]
|
15
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]
|
16
16
|
**template_id** | **Integer** | Id of the template | [optional]
|
17
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]
|
data/docs/SendTestSms.md
CHANGED
@@ -3,6 +3,6 @@
|
|
3
3
|
## Properties
|
4
4
|
Name | Type | Description | Notes
|
5
5
|
------------ | ------------- | ------------- | -------------
|
6
|
-
**
|
6
|
+
**phone_number** | **String** | Mobile number of the recipient with the country code. This number must belong to one of your contacts in SendinBlue account and must not be blacklisted | [optional]
|
7
7
|
|
8
8
|
|
@@ -3,6 +3,6 @@
|
|
3
3
|
## Properties
|
4
4
|
Name | Type | Description | Notes
|
5
5
|
------------ | ------------- | ------------- | -------------
|
6
|
-
**status** | **String** |
|
6
|
+
**status** | **String** | Note:- replicateTemplate status will be available only for template type campaigns. | [optional]
|
7
7
|
|
8
8
|
|
data/docs/UpdateContact.md
CHANGED
@@ -3,7 +3,7 @@
|
|
3
3
|
## Properties
|
4
4
|
Name | Type | Description | Notes
|
5
5
|
------------ | ------------- | ------------- | -------------
|
6
|
-
**attributes** | **Object** | Pass the set of attributes to be updated. These attributes must be present in your account. For eg. {'FNAME':'Ellie', 'LNAME':'Roger'} | [optional]
|
6
|
+
**attributes** | **Object** | Pass the set of attributes to be updated. These attributes must be present in your account. To update existing email address of a contact with the new one please pass EMAIL in attribtes. For eg. { 'EMAIL':'newemail@domain.com', 'FNAME':'Ellie', 'LNAME':'Roger'} | [optional]
|
7
7
|
**email_blacklisted** | **BOOLEAN** | Set/unset this field to blacklist/allow the contact for emails (emailBlacklisted = true) | [optional]
|
8
8
|
**sms_blacklisted** | **BOOLEAN** | Set/unset this field to blacklist/allow the contact for SMS (smsBlacklisted = true) | [optional]
|
9
9
|
**list_ids** | **Array<Integer>** | Ids of the lists to add the contact to | [optional]
|
@@ -435,21 +435,21 @@ module SibApiV3Sdk
|
|
435
435
|
# Send an SMS
|
436
436
|
#
|
437
437
|
# @param campaign_id Id of the SMS campaign
|
438
|
-
# @param
|
438
|
+
# @param phone_number Mobile number of the recipient with the country code. This number must belong to one of your contacts in SendinBlue account and must not be blacklisted
|
439
439
|
# @param [Hash] opts the optional parameters
|
440
440
|
# @return [nil]
|
441
|
-
def send_test_sms(campaign_id,
|
442
|
-
send_test_sms_with_http_info(campaign_id,
|
441
|
+
def send_test_sms(campaign_id, phone_number, opts = {})
|
442
|
+
send_test_sms_with_http_info(campaign_id, phone_number, opts)
|
443
443
|
return nil
|
444
444
|
end
|
445
445
|
|
446
446
|
# Send an SMS
|
447
447
|
#
|
448
448
|
# @param campaign_id Id of the SMS campaign
|
449
|
-
# @param
|
449
|
+
# @param phone_number Mobile number of the recipient with the country code. This number must belong to one of your contacts in SendinBlue account and must not be blacklisted
|
450
450
|
# @param [Hash] opts the optional parameters
|
451
451
|
# @return [Array<(nil, Fixnum, Hash)>] nil, response status code and response headers
|
452
|
-
def send_test_sms_with_http_info(campaign_id,
|
452
|
+
def send_test_sms_with_http_info(campaign_id, phone_number, opts = {})
|
453
453
|
if @api_client.config.debugging
|
454
454
|
@api_client.config.logger.debug "Calling API: SMSCampaignsApi.send_test_sms ..."
|
455
455
|
end
|
@@ -457,9 +457,9 @@ module SibApiV3Sdk
|
|
457
457
|
if @api_client.config.client_side_validation && campaign_id.nil?
|
458
458
|
fail ArgumentError, "Missing the required parameter 'campaign_id' when calling SMSCampaignsApi.send_test_sms"
|
459
459
|
end
|
460
|
-
# verify the required parameter '
|
461
|
-
if @api_client.config.client_side_validation &&
|
462
|
-
fail ArgumentError, "Missing the required parameter '
|
460
|
+
# verify the required parameter 'phone_number' is set
|
461
|
+
if @api_client.config.client_side_validation && phone_number.nil?
|
462
|
+
fail ArgumentError, "Missing the required parameter 'phone_number' when calling SMSCampaignsApi.send_test_sms"
|
463
463
|
end
|
464
464
|
# resource path
|
465
465
|
local_var_path = "/smsCampaigns/{campaignId}/sendTest".sub('{' + 'campaignId' + '}', campaign_id.to_s)
|
@@ -478,7 +478,7 @@ module SibApiV3Sdk
|
|
478
478
|
form_params = {}
|
479
479
|
|
480
480
|
# http body (model)
|
481
|
-
post_body = @api_client.object_to_http_body(
|
481
|
+
post_body = @api_client.object_to_http_body(phone_number)
|
482
482
|
auth_names = ['api-key']
|
483
483
|
data, status_code, headers = @api_client.call_api(:POST, local_var_path,
|
484
484
|
:header_params => header_params,
|
@@ -107,6 +107,10 @@ module SibApiV3Sdk
|
|
107
107
|
invalid_properties.push("invalid value for 'url', url cannot be nil.")
|
108
108
|
end
|
109
109
|
|
110
|
+
if @events.nil?
|
111
|
+
invalid_properties.push("invalid value for 'events', events cannot be nil.")
|
112
|
+
end
|
113
|
+
|
110
114
|
return invalid_properties
|
111
115
|
end
|
112
116
|
|
@@ -114,6 +118,7 @@ module SibApiV3Sdk
|
|
114
118
|
# @return true if the model is valid
|
115
119
|
def valid?
|
116
120
|
return false if @url.nil?
|
121
|
+
return false if @events.nil?
|
117
122
|
type_validator = EnumAttributeValidator.new('String', ["transactional", "marketing"])
|
118
123
|
return false unless type_validator.valid?(@type)
|
119
124
|
return true
|
@@ -18,7 +18,7 @@ module SibApiV3Sdk
|
|
18
18
|
# Phone number which has generated the event
|
19
19
|
attr_accessor :phone_number
|
20
20
|
|
21
|
-
#
|
21
|
+
# UTC date-time on which the event has been generated
|
22
22
|
attr_accessor :date
|
23
23
|
|
24
24
|
# Message ID which generated the event
|
@@ -74,7 +74,7 @@ module SibApiV3Sdk
|
|
74
74
|
def self.swagger_types
|
75
75
|
{
|
76
76
|
:'phone_number' => :'String',
|
77
|
-
:'date' => :'
|
77
|
+
:'date' => :'DateTime',
|
78
78
|
:'message_id' => :'String',
|
79
79
|
:'event' => :'String',
|
80
80
|
:'reason' => :'String',
|
@@ -38,6 +38,9 @@ module SibApiV3Sdk
|
|
38
38
|
# To facilitate the choice to update the existing contacts
|
39
39
|
attr_accessor :update_existing_contacts
|
40
40
|
|
41
|
+
# To facilitate the choice to erase any attribute of the existing contacts with empty value. emptyContactsAttributes = true means the empty fields in your import will erase any attribute that currently contain data in SendinBlue, & emptyContactsAttributes = false means the empty fields will not affect your existing data ( only available if `updateExistingContacts` set to true )
|
42
|
+
attr_accessor :empty_contacts_attributes
|
43
|
+
|
41
44
|
|
42
45
|
# Attribute mapping from ruby-style variable name to JSON key.
|
43
46
|
def self.attribute_map
|
@@ -49,7 +52,8 @@ module SibApiV3Sdk
|
|
49
52
|
:'new_list' => :'newList',
|
50
53
|
:'email_blacklist' => :'emailBlacklist',
|
51
54
|
:'sms_blacklist' => :'smsBlacklist',
|
52
|
-
:'update_existing_contacts' => :'updateExistingContacts'
|
55
|
+
:'update_existing_contacts' => :'updateExistingContacts',
|
56
|
+
:'empty_contacts_attributes' => :'emptyContactsAttributes'
|
53
57
|
}
|
54
58
|
end
|
55
59
|
|
@@ -63,7 +67,8 @@ module SibApiV3Sdk
|
|
63
67
|
:'new_list' => :'RequestContactImportNewList',
|
64
68
|
:'email_blacklist' => :'BOOLEAN',
|
65
69
|
:'sms_blacklist' => :'BOOLEAN',
|
66
|
-
:'update_existing_contacts' => :'BOOLEAN'
|
70
|
+
:'update_existing_contacts' => :'BOOLEAN',
|
71
|
+
:'empty_contacts_attributes' => :'BOOLEAN'
|
67
72
|
}
|
68
73
|
end
|
69
74
|
|
@@ -115,6 +120,12 @@ module SibApiV3Sdk
|
|
115
120
|
self.update_existing_contacts = true
|
116
121
|
end
|
117
122
|
|
123
|
+
if attributes.has_key?(:'emptyContactsAttributes')
|
124
|
+
self.empty_contacts_attributes = attributes[:'emptyContactsAttributes']
|
125
|
+
else
|
126
|
+
self.empty_contacts_attributes = false
|
127
|
+
end
|
128
|
+
|
118
129
|
end
|
119
130
|
|
120
131
|
# Show invalid properties with the reasons. Usually used together with valid?
|
@@ -142,7 +153,8 @@ module SibApiV3Sdk
|
|
142
153
|
new_list == o.new_list &&
|
143
154
|
email_blacklist == o.email_blacklist &&
|
144
155
|
sms_blacklist == o.sms_blacklist &&
|
145
|
-
update_existing_contacts == o.update_existing_contacts
|
156
|
+
update_existing_contacts == o.update_existing_contacts &&
|
157
|
+
empty_contacts_attributes == o.empty_contacts_attributes
|
146
158
|
end
|
147
159
|
|
148
160
|
# @see the `==` method
|
@@ -154,7 +166,7 @@ module SibApiV3Sdk
|
|
154
166
|
# Calculates hash code according to all attributes.
|
155
167
|
# @return [Fixnum] Hash code
|
156
168
|
def hash
|
157
|
-
[file_url, file_body, list_ids, notify_url, new_list, email_blacklist, sms_blacklist, update_existing_contacts].hash
|
169
|
+
[file_url, file_body, list_ids, notify_url, new_list, email_blacklist, sms_blacklist, update_existing_contacts, empty_contacts_attributes].hash
|
158
170
|
end
|
159
171
|
|
160
172
|
# Builds the object from hash
|
@@ -99,6 +99,8 @@ module SibApiV3Sdk
|
|
99
99
|
|
100
100
|
if attributes.has_key?(:'contentType')
|
101
101
|
self.content_type = attributes[:'contentType']
|
102
|
+
else
|
103
|
+
self.content_type = "html"
|
102
104
|
end
|
103
105
|
|
104
106
|
if attributes.has_key?(:'bcc')
|
@@ -123,14 +125,29 @@ module SibApiV3Sdk
|
|
123
125
|
# @return Array for valid properties with the reasons
|
124
126
|
def list_invalid_properties
|
125
127
|
invalid_properties = Array.new
|
128
|
+
if @subject.nil?
|
129
|
+
invalid_properties.push("invalid value for 'subject', subject cannot be nil.")
|
130
|
+
end
|
131
|
+
|
132
|
+
if @to.nil?
|
133
|
+
invalid_properties.push("invalid value for 'to', to cannot be nil.")
|
134
|
+
end
|
135
|
+
|
136
|
+
if @body.nil?
|
137
|
+
invalid_properties.push("invalid value for 'body', body cannot be nil.")
|
138
|
+
end
|
139
|
+
|
126
140
|
return invalid_properties
|
127
141
|
end
|
128
142
|
|
129
143
|
# Check to see if the all the properties in the model are valid
|
130
144
|
# @return true if the model is valid
|
131
145
|
def valid?
|
146
|
+
return false if @subject.nil?
|
147
|
+
return false if @to.nil?
|
132
148
|
content_type_validator = EnumAttributeValidator.new('String', ["text", "html"])
|
133
149
|
return false unless content_type_validator.valid?(@content_type)
|
150
|
+
return false if @body.nil?
|
134
151
|
return true
|
135
152
|
end
|
136
153
|
|
@@ -19,12 +19,24 @@ module SibApiV3Sdk
|
|
19
19
|
|
20
20
|
attr_accessor :message_id
|
21
21
|
|
22
|
+
# Count of SMS's to send multiple text messages
|
23
|
+
attr_accessor :sms_count
|
24
|
+
|
25
|
+
# SMS credits used per text message
|
26
|
+
attr_accessor :used_credits
|
27
|
+
|
28
|
+
# Remaining SMS credits of the user
|
29
|
+
attr_accessor :remaining_credits
|
30
|
+
|
22
31
|
|
23
32
|
# Attribute mapping from ruby-style variable name to JSON key.
|
24
33
|
def self.attribute_map
|
25
34
|
{
|
26
35
|
:'reference' => :'reference',
|
27
|
-
:'message_id' => :'messageId'
|
36
|
+
:'message_id' => :'messageId',
|
37
|
+
:'sms_count' => :'smsCount',
|
38
|
+
:'used_credits' => :'usedCredits',
|
39
|
+
:'remaining_credits' => :'remainingCredits'
|
28
40
|
}
|
29
41
|
end
|
30
42
|
|
@@ -32,7 +44,10 @@ module SibApiV3Sdk
|
|
32
44
|
def self.swagger_types
|
33
45
|
{
|
34
46
|
:'reference' => :'String',
|
35
|
-
:'message_id' => :'Integer'
|
47
|
+
:'message_id' => :'Integer',
|
48
|
+
:'sms_count' => :'Integer',
|
49
|
+
:'used_credits' => :'Float',
|
50
|
+
:'remaining_credits' => :'Float'
|
36
51
|
}
|
37
52
|
end
|
38
53
|
|
@@ -52,6 +67,18 @@ module SibApiV3Sdk
|
|
52
67
|
self.message_id = attributes[:'messageId']
|
53
68
|
end
|
54
69
|
|
70
|
+
if attributes.has_key?(:'smsCount')
|
71
|
+
self.sms_count = attributes[:'smsCount']
|
72
|
+
end
|
73
|
+
|
74
|
+
if attributes.has_key?(:'usedCredits')
|
75
|
+
self.used_credits = attributes[:'usedCredits']
|
76
|
+
end
|
77
|
+
|
78
|
+
if attributes.has_key?(:'remainingCredits')
|
79
|
+
self.remaining_credits = attributes[:'remainingCredits']
|
80
|
+
end
|
81
|
+
|
55
82
|
end
|
56
83
|
|
57
84
|
# Show invalid properties with the reasons. Usually used together with valid?
|
@@ -83,7 +110,10 @@ module SibApiV3Sdk
|
|
83
110
|
return true if self.equal?(o)
|
84
111
|
self.class == o.class &&
|
85
112
|
reference == o.reference &&
|
86
|
-
message_id == o.message_id
|
113
|
+
message_id == o.message_id &&
|
114
|
+
sms_count == o.sms_count &&
|
115
|
+
used_credits == o.used_credits &&
|
116
|
+
remaining_credits == o.remaining_credits
|
87
117
|
end
|
88
118
|
|
89
119
|
# @see the `==` method
|
@@ -95,7 +125,7 @@ module SibApiV3Sdk
|
|
95
125
|
# Calculates hash code according to all attributes.
|
96
126
|
# @return [Fixnum] Hash code
|
97
127
|
def hash
|
98
|
-
[reference, message_id].hash
|
128
|
+
[reference, message_id, sms_count, used_credits, remaining_credits].hash
|
99
129
|
end
|
100
130
|
|
101
131
|
# Builds the object from hash
|
@@ -37,7 +37,7 @@ module SibApiV3Sdk
|
|
37
37
|
|
38
38
|
attr_accessor :reply_to
|
39
39
|
|
40
|
-
# 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
|
40
|
+
# 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, eps and odt ( Ignored if 'templateId' is passed )
|
41
41
|
attr_accessor :attachment
|
42
42
|
|
43
43
|
# 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'}
|
@@ -15,21 +15,21 @@ require 'date'
|
|
15
15
|
module SibApiV3Sdk
|
16
16
|
|
17
17
|
class SendTestSms
|
18
|
-
# Mobile number with the country code
|
19
|
-
attr_accessor :
|
18
|
+
# Mobile number of the recipient with the country code. This number must belong to one of your contacts in SendinBlue account and must not be blacklisted
|
19
|
+
attr_accessor :phone_number
|
20
20
|
|
21
21
|
|
22
22
|
# Attribute mapping from ruby-style variable name to JSON key.
|
23
23
|
def self.attribute_map
|
24
24
|
{
|
25
|
-
:'
|
25
|
+
:'phone_number' => :'phoneNumber'
|
26
26
|
}
|
27
27
|
end
|
28
28
|
|
29
29
|
# Attribute type mapping.
|
30
30
|
def self.swagger_types
|
31
31
|
{
|
32
|
-
:'
|
32
|
+
:'phone_number' => :'String'
|
33
33
|
}
|
34
34
|
end
|
35
35
|
|
@@ -41,10 +41,8 @@ module SibApiV3Sdk
|
|
41
41
|
# convert string to symbol for hash key
|
42
42
|
attributes = attributes.each_with_object({}){|(k,v), h| h[k.to_sym] = v}
|
43
43
|
|
44
|
-
if attributes.has_key?(:'
|
45
|
-
|
46
|
-
self.phone_numbers = value
|
47
|
-
end
|
44
|
+
if attributes.has_key?(:'phoneNumber')
|
45
|
+
self.phone_number = attributes[:'phoneNumber']
|
48
46
|
end
|
49
47
|
|
50
48
|
end
|
@@ -67,7 +65,7 @@ module SibApiV3Sdk
|
|
67
65
|
def ==(o)
|
68
66
|
return true if self.equal?(o)
|
69
67
|
self.class == o.class &&
|
70
|
-
|
68
|
+
phone_number == o.phone_number
|
71
69
|
end
|
72
70
|
|
73
71
|
# @see the `==` method
|
@@ -79,7 +77,7 @@ module SibApiV3Sdk
|
|
79
77
|
# Calculates hash code according to all attributes.
|
80
78
|
# @return [Fixnum] Hash code
|
81
79
|
def hash
|
82
|
-
[
|
80
|
+
[phone_number].hash
|
83
81
|
end
|
84
82
|
|
85
83
|
# Builds the object from hash
|
@@ -15,7 +15,7 @@ require 'date'
|
|
15
15
|
module SibApiV3Sdk
|
16
16
|
|
17
17
|
class UpdateContact
|
18
|
-
# Pass the set of attributes to be updated. These attributes must be present in your account. For eg. {'FNAME':'Ellie', 'LNAME':'Roger'}
|
18
|
+
# Pass the set of attributes to be updated. These attributes must be present in your account. To update existing email address of a contact with the new one please pass EMAIL in attribtes. For eg. { 'EMAIL':'newemail@domain.com', 'FNAME':'Ellie', 'LNAME':'Roger'}
|
19
19
|
attr_accessor :attributes
|
20
20
|
|
21
21
|
# Set/unset this field to blacklist/allow the contact for emails (emailBlacklisted = true)
|
@@ -127,7 +127,7 @@ describe 'SMSCampaignsApi' do
|
|
127
127
|
# Send an SMS
|
128
128
|
#
|
129
129
|
# @param campaign_id Id of the SMS campaign
|
130
|
-
# @param
|
130
|
+
# @param phone_number Mobile number of the recipient with the country code. This number must belong to one of your contacts in SendinBlue account and must not be blacklisted
|
131
131
|
# @param [Hash] opts the optional parameters
|
132
132
|
# @return [nil]
|
133
133
|
describe 'send_test_sms test' do
|
@@ -80,5 +80,11 @@ describe 'RequestContactImport' do
|
|
80
80
|
end
|
81
81
|
end
|
82
82
|
|
83
|
+
describe 'test attribute "empty_contacts_attributes"' do
|
84
|
+
it 'should work' do
|
85
|
+
# assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers
|
86
|
+
end
|
87
|
+
end
|
88
|
+
|
83
89
|
end
|
84
90
|
|
@@ -44,5 +44,23 @@ describe 'SendSms' do
|
|
44
44
|
end
|
45
45
|
end
|
46
46
|
|
47
|
+
describe 'test attribute "sms_count"' do
|
48
|
+
it 'should work' do
|
49
|
+
# assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers
|
50
|
+
end
|
51
|
+
end
|
52
|
+
|
53
|
+
describe 'test attribute "used_credits"' do
|
54
|
+
it 'should work' do
|
55
|
+
# assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers
|
56
|
+
end
|
57
|
+
end
|
58
|
+
|
59
|
+
describe 'test attribute "remaining_credits"' do
|
60
|
+
it 'should work' do
|
61
|
+
# assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers
|
62
|
+
end
|
63
|
+
end
|
64
|
+
|
47
65
|
end
|
48
66
|
|
@@ -32,7 +32,7 @@ describe 'SendTestSms' do
|
|
32
32
|
expect(@instance).to be_instance_of(SibApiV3Sdk::SendTestSms)
|
33
33
|
end
|
34
34
|
end
|
35
|
-
describe 'test attribute "
|
35
|
+
describe 'test attribute "phone_number"' do
|
36
36
|
it 'should work' do
|
37
37
|
# assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers
|
38
38
|
end
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: sib-api-v3-sdk
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 5.1.
|
4
|
+
version: 5.1.3
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- SendinBlue Developers
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date:
|
11
|
+
date: 2019-01-10 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: typhoeus
|