sib-api-v3-sdk 5.5.0 → 7.1.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/GetExtendedContactDetailsStatisticsUnsubscriptionsAdminUnsubscription.md +1 -1
- data/docs/GetExtendedContactDetailsStatisticsUnsubscriptionsUserUnsubscription.md +1 -1
- data/docs/ListsApi.md +4 -4
- data/docs/RemoveContactFromList.md +2 -1
- data/docs/SendReportEmail.md +1 -5
- 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/get_extended_contact_details_statistics_unsubscriptions_admin_unsubscription.rb +0 -5
- data/lib/sib-api-v3-sdk/models/get_extended_contact_details_statistics_unsubscriptions_user_unsubscription.rb +0 -5
- data/lib/sib-api-v3-sdk/models/remove_contact_from_list.rb +14 -2
- data/lib/sib-api-v3-sdk/models/send_report_email.rb +3 -88
- 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_report_email_spec.rb +0 -28
- data/spec/models/send_smtp_email_sender_spec.rb +6 -0
- metadata +30 -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
|
@@ -61,10 +61,6 @@ module SibApiV3Sdk
|
|
61
61
|
invalid_properties.push('invalid value for "event_time", event_time cannot be nil.')
|
62
62
|
end
|
63
63
|
|
64
|
-
if @ip.nil?
|
65
|
-
invalid_properties.push('invalid value for "ip", ip cannot be nil.')
|
66
|
-
end
|
67
|
-
|
68
64
|
invalid_properties
|
69
65
|
end
|
70
66
|
|
@@ -72,7 +68,6 @@ module SibApiV3Sdk
|
|
72
68
|
# @return true if the model is valid
|
73
69
|
def valid?
|
74
70
|
return false if @event_time.nil?
|
75
|
-
return false if @ip.nil?
|
76
71
|
true
|
77
72
|
end
|
78
73
|
|
@@ -74,10 +74,6 @@ module SibApiV3Sdk
|
|
74
74
|
invalid_properties.push('invalid value for "event_time", event_time cannot be nil.')
|
75
75
|
end
|
76
76
|
|
77
|
-
if @ip.nil?
|
78
|
-
invalid_properties.push('invalid value for "ip", ip cannot be nil.')
|
79
|
-
end
|
80
|
-
|
81
77
|
invalid_properties
|
82
78
|
end
|
83
79
|
|
@@ -86,7 +82,6 @@ module SibApiV3Sdk
|
|
86
82
|
def valid?
|
87
83
|
return false if @campaign_id.nil?
|
88
84
|
return false if @event_time.nil?
|
89
|
-
return false if @ip.nil?
|
90
85
|
true
|
91
86
|
end
|
92
87
|
|
@@ -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,56 +13,18 @@ Swagger Codegen version: 2.4.12
|
|
13
13
|
require 'date'
|
14
14
|
|
15
15
|
module SibApiV3Sdk
|
16
|
-
#
|
16
|
+
# Custom attributes for the report email.
|
17
17
|
class SendReportEmail
|
18
|
-
# Subject of the email message
|
19
|
-
attr_accessor :subject
|
20
|
-
|
21
18
|
# Email addresses of the recipients
|
22
19
|
attr_accessor :to
|
23
20
|
|
24
|
-
#
|
25
|
-
attr_accessor :content_type
|
26
|
-
|
27
|
-
# Email addresses of the recipients in bcc
|
28
|
-
attr_accessor :bcc
|
29
|
-
|
30
|
-
# Email addresses of the recipients in cc
|
31
|
-
attr_accessor :cc
|
32
|
-
|
33
|
-
# Body of the email message
|
21
|
+
# Custom text message to be presented in the report email.
|
34
22
|
attr_accessor :body
|
35
23
|
|
36
|
-
class EnumAttributeValidator
|
37
|
-
attr_reader :datatype
|
38
|
-
attr_reader :allowable_values
|
39
|
-
|
40
|
-
def initialize(datatype, allowable_values)
|
41
|
-
@allowable_values = allowable_values.map do |value|
|
42
|
-
case datatype.to_s
|
43
|
-
when /Integer/i
|
44
|
-
value.to_i
|
45
|
-
when /Float/i
|
46
|
-
value.to_f
|
47
|
-
else
|
48
|
-
value
|
49
|
-
end
|
50
|
-
end
|
51
|
-
end
|
52
|
-
|
53
|
-
def valid?(value)
|
54
|
-
!value || allowable_values.include?(value)
|
55
|
-
end
|
56
|
-
end
|
57
|
-
|
58
24
|
# Attribute mapping from ruby-style variable name to JSON key.
|
59
25
|
def self.attribute_map
|
60
26
|
{
|
61
|
-
:'subject' => :'subject',
|
62
27
|
:'to' => :'to',
|
63
|
-
:'content_type' => :'contentType',
|
64
|
-
:'bcc' => :'bcc',
|
65
|
-
:'cc' => :'cc',
|
66
28
|
:'body' => :'body'
|
67
29
|
}
|
68
30
|
end
|
@@ -70,11 +32,7 @@ module SibApiV3Sdk
|
|
70
32
|
# Attribute type mapping.
|
71
33
|
def self.swagger_types
|
72
34
|
{
|
73
|
-
:'subject' => :'String',
|
74
35
|
:'to' => :'Array<String>',
|
75
|
-
:'content_type' => :'String',
|
76
|
-
:'bcc' => :'Array<String>',
|
77
|
-
:'cc' => :'Array<String>',
|
78
36
|
:'body' => :'String'
|
79
37
|
}
|
80
38
|
end
|
@@ -87,34 +45,12 @@ module SibApiV3Sdk
|
|
87
45
|
# convert string to symbol for hash key
|
88
46
|
attributes = attributes.each_with_object({}) { |(k, v), h| h[k.to_sym] = v }
|
89
47
|
|
90
|
-
if attributes.has_key?(:'subject')
|
91
|
-
self.subject = attributes[:'subject']
|
92
|
-
end
|
93
|
-
|
94
48
|
if attributes.has_key?(:'to')
|
95
49
|
if (value = attributes[:'to']).is_a?(Array)
|
96
50
|
self.to = value
|
97
51
|
end
|
98
52
|
end
|
99
53
|
|
100
|
-
if attributes.has_key?(:'contentType')
|
101
|
-
self.content_type = attributes[:'contentType']
|
102
|
-
else
|
103
|
-
self.content_type = 'html'
|
104
|
-
end
|
105
|
-
|
106
|
-
if attributes.has_key?(:'bcc')
|
107
|
-
if (value = attributes[:'bcc']).is_a?(Array)
|
108
|
-
self.bcc = value
|
109
|
-
end
|
110
|
-
end
|
111
|
-
|
112
|
-
if attributes.has_key?(:'cc')
|
113
|
-
if (value = attributes[:'cc']).is_a?(Array)
|
114
|
-
self.cc = value
|
115
|
-
end
|
116
|
-
end
|
117
|
-
|
118
54
|
if attributes.has_key?(:'body')
|
119
55
|
self.body = attributes[:'body']
|
120
56
|
end
|
@@ -124,10 +60,6 @@ module SibApiV3Sdk
|
|
124
60
|
# @return Array for valid properties with the reasons
|
125
61
|
def list_invalid_properties
|
126
62
|
invalid_properties = Array.new
|
127
|
-
if @subject.nil?
|
128
|
-
invalid_properties.push('invalid value for "subject", subject cannot be nil.')
|
129
|
-
end
|
130
|
-
|
131
63
|
if @to.nil?
|
132
64
|
invalid_properties.push('invalid value for "to", to cannot be nil.')
|
133
65
|
end
|
@@ -142,34 +74,17 @@ module SibApiV3Sdk
|
|
142
74
|
# Check to see if the all the properties in the model are valid
|
143
75
|
# @return true if the model is valid
|
144
76
|
def valid?
|
145
|
-
return false if @subject.nil?
|
146
77
|
return false if @to.nil?
|
147
|
-
content_type_validator = EnumAttributeValidator.new('String', ['text', 'html'])
|
148
|
-
return false unless content_type_validator.valid?(@content_type)
|
149
78
|
return false if @body.nil?
|
150
79
|
true
|
151
80
|
end
|
152
81
|
|
153
|
-
# Custom attribute writer method checking allowed values (enum).
|
154
|
-
# @param [Object] content_type Object to be assigned
|
155
|
-
def content_type=(content_type)
|
156
|
-
validator = EnumAttributeValidator.new('String', ['text', 'html'])
|
157
|
-
unless validator.valid?(content_type)
|
158
|
-
fail ArgumentError, 'invalid value for "content_type", must be one of #{validator.allowable_values}.'
|
159
|
-
end
|
160
|
-
@content_type = content_type
|
161
|
-
end
|
162
|
-
|
163
82
|
# Checks equality by comparing each attribute.
|
164
83
|
# @param [Object] Object to be compared
|
165
84
|
def ==(o)
|
166
85
|
return true if self.equal?(o)
|
167
86
|
self.class == o.class &&
|
168
|
-
subject == o.subject &&
|
169
87
|
to == o.to &&
|
170
|
-
content_type == o.content_type &&
|
171
|
-
bcc == o.bcc &&
|
172
|
-
cc == o.cc &&
|
173
88
|
body == o.body
|
174
89
|
end
|
175
90
|
|
@@ -182,7 +97,7 @@ module SibApiV3Sdk
|
|
182
97
|
# Calculates hash code according to all attributes.
|
183
98
|
# @return [Fixnum] Hash code
|
184
99
|
def hash
|
185
|
-
[
|
100
|
+
[to, body].hash
|
186
101
|
end
|
187
102
|
|
188
103
|
# Builds the object from hash
|