sib-api-v3-sdk 5.5.0 → 7.0.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/README.md +26 -21
- data/docs/AbTestCampaignResult.md +2 -0
- data/docs/AbTestCampaignResultClickedLinks.md +9 -0
- data/docs/AbTestCampaignResultStatistics.md +13 -0
- data/docs/AbTestVersionClicks.md +7 -0
- data/docs/AbTestVersionClicksInner.md +10 -0
- data/docs/AbTestVersionStats.md +9 -0
- data/docs/AddContactToList.md +2 -1
- data/docs/ContactsApi.md +24 -24
- data/docs/CreateDoiContact.md +1 -1
- data/docs/CreateSmsCampaign.md +1 -1
- data/docs/CreateWebhook.md +1 -1
- data/docs/GetAggregatedReport.md +13 -13
- data/docs/GetCampaignStats.md +1 -0
- data/docs/ListsApi.md +4 -4
- data/docs/RemoveContactFromList.md +2 -1
- data/docs/SendSmtpEmailSender.md +1 -0
- data/docs/SendTransacSms.md +1 -1
- data/docs/{SMTPApi.md → TransactionalEmailsApi.md} +52 -52
- data/docs/UpdateSmsCampaign.md +1 -1
- data/docs/UpdateWebhook.md +1 -1
- data/lib/sib-api-v3-sdk.rb +6 -1
- data/lib/sib-api-v3-sdk/api/contacts_api.rb +40 -40
- data/lib/sib-api-v3-sdk/api/lists_api.rb +4 -4
- data/lib/sib-api-v3-sdk/api/{smtp_api.rb → transactional_emails_api.rb} +52 -52
- data/lib/sib-api-v3-sdk/models/ab_test_campaign_result.rb +22 -4
- data/lib/sib-api-v3-sdk/models/ab_test_campaign_result_clicked_links.rb +202 -0
- data/lib/sib-api-v3-sdk/models/ab_test_campaign_result_statistics.rb +258 -0
- data/lib/sib-api-v3-sdk/models/ab_test_version_clicks.rb +175 -0
- data/lib/sib-api-v3-sdk/models/ab_test_version_clicks_inner.rb +219 -0
- data/lib/sib-api-v3-sdk/models/ab_test_version_stats.rb +205 -0
- data/lib/sib-api-v3-sdk/models/add_contact_to_list.rb +17 -5
- data/lib/sib-api-v3-sdk/models/create_doi_contact.rb +5 -0
- data/lib/sib-api-v3-sdk/models/create_sms_campaign.rb +6 -6
- data/lib/sib-api-v3-sdk/models/create_webhook.rb +1 -1
- data/lib/sib-api-v3-sdk/models/get_aggregated_report.rb +0 -65
- data/lib/sib-api-v3-sdk/models/get_campaign_stats.rb +14 -4
- data/lib/sib-api-v3-sdk/models/remove_contact_from_list.rb +14 -2
- data/lib/sib-api-v3-sdk/models/send_smtp_email_sender.rb +15 -5
- data/lib/sib-api-v3-sdk/models/send_transac_sms.rb +6 -6
- data/lib/sib-api-v3-sdk/models/update_sms_campaign.rb +6 -6
- data/lib/sib-api-v3-sdk/models/update_webhook.rb +1 -1
- data/lib/sib-api-v3-sdk/version.rb +1 -1
- data/spec/api/contacts_api_spec.rb +6 -6
- data/spec/api/lists_api_spec.rb +2 -2
- data/spec/api/{smtp_api_spec.rb → transactional_emails_api_spec.rb} +6 -6
- data/spec/models/ab_test_campaign_result_clicked_links_spec.rb +47 -0
- data/spec/models/ab_test_campaign_result_spec.rb +12 -0
- data/spec/models/ab_test_campaign_result_statistics_spec.rb +71 -0
- data/spec/models/ab_test_version_clicks_inner_spec.rb +53 -0
- data/spec/models/ab_test_version_clicks_spec.rb +35 -0
- data/spec/models/ab_test_version_stats_spec.rb +47 -0
- data/spec/models/add_contact_to_list_spec.rb +6 -0
- data/spec/models/get_campaign_stats_spec.rb +6 -0
- data/spec/models/remove_contact_from_list_spec.rb +6 -0
- data/spec/models/send_smtp_email_sender_spec.rb +6 -0
- data/testfile.rb +23 -0
- metadata +31 -10
@@ -14,20 +14,25 @@ require 'date'
|
|
14
14
|
|
15
15
|
module SibApiV3Sdk
|
16
16
|
class AddContactToList
|
17
|
-
# Emails to add to a list. You can pass a maximum of 150 emails for addition in one request. If you need to add the emails in bulk, please prefer /contacts/import api.
|
17
|
+
# Mandatory if IDs are not passed, ignored otherwise. Emails to add to a list. You can pass a maximum of 150 emails for addition in one request. If you need to add the emails in bulk, please prefer /contacts/import api.
|
18
18
|
attr_accessor :emails
|
19
19
|
|
20
|
+
# Mandatory if Emails are not passed, ignored otherwise. Emails to add to a list. You can pass a maximum of 150 emails for addition in one request. If you need to add the emails in bulk, please prefer /contacts/import api.
|
21
|
+
attr_accessor :ids
|
22
|
+
|
20
23
|
# Attribute mapping from ruby-style variable name to JSON key.
|
21
24
|
def self.attribute_map
|
22
25
|
{
|
23
|
-
:'emails' => :'emails'
|
26
|
+
:'emails' => :'emails',
|
27
|
+
:'ids' => :'ids'
|
24
28
|
}
|
25
29
|
end
|
26
30
|
|
27
31
|
# Attribute type mapping.
|
28
32
|
def self.swagger_types
|
29
33
|
{
|
30
|
-
:'emails' => :'Array<String>'
|
34
|
+
:'emails' => :'Array<String>',
|
35
|
+
:'ids' => :'Array<Integer>'
|
31
36
|
}
|
32
37
|
end
|
33
38
|
|
@@ -44,6 +49,12 @@ module SibApiV3Sdk
|
|
44
49
|
self.emails = value
|
45
50
|
end
|
46
51
|
end
|
52
|
+
|
53
|
+
if attributes.has_key?(:'ids')
|
54
|
+
if (value = attributes[:'ids']).is_a?(Array)
|
55
|
+
self.ids = value
|
56
|
+
end
|
57
|
+
end
|
47
58
|
end
|
48
59
|
|
49
60
|
# Show invalid properties with the reasons. Usually used together with valid?
|
@@ -64,7 +75,8 @@ module SibApiV3Sdk
|
|
64
75
|
def ==(o)
|
65
76
|
return true if self.equal?(o)
|
66
77
|
self.class == o.class &&
|
67
|
-
emails == o.emails
|
78
|
+
emails == o.emails &&
|
79
|
+
ids == o.ids
|
68
80
|
end
|
69
81
|
|
70
82
|
# @see the `==` method
|
@@ -76,7 +88,7 @@ module SibApiV3Sdk
|
|
76
88
|
# Calculates hash code according to all attributes.
|
77
89
|
# @return [Fixnum] Hash code
|
78
90
|
def hash
|
79
|
-
[emails].hash
|
91
|
+
[emails, ids].hash
|
80
92
|
end
|
81
93
|
|
82
94
|
# Builds the object from hash
|
@@ -109,6 +109,10 @@ module SibApiV3Sdk
|
|
109
109
|
invalid_properties.push('invalid value for "template_id", template_id cannot be nil.')
|
110
110
|
end
|
111
111
|
|
112
|
+
if @redirection_url.nil?
|
113
|
+
invalid_properties.push('invalid value for "redirection_url", redirection_url cannot be nil.')
|
114
|
+
end
|
115
|
+
|
112
116
|
invalid_properties
|
113
117
|
end
|
114
118
|
|
@@ -118,6 +122,7 @@ module SibApiV3Sdk
|
|
118
122
|
return false if @email.nil?
|
119
123
|
return false if @include_list_ids.nil?
|
120
124
|
return false if @template_id.nil?
|
125
|
+
return false if @redirection_url.nil?
|
121
126
|
true
|
122
127
|
end
|
123
128
|
|
@@ -17,7 +17,7 @@ module SibApiV3Sdk
|
|
17
17
|
# Name of the campaign
|
18
18
|
attr_accessor :name
|
19
19
|
|
20
|
-
# Name of the sender. The number of characters is limited to 11
|
20
|
+
# Name of the sender. **The number of characters is limited to 11 for alphanumeric characters and 15 for numeric characters**
|
21
21
|
attr_accessor :sender
|
22
22
|
|
23
23
|
# 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
|
@@ -91,8 +91,8 @@ module SibApiV3Sdk
|
|
91
91
|
invalid_properties.push('invalid value for "sender", sender cannot be nil.')
|
92
92
|
end
|
93
93
|
|
94
|
-
if @sender.to_s.length >
|
95
|
-
invalid_properties.push('invalid value for "sender", the character length must be smaller than or equal to
|
94
|
+
if @sender.to_s.length > 15
|
95
|
+
invalid_properties.push('invalid value for "sender", the character length must be smaller than or equal to 15.')
|
96
96
|
end
|
97
97
|
|
98
98
|
if @content.nil?
|
@@ -107,7 +107,7 @@ module SibApiV3Sdk
|
|
107
107
|
def valid?
|
108
108
|
return false if @name.nil?
|
109
109
|
return false if @sender.nil?
|
110
|
-
return false if @sender.to_s.length >
|
110
|
+
return false if @sender.to_s.length > 15
|
111
111
|
return false if @content.nil?
|
112
112
|
true
|
113
113
|
end
|
@@ -119,8 +119,8 @@ module SibApiV3Sdk
|
|
119
119
|
fail ArgumentError, 'sender cannot be nil'
|
120
120
|
end
|
121
121
|
|
122
|
-
if sender.to_s.length >
|
123
|
-
fail ArgumentError, 'invalid value for "sender", the character length must be smaller than or equal to
|
122
|
+
if sender.to_s.length > 15
|
123
|
+
fail ArgumentError, 'invalid value for "sender", the character length must be smaller than or equal to 15.'
|
124
124
|
end
|
125
125
|
|
126
126
|
@sender = sender
|
@@ -20,7 +20,7 @@ module SibApiV3Sdk
|
|
20
20
|
# Description of the webhook
|
21
21
|
attr_accessor :description
|
22
22
|
|
23
|
-
# Events triggering the webhook. Possible values for Transactional type webhook – sent
|
23
|
+
# Events triggering the webhook. Possible values for Transactional type webhook – `sent` OR `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`
|
24
24
|
attr_accessor :events
|
25
25
|
|
26
26
|
# Type of the webhook
|
@@ -156,77 +156,12 @@ module SibApiV3Sdk
|
|
156
156
|
# @return Array for valid properties with the reasons
|
157
157
|
def list_invalid_properties
|
158
158
|
invalid_properties = Array.new
|
159
|
-
if @range.nil?
|
160
|
-
invalid_properties.push('invalid value for "range", range cannot be nil.')
|
161
|
-
end
|
162
|
-
|
163
|
-
if @requests.nil?
|
164
|
-
invalid_properties.push('invalid value for "requests", requests cannot be nil.')
|
165
|
-
end
|
166
|
-
|
167
|
-
if @delivered.nil?
|
168
|
-
invalid_properties.push('invalid value for "delivered", delivered cannot be nil.')
|
169
|
-
end
|
170
|
-
|
171
|
-
if @hard_bounces.nil?
|
172
|
-
invalid_properties.push('invalid value for "hard_bounces", hard_bounces cannot be nil.')
|
173
|
-
end
|
174
|
-
|
175
|
-
if @soft_bounces.nil?
|
176
|
-
invalid_properties.push('invalid value for "soft_bounces", soft_bounces cannot be nil.')
|
177
|
-
end
|
178
|
-
|
179
|
-
if @clicks.nil?
|
180
|
-
invalid_properties.push('invalid value for "clicks", clicks cannot be nil.')
|
181
|
-
end
|
182
|
-
|
183
|
-
if @unique_clicks.nil?
|
184
|
-
invalid_properties.push('invalid value for "unique_clicks", unique_clicks cannot be nil.')
|
185
|
-
end
|
186
|
-
|
187
|
-
if @opens.nil?
|
188
|
-
invalid_properties.push('invalid value for "opens", opens cannot be nil.')
|
189
|
-
end
|
190
|
-
|
191
|
-
if @unique_opens.nil?
|
192
|
-
invalid_properties.push('invalid value for "unique_opens", unique_opens cannot be nil.')
|
193
|
-
end
|
194
|
-
|
195
|
-
if @spam_reports.nil?
|
196
|
-
invalid_properties.push('invalid value for "spam_reports", spam_reports cannot be nil.')
|
197
|
-
end
|
198
|
-
|
199
|
-
if @blocked.nil?
|
200
|
-
invalid_properties.push('invalid value for "blocked", blocked cannot be nil.')
|
201
|
-
end
|
202
|
-
|
203
|
-
if @invalid.nil?
|
204
|
-
invalid_properties.push('invalid value for "invalid", invalid cannot be nil.')
|
205
|
-
end
|
206
|
-
|
207
|
-
if @unsubscribed.nil?
|
208
|
-
invalid_properties.push('invalid value for "unsubscribed", unsubscribed cannot be nil.')
|
209
|
-
end
|
210
|
-
|
211
159
|
invalid_properties
|
212
160
|
end
|
213
161
|
|
214
162
|
# Check to see if the all the properties in the model are valid
|
215
163
|
# @return true if the model is valid
|
216
164
|
def valid?
|
217
|
-
return false if @range.nil?
|
218
|
-
return false if @requests.nil?
|
219
|
-
return false if @delivered.nil?
|
220
|
-
return false if @hard_bounces.nil?
|
221
|
-
return false if @soft_bounces.nil?
|
222
|
-
return false if @clicks.nil?
|
223
|
-
return false if @unique_clicks.nil?
|
224
|
-
return false if @opens.nil?
|
225
|
-
return false if @unique_opens.nil?
|
226
|
-
return false if @spam_reports.nil?
|
227
|
-
return false if @blocked.nil?
|
228
|
-
return false if @invalid.nil?
|
229
|
-
return false if @unsubscribed.nil?
|
230
165
|
true
|
231
166
|
end
|
232
167
|
|
@@ -50,6 +50,9 @@ module SibApiV3Sdk
|
|
50
50
|
# Number of deferred emails for the campaign
|
51
51
|
attr_accessor :deferred
|
52
52
|
|
53
|
+
# Total number of non-delivered campaigns for a particular campaign id.
|
54
|
+
attr_accessor :return_bounce
|
55
|
+
|
53
56
|
# Attribute mapping from ruby-style variable name to JSON key.
|
54
57
|
def self.attribute_map
|
55
58
|
{
|
@@ -64,7 +67,8 @@ module SibApiV3Sdk
|
|
64
67
|
:'unique_views' => :'uniqueViews',
|
65
68
|
:'unsubscriptions' => :'unsubscriptions',
|
66
69
|
:'viewed' => :'viewed',
|
67
|
-
:'deferred' => :'deferred'
|
70
|
+
:'deferred' => :'deferred',
|
71
|
+
:'return_bounce' => :'returnBounce'
|
68
72
|
}
|
69
73
|
end
|
70
74
|
|
@@ -82,7 +86,8 @@ module SibApiV3Sdk
|
|
82
86
|
:'unique_views' => :'Integer',
|
83
87
|
:'unsubscriptions' => :'Integer',
|
84
88
|
:'viewed' => :'Integer',
|
85
|
-
:'deferred' => :'Integer'
|
89
|
+
:'deferred' => :'Integer',
|
90
|
+
:'return_bounce' => :'Integer'
|
86
91
|
}
|
87
92
|
end
|
88
93
|
|
@@ -141,6 +146,10 @@ module SibApiV3Sdk
|
|
141
146
|
if attributes.has_key?(:'deferred')
|
142
147
|
self.deferred = attributes[:'deferred']
|
143
148
|
end
|
149
|
+
|
150
|
+
if attributes.has_key?(:'returnBounce')
|
151
|
+
self.return_bounce = attributes[:'returnBounce']
|
152
|
+
end
|
144
153
|
end
|
145
154
|
|
146
155
|
# Show invalid properties with the reasons. Usually used together with valid?
|
@@ -222,7 +231,8 @@ module SibApiV3Sdk
|
|
222
231
|
unique_views == o.unique_views &&
|
223
232
|
unsubscriptions == o.unsubscriptions &&
|
224
233
|
viewed == o.viewed &&
|
225
|
-
deferred == o.deferred
|
234
|
+
deferred == o.deferred &&
|
235
|
+
return_bounce == o.return_bounce
|
226
236
|
end
|
227
237
|
|
228
238
|
# @see the `==` method
|
@@ -234,7 +244,7 @@ module SibApiV3Sdk
|
|
234
244
|
# Calculates hash code according to all attributes.
|
235
245
|
# @return [Fixnum] Hash code
|
236
246
|
def hash
|
237
|
-
[list_id, unique_clicks, clickers, complaints, delivered, sent, soft_bounces, hard_bounces, unique_views, unsubscriptions, viewed, deferred].hash
|
247
|
+
[list_id, unique_clicks, clickers, complaints, delivered, sent, soft_bounces, hard_bounces, unique_views, unsubscriptions, viewed, deferred, return_bounce].hash
|
238
248
|
end
|
239
249
|
|
240
250
|
# Builds the object from hash
|
@@ -17,13 +17,17 @@ module SibApiV3Sdk
|
|
17
17
|
# Required if 'all' is false. Emails to remove from a list. You can pass a maximum of 150 emails for removal in one request.
|
18
18
|
attr_accessor :emails
|
19
19
|
|
20
|
-
#
|
20
|
+
# Mandatory if Emails are not passed, ignored otherwise. Emails to add to a list. You can pass a maximum of 150 emails for addition in one request. If you need to add the emails in bulk, please prefer /contacts/import api.
|
21
|
+
attr_accessor :ids
|
22
|
+
|
23
|
+
# Required if none of 'emails' or 'ids' are passed. Remove all existing contacts from a list. A process will be created in this scenario. You can fetch the process details to know about the progress
|
21
24
|
attr_accessor :all
|
22
25
|
|
23
26
|
# Attribute mapping from ruby-style variable name to JSON key.
|
24
27
|
def self.attribute_map
|
25
28
|
{
|
26
29
|
:'emails' => :'emails',
|
30
|
+
:'ids' => :'ids',
|
27
31
|
:'all' => :'all'
|
28
32
|
}
|
29
33
|
end
|
@@ -32,6 +36,7 @@ module SibApiV3Sdk
|
|
32
36
|
def self.swagger_types
|
33
37
|
{
|
34
38
|
:'emails' => :'Array<String>',
|
39
|
+
:'ids' => :'Array<Integer>',
|
35
40
|
:'all' => :'BOOLEAN'
|
36
41
|
}
|
37
42
|
end
|
@@ -50,6 +55,12 @@ module SibApiV3Sdk
|
|
50
55
|
end
|
51
56
|
end
|
52
57
|
|
58
|
+
if attributes.has_key?(:'ids')
|
59
|
+
if (value = attributes[:'ids']).is_a?(Array)
|
60
|
+
self.ids = value
|
61
|
+
end
|
62
|
+
end
|
63
|
+
|
53
64
|
if attributes.has_key?(:'all')
|
54
65
|
self.all = attributes[:'all']
|
55
66
|
end
|
@@ -74,6 +85,7 @@ module SibApiV3Sdk
|
|
74
85
|
return true if self.equal?(o)
|
75
86
|
self.class == o.class &&
|
76
87
|
emails == o.emails &&
|
88
|
+
ids == o.ids &&
|
77
89
|
all == o.all
|
78
90
|
end
|
79
91
|
|
@@ -86,7 +98,7 @@ module SibApiV3Sdk
|
|
86
98
|
# Calculates hash code according to all attributes.
|
87
99
|
# @return [Fixnum] Hash code
|
88
100
|
def hash
|
89
|
-
[emails, all].hash
|
101
|
+
[emails, ids, all].hash
|
90
102
|
end
|
91
103
|
|
92
104
|
# Builds the object from hash
|
@@ -13,7 +13,7 @@ Swagger Codegen version: 2.4.12
|
|
13
13
|
require 'date'
|
14
14
|
|
15
15
|
module SibApiV3Sdk
|
16
|
-
# Mandatory if
|
16
|
+
# Mandatory if `templateId` is not passed. Pass name (optional) and email or id of sender from which emails will be sent. `name` will be ignored if passed along with sender `id`. For example, {\"name\":\"Mary from MyShop\", \"email\":\"no-reply@myshop.com\"} or {\"id\":2}
|
17
17
|
class SendSmtpEmailSender
|
18
18
|
# Name of the sender from which the emails will be sent. Maximum allowed characters are 70.
|
19
19
|
attr_accessor :name
|
@@ -21,11 +21,15 @@ module SibApiV3Sdk
|
|
21
21
|
# Email of the sender from which the emails will be sent
|
22
22
|
attr_accessor :email
|
23
23
|
|
24
|
+
# Id of the sender from which the emails will be sent
|
25
|
+
attr_accessor :id
|
26
|
+
|
24
27
|
# Attribute mapping from ruby-style variable name to JSON key.
|
25
28
|
def self.attribute_map
|
26
29
|
{
|
27
30
|
:'name' => :'name',
|
28
|
-
:'email' => :'email'
|
31
|
+
:'email' => :'email',
|
32
|
+
:'id' => :'id'
|
29
33
|
}
|
30
34
|
end
|
31
35
|
|
@@ -33,7 +37,8 @@ module SibApiV3Sdk
|
|
33
37
|
def self.swagger_types
|
34
38
|
{
|
35
39
|
:'name' => :'String',
|
36
|
-
:'email' => :'String'
|
40
|
+
:'email' => :'String',
|
41
|
+
:'id' => :'Integer'
|
37
42
|
}
|
38
43
|
end
|
39
44
|
|
@@ -52,6 +57,10 @@ module SibApiV3Sdk
|
|
52
57
|
if attributes.has_key?(:'email')
|
53
58
|
self.email = attributes[:'email']
|
54
59
|
end
|
60
|
+
|
61
|
+
if attributes.has_key?(:'id')
|
62
|
+
self.id = attributes[:'id']
|
63
|
+
end
|
55
64
|
end
|
56
65
|
|
57
66
|
# Show invalid properties with the reasons. Usually used together with valid?
|
@@ -78,7 +87,8 @@ module SibApiV3Sdk
|
|
78
87
|
return true if self.equal?(o)
|
79
88
|
self.class == o.class &&
|
80
89
|
name == o.name &&
|
81
|
-
email == o.email
|
90
|
+
email == o.email &&
|
91
|
+
id == o.id
|
82
92
|
end
|
83
93
|
|
84
94
|
# @see the `==` method
|
@@ -90,7 +100,7 @@ module SibApiV3Sdk
|
|
90
100
|
# Calculates hash code according to all attributes.
|
91
101
|
# @return [Fixnum] Hash code
|
92
102
|
def hash
|
93
|
-
[name, email].hash
|
103
|
+
[name, email, id].hash
|
94
104
|
end
|
95
105
|
|
96
106
|
# Builds the object from hash
|
@@ -14,7 +14,7 @@ require 'date'
|
|
14
14
|
|
15
15
|
module SibApiV3Sdk
|
16
16
|
class SendTransacSms
|
17
|
-
# Name of the sender.
|
17
|
+
# Name of the sender. **The number of characters is limited to 11 for alphanumeric characters and 15 for numeric characters**
|
18
18
|
attr_accessor :sender
|
19
19
|
|
20
20
|
# Mobile number to send SMS with the country code
|
@@ -121,8 +121,8 @@ module SibApiV3Sdk
|
|
121
121
|
invalid_properties.push('invalid value for "sender", sender cannot be nil.')
|
122
122
|
end
|
123
123
|
|
124
|
-
if @sender.to_s.length >
|
125
|
-
invalid_properties.push('invalid value for "sender", the character length must be smaller than or equal to
|
124
|
+
if @sender.to_s.length > 15
|
125
|
+
invalid_properties.push('invalid value for "sender", the character length must be smaller than or equal to 15.')
|
126
126
|
end
|
127
127
|
|
128
128
|
if @recipient.nil?
|
@@ -140,7 +140,7 @@ module SibApiV3Sdk
|
|
140
140
|
# @return true if the model is valid
|
141
141
|
def valid?
|
142
142
|
return false if @sender.nil?
|
143
|
-
return false if @sender.to_s.length >
|
143
|
+
return false if @sender.to_s.length > 15
|
144
144
|
return false if @recipient.nil?
|
145
145
|
return false if @content.nil?
|
146
146
|
type_validator = EnumAttributeValidator.new('String', ['transactional', 'marketing'])
|
@@ -155,8 +155,8 @@ module SibApiV3Sdk
|
|
155
155
|
fail ArgumentError, 'sender cannot be nil'
|
156
156
|
end
|
157
157
|
|
158
|
-
if sender.to_s.length >
|
159
|
-
fail ArgumentError, 'invalid value for "sender", the character length must be smaller than or equal to
|
158
|
+
if sender.to_s.length > 15
|
159
|
+
fail ArgumentError, 'invalid value for "sender", the character length must be smaller than or equal to 15.'
|
160
160
|
end
|
161
161
|
|
162
162
|
@sender = sender
|
@@ -17,7 +17,7 @@ module SibApiV3Sdk
|
|
17
17
|
# Name of the campaign
|
18
18
|
attr_accessor :name
|
19
19
|
|
20
|
-
# Name of the sender. The number of characters is limited to 11
|
20
|
+
# Name of the sender. **The number of characters is limited to 11 for alphanumeric characters and 15 for numeric characters**
|
21
21
|
attr_accessor :sender
|
22
22
|
|
23
23
|
# 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
|
@@ -83,8 +83,8 @@ module SibApiV3Sdk
|
|
83
83
|
# @return Array for valid properties with the reasons
|
84
84
|
def list_invalid_properties
|
85
85
|
invalid_properties = Array.new
|
86
|
-
if !@sender.nil? && @sender.to_s.length >
|
87
|
-
invalid_properties.push('invalid value for "sender", the character length must be smaller than or equal to
|
86
|
+
if !@sender.nil? && @sender.to_s.length > 15
|
87
|
+
invalid_properties.push('invalid value for "sender", the character length must be smaller than or equal to 15.')
|
88
88
|
end
|
89
89
|
|
90
90
|
invalid_properties
|
@@ -93,15 +93,15 @@ module SibApiV3Sdk
|
|
93
93
|
# Check to see if the all the properties in the model are valid
|
94
94
|
# @return true if the model is valid
|
95
95
|
def valid?
|
96
|
-
return false if !@sender.nil? && @sender.to_s.length >
|
96
|
+
return false if !@sender.nil? && @sender.to_s.length > 15
|
97
97
|
true
|
98
98
|
end
|
99
99
|
|
100
100
|
# Custom attribute writer method with validation
|
101
101
|
# @param [Object] sender Value to be assigned
|
102
102
|
def sender=(sender)
|
103
|
-
if !sender.nil? && sender.to_s.length >
|
104
|
-
fail ArgumentError, 'invalid value for "sender", the character length must be smaller than or equal to
|
103
|
+
if !sender.nil? && sender.to_s.length > 15
|
104
|
+
fail ArgumentError, 'invalid value for "sender", the character length must be smaller than or equal to 15.'
|
105
105
|
end
|
106
106
|
|
107
107
|
@sender = sender
|