sib-api-v3-sdk 7.1.0 → 7.2.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (76) hide show
  1. checksums.yaml +4 -4
  2. data/README.md +5 -0
  3. data/docs/BlockDomain.md +8 -0
  4. data/docs/ContactsApi.md +18 -6
  5. data/docs/CreateSmtpTemplateSender.md +1 -1
  6. data/docs/EmailCampaignsApi.md +3 -1
  7. data/docs/FoldersApi.md +9 -3
  8. data/docs/GetBlockedDomains.md +8 -0
  9. data/docs/GetChildDomain.md +2 -2
  10. data/docs/GetChildrenList.md +1 -1
  11. data/docs/GetEmailCampaign.md +2 -2
  12. data/docs/GetEmailCampaigns.md +1 -1
  13. data/docs/GetEmailEventReportEvents.md +1 -0
  14. data/docs/GetExtendedCampaignOverview.md +2 -2
  15. data/docs/GetFolderLists.md +2 -2
  16. data/docs/GetLists.md +2 -2
  17. data/docs/GetProcesses.md +1 -1
  18. data/docs/GetSmsCampaign.md +1 -1
  19. data/docs/GetSmsCampaignOverview.md +1 -1
  20. data/docs/GetSmsCampaigns.md +1 -1
  21. data/docs/GetSmsEventReportEvents.md +4 -4
  22. data/docs/GetTransacAggregatedSmsReport.md +10 -10
  23. data/docs/GetTransacSmsReportReports.md +10 -10
  24. data/docs/ListsApi.md +9 -3
  25. data/docs/ProcessApi.md +3 -1
  26. data/docs/SMSCampaignsApi.md +3 -1
  27. data/docs/SendSmtpEmailSender.md +3 -3
  28. data/docs/TransactionalEmailsApi.md +187 -5
  29. data/docs/TransactionalSMSApi.md +6 -2
  30. data/lib/sib-api-v3-sdk.rb +2 -0
  31. data/lib/sib-api-v3-sdk/api/account_api.rb +10 -0
  32. data/lib/sib-api-v3-sdk/api/attributes_api.rb +10 -0
  33. data/lib/sib-api-v3-sdk/api/contacts_api.rb +40 -0
  34. data/lib/sib-api-v3-sdk/api/email_campaigns_api.rb +16 -0
  35. data/lib/sib-api-v3-sdk/api/folders_api.rb +22 -0
  36. data/lib/sib-api-v3-sdk/api/lists_api.rb +28 -0
  37. data/lib/sib-api-v3-sdk/api/process_api.rb +16 -0
  38. data/lib/sib-api-v3-sdk/api/reseller_api.rb +10 -0
  39. data/lib/sib-api-v3-sdk/api/senders_api.rb +10 -0
  40. data/lib/sib-api-v3-sdk/api/sms_campaigns_api.rb +16 -0
  41. data/lib/sib-api-v3-sdk/api/transactional_emails_api.rb +196 -2
  42. data/lib/sib-api-v3-sdk/api/transactional_sms_api.rb +22 -0
  43. data/lib/sib-api-v3-sdk/api/webhooks_api.rb +10 -0
  44. data/lib/sib-api-v3-sdk/models/block_domain.rb +189 -0
  45. data/lib/sib-api-v3-sdk/models/create_smtp_template_sender.rb +0 -5
  46. data/lib/sib-api-v3-sdk/models/get_blocked_domains.rb +192 -0
  47. data/lib/sib-api-v3-sdk/models/get_child_domain.rb +0 -10
  48. data/lib/sib-api-v3-sdk/models/get_children_list.rb +0 -5
  49. data/lib/sib-api-v3-sdk/models/get_email_campaign.rb +0 -10
  50. data/lib/sib-api-v3-sdk/models/get_email_campaigns.rb +0 -5
  51. data/lib/sib-api-v3-sdk/models/get_email_event_report_events.rb +16 -6
  52. data/lib/sib-api-v3-sdk/models/get_extended_campaign_overview.rb +0 -10
  53. data/lib/sib-api-v3-sdk/models/get_folder_lists.rb +0 -10
  54. data/lib/sib-api-v3-sdk/models/get_lists.rb +0 -10
  55. data/lib/sib-api-v3-sdk/models/get_processes.rb +0 -5
  56. data/lib/sib-api-v3-sdk/models/get_sms_campaign.rb +0 -5
  57. data/lib/sib-api-v3-sdk/models/get_sms_campaign_overview.rb +0 -5
  58. data/lib/sib-api-v3-sdk/models/get_sms_campaigns.rb +0 -5
  59. data/lib/sib-api-v3-sdk/models/get_sms_event_report_events.rb +0 -20
  60. data/lib/sib-api-v3-sdk/models/get_transac_aggregated_sms_report.rb +0 -50
  61. data/lib/sib-api-v3-sdk/models/get_transac_sms_report_reports.rb +0 -50
  62. data/lib/sib-api-v3-sdk/models/send_smtp_email_sender.rb +4 -9
  63. data/lib/sib-api-v3-sdk/version.rb +1 -1
  64. data/spec/api/contacts_api_spec.rb +5 -0
  65. data/spec/api/email_campaigns_api_spec.rb +1 -0
  66. data/spec/api/folders_api_spec.rb +2 -0
  67. data/spec/api/lists_api_spec.rb +3 -0
  68. data/spec/api/process_api_spec.rb +1 -0
  69. data/spec/api/sms_campaigns_api_spec.rb +1 -0
  70. data/spec/api/transactional_emails_api_spec.rb +40 -0
  71. data/spec/api/transactional_sms_api_spec.rb +2 -0
  72. data/spec/models/block_domain_spec.rb +41 -0
  73. data/spec/models/get_blocked_domains_spec.rb +41 -0
  74. data/spec/models/get_email_event_report_events_spec.rb +7 -1
  75. data/testfile.rb +26 -0
  76. metadata +11 -2
@@ -57,22 +57,12 @@ module SibApiV3Sdk
57
57
  # @return Array for valid properties with the reasons
58
58
  def list_invalid_properties
59
59
  invalid_properties = Array.new
60
- if @domain.nil?
61
- invalid_properties.push('invalid value for "domain", domain cannot be nil.')
62
- end
63
-
64
- if @active.nil?
65
- invalid_properties.push('invalid value for "active", active cannot be nil.')
66
- end
67
-
68
60
  invalid_properties
69
61
  end
70
62
 
71
63
  # Check to see if the all the properties in the model are valid
72
64
  # @return true if the model is valid
73
65
  def valid?
74
- return false if @domain.nil?
75
- return false if @active.nil?
76
66
  true
77
67
  end
78
68
 
@@ -59,17 +59,12 @@ module SibApiV3Sdk
59
59
  # @return Array for valid properties with the reasons
60
60
  def list_invalid_properties
61
61
  invalid_properties = Array.new
62
- if @count.nil?
63
- invalid_properties.push('invalid value for "count", count cannot be nil.')
64
- end
65
-
66
62
  invalid_properties
67
63
  end
68
64
 
69
65
  # Check to see if the all the properties in the model are valid
70
66
  # @return true if the model is valid
71
67
  def valid?
72
- return false if @count.nil?
73
68
  true
74
69
  end
75
70
 
@@ -373,18 +373,10 @@ module SibApiV3Sdk
373
373
  invalid_properties.push('invalid value for "reply_to", reply_to cannot be nil.')
374
374
  end
375
375
 
376
- if @to_field.nil?
377
- invalid_properties.push('invalid value for "to_field", to_field cannot be nil.')
378
- end
379
-
380
376
  if @html_content.nil?
381
377
  invalid_properties.push('invalid value for "html_content", html_content cannot be nil.')
382
378
  end
383
379
 
384
- if @tag.nil?
385
- invalid_properties.push('invalid value for "tag", tag cannot be nil.')
386
- end
387
-
388
380
  if @created_at.nil?
389
381
  invalid_properties.push('invalid value for "created_at", created_at cannot be nil.')
390
382
  end
@@ -420,9 +412,7 @@ module SibApiV3Sdk
420
412
  return false if @footer.nil?
421
413
  return false if @sender.nil?
422
414
  return false if @reply_to.nil?
423
- return false if @to_field.nil?
424
415
  return false if @html_content.nil?
425
- return false if @tag.nil?
426
416
  return false if @created_at.nil?
427
417
  return false if @modified_at.nil?
428
418
  return false if @recipients.nil?
@@ -58,17 +58,12 @@ module SibApiV3Sdk
58
58
  # @return Array for valid properties with the reasons
59
59
  def list_invalid_properties
60
60
  invalid_properties = Array.new
61
- if @count.nil?
62
- invalid_properties.push('invalid value for "count", count cannot be nil.')
63
- end
64
-
65
61
  invalid_properties
66
62
  end
67
63
 
68
64
  # Check to see if the all the properties in the model are valid
69
65
  # @return true if the model is valid
70
66
  def valid?
71
- return false if @count.nil?
72
67
  true
73
68
  end
74
69
 
@@ -44,6 +44,9 @@ module SibApiV3Sdk
44
44
  # Sender email from which the emails are sent
45
45
  attr_accessor :from
46
46
 
47
+ # ID of the template (only available if the email is template based)
48
+ attr_accessor :template_id
49
+
47
50
  class EnumAttributeValidator
48
51
  attr_reader :datatype
49
52
  attr_reader :allowable_values
@@ -78,7 +81,8 @@ module SibApiV3Sdk
78
81
  :'tag' => :'tag',
79
82
  :'ip' => :'ip',
80
83
  :'link' => :'link',
81
- :'from' => :'from'
84
+ :'from' => :'from',
85
+ :'template_id' => :'templateId'
82
86
  }
83
87
  end
84
88
 
@@ -94,7 +98,8 @@ module SibApiV3Sdk
94
98
  :'tag' => :'String',
95
99
  :'ip' => :'String',
96
100
  :'link' => :'String',
97
- :'from' => :'String'
101
+ :'from' => :'String',
102
+ :'template_id' => :'Integer'
98
103
  }
99
104
  end
100
105
 
@@ -145,6 +150,10 @@ module SibApiV3Sdk
145
150
  if attributes.has_key?(:'from')
146
151
  self.from = attributes[:'from']
147
152
  end
153
+
154
+ if attributes.has_key?(:'templateId')
155
+ self.template_id = attributes[:'templateId']
156
+ end
148
157
  end
149
158
 
150
159
  # Show invalid properties with the reasons. Usually used together with valid?
@@ -177,7 +186,7 @@ module SibApiV3Sdk
177
186
  return false if @date.nil?
178
187
  return false if @message_id.nil?
179
188
  return false if @event.nil?
180
- event_validator = EnumAttributeValidator.new('String', ['bounces', 'hardBounces', 'softBounces', 'delivered', 'spam', 'requests', 'opened', 'clicks', 'invalid', 'deferred', 'blocked', 'unsubscribed'])
189
+ event_validator = EnumAttributeValidator.new('String', ['bounces', 'hardBounces', 'softBounces', 'delivered', 'spam', 'requests', 'opened', 'clicks', 'invalid', 'deferred', 'blocked', 'unsubscribed', 'error'])
181
190
  return false unless event_validator.valid?(@event)
182
191
  true
183
192
  end
@@ -185,7 +194,7 @@ module SibApiV3Sdk
185
194
  # Custom attribute writer method checking allowed values (enum).
186
195
  # @param [Object] event Object to be assigned
187
196
  def event=(event)
188
- validator = EnumAttributeValidator.new('String', ['bounces', 'hardBounces', 'softBounces', 'delivered', 'spam', 'requests', 'opened', 'clicks', 'invalid', 'deferred', 'blocked', 'unsubscribed'])
197
+ validator = EnumAttributeValidator.new('String', ['bounces', 'hardBounces', 'softBounces', 'delivered', 'spam', 'requests', 'opened', 'clicks', 'invalid', 'deferred', 'blocked', 'unsubscribed', 'error'])
189
198
  unless validator.valid?(event)
190
199
  fail ArgumentError, 'invalid value for "event", must be one of #{validator.allowable_values}.'
191
200
  end
@@ -206,7 +215,8 @@ module SibApiV3Sdk
206
215
  tag == o.tag &&
207
216
  ip == o.ip &&
208
217
  link == o.link &&
209
- from == o.from
218
+ from == o.from &&
219
+ template_id == o.template_id
210
220
  end
211
221
 
212
222
  # @see the `==` method
@@ -218,7 +228,7 @@ module SibApiV3Sdk
218
228
  # Calculates hash code according to all attributes.
219
229
  # @return [Fixnum] Hash code
220
230
  def hash
221
- [email, date, subject, message_id, event, reason, tag, ip, link, from].hash
231
+ [email, date, subject, message_id, event, reason, tag, ip, link, from, template_id].hash
222
232
  end
223
233
 
224
234
  # Builds the object from hash
@@ -357,18 +357,10 @@ module SibApiV3Sdk
357
357
  invalid_properties.push('invalid value for "reply_to", reply_to cannot be nil.')
358
358
  end
359
359
 
360
- if @to_field.nil?
361
- invalid_properties.push('invalid value for "to_field", to_field cannot be nil.')
362
- end
363
-
364
360
  if @html_content.nil?
365
361
  invalid_properties.push('invalid value for "html_content", html_content cannot be nil.')
366
362
  end
367
363
 
368
- if @tag.nil?
369
- invalid_properties.push('invalid value for "tag", tag cannot be nil.')
370
- end
371
-
372
364
  if @created_at.nil?
373
365
  invalid_properties.push('invalid value for "created_at", created_at cannot be nil.')
374
366
  end
@@ -396,9 +388,7 @@ module SibApiV3Sdk
396
388
  return false if @footer.nil?
397
389
  return false if @sender.nil?
398
390
  return false if @reply_to.nil?
399
- return false if @to_field.nil?
400
391
  return false if @html_content.nil?
401
- return false if @tag.nil?
402
392
  return false if @created_at.nil?
403
393
  return false if @modified_at.nil?
404
394
  true
@@ -58,22 +58,12 @@ module SibApiV3Sdk
58
58
  # @return Array for valid properties with the reasons
59
59
  def list_invalid_properties
60
60
  invalid_properties = Array.new
61
- if @lists.nil?
62
- invalid_properties.push('invalid value for "lists", lists cannot be nil.')
63
- end
64
-
65
- if @count.nil?
66
- invalid_properties.push('invalid value for "count", count cannot be nil.')
67
- end
68
-
69
61
  invalid_properties
70
62
  end
71
63
 
72
64
  # Check to see if the all the properties in the model are valid
73
65
  # @return true if the model is valid
74
66
  def valid?
75
- return false if @lists.nil?
76
- return false if @count.nil?
77
67
  true
78
68
  end
79
69
 
@@ -59,22 +59,12 @@ module SibApiV3Sdk
59
59
  # @return Array for valid properties with the reasons
60
60
  def list_invalid_properties
61
61
  invalid_properties = Array.new
62
- if @lists.nil?
63
- invalid_properties.push('invalid value for "lists", lists cannot be nil.')
64
- end
65
-
66
- if @count.nil?
67
- invalid_properties.push('invalid value for "count", count cannot be nil.')
68
- end
69
-
70
62
  invalid_properties
71
63
  end
72
64
 
73
65
  # Check to see if the all the properties in the model are valid
74
66
  # @return true if the model is valid
75
67
  def valid?
76
- return false if @lists.nil?
77
- return false if @count.nil?
78
68
  true
79
69
  end
80
70
 
@@ -59,17 +59,12 @@ module SibApiV3Sdk
59
59
  # @return Array for valid properties with the reasons
60
60
  def list_invalid_properties
61
61
  invalid_properties = Array.new
62
- if @count.nil?
63
- invalid_properties.push('invalid value for "count", count cannot be nil.')
64
- end
65
-
66
62
  invalid_properties
67
63
  end
68
64
 
69
65
  # Check to see if the all the properties in the model are valid
70
66
  # @return true if the model is valid
71
67
  def valid?
72
- return false if @count.nil?
73
68
  true
74
69
  end
75
70
 
@@ -165,10 +165,6 @@ module SibApiV3Sdk
165
165
  invalid_properties.push('invalid value for "content", content cannot be nil.')
166
166
  end
167
167
 
168
- if @scheduled_at.nil?
169
- invalid_properties.push('invalid value for "scheduled_at", scheduled_at cannot be nil.')
170
- end
171
-
172
168
  if @sender.nil?
173
169
  invalid_properties.push('invalid value for "sender", sender cannot be nil.')
174
170
  end
@@ -201,7 +197,6 @@ module SibApiV3Sdk
201
197
  status_validator = EnumAttributeValidator.new('String', ['draft', 'sent', 'archive', 'queued', 'suspended', 'inProcess'])
202
198
  return false unless status_validator.valid?(@status)
203
199
  return false if @content.nil?
204
- return false if @scheduled_at.nil?
205
200
  return false if @sender.nil?
206
201
  return false if @created_at.nil?
207
202
  return false if @modified_at.nil?
@@ -149,10 +149,6 @@ module SibApiV3Sdk
149
149
  invalid_properties.push('invalid value for "content", content cannot be nil.')
150
150
  end
151
151
 
152
- if @scheduled_at.nil?
153
- invalid_properties.push('invalid value for "scheduled_at", scheduled_at cannot be nil.')
154
- end
155
-
156
152
  if @sender.nil?
157
153
  invalid_properties.push('invalid value for "sender", sender cannot be nil.')
158
154
  end
@@ -177,7 +173,6 @@ module SibApiV3Sdk
177
173
  status_validator = EnumAttributeValidator.new('String', ['draft', 'sent', 'archive', 'queued', 'suspended', 'inProcess'])
178
174
  return false unless status_validator.valid?(@status)
179
175
  return false if @content.nil?
180
- return false if @scheduled_at.nil?
181
176
  return false if @sender.nil?
182
177
  return false if @created_at.nil?
183
178
  return false if @modified_at.nil?
@@ -58,17 +58,12 @@ module SibApiV3Sdk
58
58
  # @return Array for valid properties with the reasons
59
59
  def list_invalid_properties
60
60
  invalid_properties = Array.new
61
- if @count.nil?
62
- invalid_properties.push('invalid value for "count", count cannot be nil.')
63
- end
64
-
65
61
  invalid_properties
66
62
  end
67
63
 
68
64
  # Check to see if the all the properties in the model are valid
69
65
  # @return true if the model is valid
70
66
  def valid?
71
- return false if @count.nil?
72
67
  true
73
68
  end
74
69
 
@@ -123,32 +123,12 @@ module SibApiV3Sdk
123
123
  # @return Array for valid properties with the reasons
124
124
  def list_invalid_properties
125
125
  invalid_properties = Array.new
126
- if @phone_number.nil?
127
- invalid_properties.push('invalid value for "phone_number", phone_number cannot be nil.')
128
- end
129
-
130
- if @date.nil?
131
- invalid_properties.push('invalid value for "date", date cannot be nil.')
132
- end
133
-
134
- if @message_id.nil?
135
- invalid_properties.push('invalid value for "message_id", message_id cannot be nil.')
136
- end
137
-
138
- if @event.nil?
139
- invalid_properties.push('invalid value for "event", event cannot be nil.')
140
- end
141
-
142
126
  invalid_properties
143
127
  end
144
128
 
145
129
  # Check to see if the all the properties in the model are valid
146
130
  # @return true if the model is valid
147
131
  def valid?
148
- return false if @phone_number.nil?
149
- return false if @date.nil?
150
- return false if @message_id.nil?
151
- return false if @event.nil?
152
132
  event_validator = EnumAttributeValidator.new('String', ['bounces', 'hardBounces', 'softBounces', 'delivered', 'sent', 'accepted', 'unsubscription', 'replies', 'blocked'])
153
133
  return false unless event_validator.valid?(@event)
154
134
  true
@@ -129,62 +129,12 @@ module SibApiV3Sdk
129
129
  # @return Array for valid properties with the reasons
130
130
  def list_invalid_properties
131
131
  invalid_properties = Array.new
132
- if @range.nil?
133
- invalid_properties.push('invalid value for "range", range cannot be nil.')
134
- end
135
-
136
- if @requests.nil?
137
- invalid_properties.push('invalid value for "requests", requests cannot be nil.')
138
- end
139
-
140
- if @delivered.nil?
141
- invalid_properties.push('invalid value for "delivered", delivered cannot be nil.')
142
- end
143
-
144
- if @hard_bounces.nil?
145
- invalid_properties.push('invalid value for "hard_bounces", hard_bounces cannot be nil.')
146
- end
147
-
148
- if @soft_bounces.nil?
149
- invalid_properties.push('invalid value for "soft_bounces", soft_bounces cannot be nil.')
150
- end
151
-
152
- if @blocked.nil?
153
- invalid_properties.push('invalid value for "blocked", blocked cannot be nil.')
154
- end
155
-
156
- if @unsubscribed.nil?
157
- invalid_properties.push('invalid value for "unsubscribed", unsubscribed cannot be nil.')
158
- end
159
-
160
- if @replied.nil?
161
- invalid_properties.push('invalid value for "replied", replied cannot be nil.')
162
- end
163
-
164
- if @accepted.nil?
165
- invalid_properties.push('invalid value for "accepted", accepted cannot be nil.')
166
- end
167
-
168
- if @rejected.nil?
169
- invalid_properties.push('invalid value for "rejected", rejected cannot be nil.')
170
- end
171
-
172
132
  invalid_properties
173
133
  end
174
134
 
175
135
  # Check to see if the all the properties in the model are valid
176
136
  # @return true if the model is valid
177
137
  def valid?
178
- return false if @range.nil?
179
- return false if @requests.nil?
180
- return false if @delivered.nil?
181
- return false if @hard_bounces.nil?
182
- return false if @soft_bounces.nil?
183
- return false if @blocked.nil?
184
- return false if @unsubscribed.nil?
185
- return false if @replied.nil?
186
- return false if @accepted.nil?
187
- return false if @rejected.nil?
188
138
  true
189
139
  end
190
140
 
@@ -129,62 +129,12 @@ module SibApiV3Sdk
129
129
  # @return Array for valid properties with the reasons
130
130
  def list_invalid_properties
131
131
  invalid_properties = Array.new
132
- if @date.nil?
133
- invalid_properties.push('invalid value for "date", date cannot be nil.')
134
- end
135
-
136
- if @requests.nil?
137
- invalid_properties.push('invalid value for "requests", requests cannot be nil.')
138
- end
139
-
140
- if @delivered.nil?
141
- invalid_properties.push('invalid value for "delivered", delivered cannot be nil.')
142
- end
143
-
144
- if @hard_bounces.nil?
145
- invalid_properties.push('invalid value for "hard_bounces", hard_bounces cannot be nil.')
146
- end
147
-
148
- if @soft_bounces.nil?
149
- invalid_properties.push('invalid value for "soft_bounces", soft_bounces cannot be nil.')
150
- end
151
-
152
- if @blocked.nil?
153
- invalid_properties.push('invalid value for "blocked", blocked cannot be nil.')
154
- end
155
-
156
- if @unsubscribed.nil?
157
- invalid_properties.push('invalid value for "unsubscribed", unsubscribed cannot be nil.')
158
- end
159
-
160
- if @replied.nil?
161
- invalid_properties.push('invalid value for "replied", replied cannot be nil.')
162
- end
163
-
164
- if @accepted.nil?
165
- invalid_properties.push('invalid value for "accepted", accepted cannot be nil.')
166
- end
167
-
168
- if @rejected.nil?
169
- invalid_properties.push('invalid value for "rejected", rejected cannot be nil.')
170
- end
171
-
172
132
  invalid_properties
173
133
  end
174
134
 
175
135
  # Check to see if the all the properties in the model are valid
176
136
  # @return true if the model is valid
177
137
  def valid?
178
- return false if @date.nil?
179
- return false if @requests.nil?
180
- return false if @delivered.nil?
181
- return false if @hard_bounces.nil?
182
- return false if @soft_bounces.nil?
183
- return false if @blocked.nil?
184
- return false if @unsubscribed.nil?
185
- return false if @replied.nil?
186
- return false if @accepted.nil?
187
- return false if @rejected.nil?
188
138
  true
189
139
  end
190
140