sib-api-v3-sdk 5.2.0 → 5.2.1

Sign up to get free protection for your applications and to get access to all the features.
Files changed (75) hide show
  1. checksums.yaml +4 -4
  2. data/docs/AccountApi.md +6 -1
  3. data/docs/AttributesApi.md +24 -4
  4. data/docs/ContactsApi.md +156 -26
  5. data/docs/CreateAttribute.md +1 -1
  6. data/docs/CreateContact.md +1 -1
  7. data/docs/CreateEmailCampaign.md +9 -3
  8. data/docs/CreateSmtpTemplate.md +1 -1
  9. data/docs/EmailCampaignsApi.md +60 -10
  10. data/docs/FoldersApi.md +36 -6
  11. data/docs/GetCampaignOverview.md +8 -1
  12. data/docs/GetContactDetails.md +1 -0
  13. data/docs/GetEmailCampaign.md +8 -1
  14. data/docs/GetExtendedCampaignOverview.md +8 -1
  15. data/docs/GetExtendedContactDetails.md +1 -0
  16. data/docs/ListsApi.md +54 -9
  17. data/docs/ProcessApi.md +12 -2
  18. data/docs/RequestContactExport.md +1 -1
  19. data/docs/ResellerApi.md +54 -9
  20. data/docs/SMSCampaignsApi.md +60 -10
  21. data/docs/SMTPApi.md +72 -12
  22. data/docs/SendEmail.md +3 -3
  23. data/docs/SendSmtpEmail.md +4 -4
  24. data/docs/SendersApi.md +36 -6
  25. data/docs/TransactionalSMSApi.md +24 -4
  26. data/docs/UpdateAttribute.md +1 -1
  27. data/docs/UpdateContact.md +1 -1
  28. data/docs/UpdateEmailCampaign.md +8 -2
  29. data/docs/UpdateSmtpTemplate.md +1 -1
  30. data/docs/WebhooksApi.md +30 -5
  31. data/lib/sib-api-v3-sdk/api/account_api.rb +1 -1
  32. data/lib/sib-api-v3-sdk/api/attributes_api.rb +4 -4
  33. data/lib/sib-api-v3-sdk/api/contacts_api.rb +26 -26
  34. data/lib/sib-api-v3-sdk/api/email_campaigns_api.rb +10 -10
  35. data/lib/sib-api-v3-sdk/api/folders_api.rb +6 -6
  36. data/lib/sib-api-v3-sdk/api/lists_api.rb +9 -9
  37. data/lib/sib-api-v3-sdk/api/process_api.rb +2 -2
  38. data/lib/sib-api-v3-sdk/api/reseller_api.rb +9 -9
  39. data/lib/sib-api-v3-sdk/api/senders_api.rb +6 -6
  40. data/lib/sib-api-v3-sdk/api/sms_campaigns_api.rb +10 -10
  41. data/lib/sib-api-v3-sdk/api/smtp_api.rb +12 -12
  42. data/lib/sib-api-v3-sdk/api/transactional_sms_api.rb +4 -4
  43. data/lib/sib-api-v3-sdk/api/webhooks_api.rb +5 -5
  44. data/lib/sib-api-v3-sdk/configuration.rb +7 -0
  45. data/lib/sib-api-v3-sdk/models/create_attribute.rb +1 -1
  46. data/lib/sib-api-v3-sdk/models/create_contact.rb +1 -1
  47. data/lib/sib-api-v3-sdk/models/create_email_campaign.rb +150 -10
  48. data/lib/sib-api-v3-sdk/models/create_email_campaign_sender.rb +1 -1
  49. data/lib/sib-api-v3-sdk/models/create_smtp_template.rb +1 -1
  50. data/lib/sib-api-v3-sdk/models/create_smtp_template_sender.rb +1 -1
  51. data/lib/sib-api-v3-sdk/models/get_campaign_overview.rb +75 -10
  52. data/lib/sib-api-v3-sdk/models/get_contact_details.rb +16 -1
  53. data/lib/sib-api-v3-sdk/models/get_email_campaign.rb +72 -7
  54. data/lib/sib-api-v3-sdk/models/get_extended_campaign_overview.rb +72 -7
  55. data/lib/sib-api-v3-sdk/models/get_extended_contact_details.rb +16 -1
  56. data/lib/sib-api-v3-sdk/models/request_contact_export.rb +1 -1
  57. data/lib/sib-api-v3-sdk/models/send_email.rb +3 -3
  58. data/lib/sib-api-v3-sdk/models/send_smtp_email.rb +4 -4
  59. data/lib/sib-api-v3-sdk/models/send_smtp_email_reply_to.rb +1 -1
  60. data/lib/sib-api-v3-sdk/models/send_smtp_email_sender.rb +1 -1
  61. data/lib/sib-api-v3-sdk/models/update_attribute.rb +1 -1
  62. data/lib/sib-api-v3-sdk/models/update_contact.rb +1 -1
  63. data/lib/sib-api-v3-sdk/models/update_email_campaign.rb +151 -6
  64. data/lib/sib-api-v3-sdk/models/update_email_campaign_sender.rb +1 -1
  65. data/lib/sib-api-v3-sdk/models/update_smtp_template.rb +1 -1
  66. data/lib/sib-api-v3-sdk/models/update_smtp_template_sender.rb +1 -1
  67. data/lib/sib-api-v3-sdk/version.rb +1 -1
  68. data/spec/models/create_email_campaign_spec.rb +40 -0
  69. data/spec/models/get_campaign_overview_spec.rb +42 -0
  70. data/spec/models/get_contact_details_spec.rb +6 -0
  71. data/spec/models/get_email_campaign_spec.rb +42 -0
  72. data/spec/models/get_extended_campaign_overview_spec.rb +42 -0
  73. data/spec/models/get_extended_contact_details_spec.rb +6 -0
  74. data/spec/models/update_email_campaign_spec.rb +40 -0
  75. metadata +2 -2
@@ -86,7 +86,7 @@ module SibApiV3Sdk
86
86
 
87
87
  # http body (model)
88
88
  post_body = nil
89
- auth_names = ['api-key']
89
+ auth_names = ['api-key', 'partner-key']
90
90
  data, status_code, headers = @api_client.call_api(:GET, local_var_path,
91
91
  :header_params => header_params,
92
92
  :query_params => query_params,
@@ -147,7 +147,7 @@ module SibApiV3Sdk
147
147
 
148
148
  # http body (model)
149
149
  post_body = nil
150
- auth_names = ['api-key']
150
+ auth_names = ['api-key', 'partner-key']
151
151
  data, status_code, headers = @api_client.call_api(:GET, local_var_path,
152
152
  :header_params => header_params,
153
153
  :query_params => query_params,
@@ -208,7 +208,7 @@ module SibApiV3Sdk
208
208
 
209
209
  # http body (model)
210
210
  post_body = nil
211
- auth_names = ['api-key']
211
+ auth_names = ['api-key', 'partner-key']
212
212
  data, status_code, headers = @api_client.call_api(:GET, local_var_path,
213
213
  :header_params => header_params,
214
214
  :query_params => query_params,
@@ -263,7 +263,7 @@ module SibApiV3Sdk
263
263
 
264
264
  # http body (model)
265
265
  post_body = @api_client.object_to_http_body(send_transac_sms)
266
- auth_names = ['api-key']
266
+ auth_names = ['api-key', 'partner-key']
267
267
  data, status_code, headers = @api_client.call_api(:POST, local_var_path,
268
268
  :header_params => header_params,
269
269
  :query_params => query_params,
@@ -61,7 +61,7 @@ module SibApiV3Sdk
61
61
 
62
62
  # http body (model)
63
63
  post_body = @api_client.object_to_http_body(create_webhook)
64
- auth_names = ['api-key']
64
+ auth_names = ['api-key', 'partner-key']
65
65
  data, status_code, headers = @api_client.call_api(:POST, local_var_path,
66
66
  :header_params => header_params,
67
67
  :query_params => query_params,
@@ -116,7 +116,7 @@ module SibApiV3Sdk
116
116
 
117
117
  # http body (model)
118
118
  post_body = nil
119
- auth_names = ['api-key']
119
+ auth_names = ['api-key', 'partner-key']
120
120
  data, status_code, headers = @api_client.call_api(:DELETE, local_var_path,
121
121
  :header_params => header_params,
122
122
  :query_params => query_params,
@@ -170,7 +170,7 @@ module SibApiV3Sdk
170
170
 
171
171
  # http body (model)
172
172
  post_body = nil
173
- auth_names = ['api-key']
173
+ auth_names = ['api-key', 'partner-key']
174
174
  data, status_code, headers = @api_client.call_api(:GET, local_var_path,
175
175
  :header_params => header_params,
176
176
  :query_params => query_params,
@@ -225,7 +225,7 @@ module SibApiV3Sdk
225
225
 
226
226
  # http body (model)
227
227
  post_body = nil
228
- auth_names = ['api-key']
228
+ auth_names = ['api-key', 'partner-key']
229
229
  data, status_code, headers = @api_client.call_api(:GET, local_var_path,
230
230
  :header_params => header_params,
231
231
  :query_params => query_params,
@@ -286,7 +286,7 @@ module SibApiV3Sdk
286
286
 
287
287
  # http body (model)
288
288
  post_body = @api_client.object_to_http_body(update_webhook)
289
- auth_names = ['api-key']
289
+ auth_names = ['api-key', 'partner-key']
290
290
  data, status_code, headers = @api_client.call_api(:PUT, local_var_path,
291
291
  :header_params => header_params,
292
292
  :query_params => query_params,
@@ -203,6 +203,13 @@ module SibApiV3Sdk
203
203
  key: 'api-key',
204
204
  value: api_key_with_prefix('api-key')
205
205
  },
206
+ 'partner-key' =>
207
+ {
208
+ type: 'api_key',
209
+ in: 'header',
210
+ key: 'partner-key',
211
+ value: api_key_with_prefix('partner-key')
212
+ },
206
213
  }
207
214
  end
208
215
  end
@@ -18,7 +18,7 @@ module SibApiV3Sdk
18
18
  # Value of the attribute. Use only if the attribute's category is 'calculated' or 'global'
19
19
  attr_accessor :value
20
20
 
21
- # List of values and labels that the attribute can take. Use only if the attribute's category is \"category\". For example, [{'value':1, 'label':'male'}, {'value':2, 'label':'female'}]
21
+ # List of values and labels that the attribute can take. Use only if the attribute's category is \"category\". For example, `[{\"value\":1, \"label\":\"male\"}, {\"value\":2, \"label\":\"female\"}]`
22
22
  attr_accessor :enumeration
23
23
 
24
24
  # Type of the attribute. Use only if the attribute's category is 'normal', 'category' or 'transactional' ( type 'boolean' is only available if the category is 'normal' attribute, type 'id' is only available if the category is 'transactional' attribute & type 'category' is only available if the category is 'category' attribute )
@@ -18,7 +18,7 @@ module SibApiV3Sdk
18
18
  # Email address of the user. Mandatory if \"sms\" field is not passed in \"attributes\" parameter'
19
19
  attr_accessor :email
20
20
 
21
- # Pass the set of attributes and their values. These attributes must be present in your SendinBlue account. For eg. {'FNAME':'Elly', 'LNAME':'Roger'}
21
+ # Pass the set of attributes and their values. These attributes must be present in your SendinBlue account. For example, `{\"FNAME\":\"Elly\", \"LNAME\":\"Roger\"}`
22
22
  attr_accessor :attributes
23
23
 
24
24
  # Set this field to blacklist the contact for emails (emailBlacklisted = true)
@@ -35,13 +35,13 @@ module SibApiV3Sdk
35
35
  # Sending UTC date-time (YYYY-MM-DDTHH:mm:ss.SSSZ). Prefer to pass your timezone in date-time format for accurate result. If sendAtBestTime is set to true, your campaign will be sent according to the date passed (ignoring the time part).
36
36
  attr_accessor :scheduled_at
37
37
 
38
- # Subject of the campaign
38
+ # Subject of the campaign. Mandatory if abTesting is false. Ignored if abTesting is true.
39
39
  attr_accessor :subject
40
40
 
41
41
  # Email on which the campaign recipients will be able to reply to
42
42
  attr_accessor :reply_to
43
43
 
44
- # To personalize the «To» Field. If you want to include the first name and last name of your recipient, add {FNAME} {LNAME}. These contact attributes must already exist in your SendinBlue account. If input parameter 'params' used please use {{contact.FNAME}} {{contact.LNAME}} for personalization
44
+ # To personalize the «To» Field. If you want to include the first name and last name of your recipient, add `{FNAME} {LNAME}`. These contact attributes must already exist in your SendinBlue account. If input parameter 'params' used please use `{{contact.FNAME}} {{contact.LNAME}}` for personalization
45
45
  attr_accessor :to_field
46
46
 
47
47
  attr_accessor :recipients
@@ -64,12 +64,51 @@ module SibApiV3Sdk
64
64
  # Customize the utm_campaign value. If this field is empty, the campaign name will be used. Only alphanumeric characters and spaces are allowed
65
65
  attr_accessor :utm_campaign
66
66
 
67
- # Pass the set of attributes to customize the type classic campaign. For example, {'FNAME':'Joe', 'LNAME':'Doe'}. Only available if 'type' is 'classic'. It's considered only if campaign is in New Template Language format. The New Template Language is dependent on the values of 'subject', 'htmlContent/htmlUrl', 'sender.name' & 'toField'
67
+ # Pass the set of attributes to customize the type classic campaign. For example, `{\"FNAME\":\"Joe\", \"LNAME:\"Doe\"}`. Only available if 'type' is 'classic'. It's considered only if campaign is in New Template Language format. The New Template Language is dependent on the values of 'subject', 'htmlContent/htmlUrl', 'sender.name' & 'toField'
68
68
  attr_accessor :params
69
69
 
70
70
  # Set this to true if you want to send your campaign at best time.
71
71
  attr_accessor :send_at_best_time
72
72
 
73
+ # Status of A/B Test. abTesting = false means it is disabled, & abTesting = true means it is enabled. 'subjectA', 'subjectB', 'splitRule', 'winnerCriteria' & 'winnerDelay' will be considered when abTesting is set to true. 'subjectA' & 'subjectB' are mandatory together & 'subject' if passed is ignored. Can be set to true only if 'sendAtBestTime' is 'false'. You will be able to set up two subject lines for your campaign and send them to a random sample of your total recipients. Half of the test group will receive version A, and the other half will receive version B
74
+ attr_accessor :ab_testing
75
+
76
+ # Subject A of the campaign. Mandatory if abTesting = true. subjectA & subjectB should have unique value
77
+ attr_accessor :subject_a
78
+
79
+ # Subject B of the campaign. Mandatory if abTesting = true. subjectA & subjectB should have unique value
80
+ attr_accessor :subject_b
81
+
82
+ # Add the size of your test groups. Mandatory if abTesting = true & 'recipients' is passed. We'll send version A and B to a random sample of recipients, and then the winning version to everyone else
83
+ attr_accessor :split_rule
84
+
85
+ # Choose the metrics that will determinate the winning version. Mandatory if 'splitRule' >= 1 and < 50. If splitRule = 50, 'winnerCriteria' is ignored if passed
86
+ attr_accessor :winner_criteria
87
+
88
+ # Choose the duration of the test in hours. Maximum is 7 days, pass 24*7 = 168 hours. The winning version will be sent at the end of the test. Mandatory if 'splitRule' >= 1 and < 50. If splitRule = 50, 'winnerDelay' is ignored if passed
89
+ attr_accessor :winner_delay
90
+
91
+ class EnumAttributeValidator
92
+ attr_reader :datatype
93
+ attr_reader :allowable_values
94
+
95
+ def initialize(datatype, allowable_values)
96
+ @allowable_values = allowable_values.map do |value|
97
+ case datatype.to_s
98
+ when /Integer/i
99
+ value.to_i
100
+ when /Float/i
101
+ value.to_f
102
+ else
103
+ value
104
+ end
105
+ end
106
+ end
107
+
108
+ def valid?(value)
109
+ !value || allowable_values.include?(value)
110
+ end
111
+ end
73
112
 
74
113
  # Attribute mapping from ruby-style variable name to JSON key.
75
114
  def self.attribute_map
@@ -92,7 +131,13 @@ module SibApiV3Sdk
92
131
  :'header' => :'header',
93
132
  :'utm_campaign' => :'utmCampaign',
94
133
  :'params' => :'params',
95
- :'send_at_best_time' => :'sendAtBestTime'
134
+ :'send_at_best_time' => :'sendAtBestTime',
135
+ :'ab_testing' => :'abTesting',
136
+ :'subject_a' => :'subjectA',
137
+ :'subject_b' => :'subjectB',
138
+ :'split_rule' => :'splitRule',
139
+ :'winner_criteria' => :'winnerCriteria',
140
+ :'winner_delay' => :'winnerDelay'
96
141
  }
97
142
  end
98
143
 
@@ -117,7 +162,13 @@ module SibApiV3Sdk
117
162
  :'header' => :'String',
118
163
  :'utm_campaign' => :'String',
119
164
  :'params' => :'Object',
120
- :'send_at_best_time' => :'BOOLEAN'
165
+ :'send_at_best_time' => :'BOOLEAN',
166
+ :'ab_testing' => :'BOOLEAN',
167
+ :'subject_a' => :'String',
168
+ :'subject_b' => :'String',
169
+ :'split_rule' => :'Integer',
170
+ :'winner_criteria' => :'String',
171
+ :'winner_delay' => :'Integer'
121
172
  }
122
173
  end
123
174
 
@@ -209,6 +260,32 @@ module SibApiV3Sdk
209
260
  self.send_at_best_time = false
210
261
  end
211
262
 
263
+ if attributes.has_key?(:'abTesting')
264
+ self.ab_testing = attributes[:'abTesting']
265
+ else
266
+ self.ab_testing = false
267
+ end
268
+
269
+ if attributes.has_key?(:'subjectA')
270
+ self.subject_a = attributes[:'subjectA']
271
+ end
272
+
273
+ if attributes.has_key?(:'subjectB')
274
+ self.subject_b = attributes[:'subjectB']
275
+ end
276
+
277
+ if attributes.has_key?(:'splitRule')
278
+ self.split_rule = attributes[:'splitRule']
279
+ end
280
+
281
+ if attributes.has_key?(:'winnerCriteria')
282
+ self.winner_criteria = attributes[:'winnerCriteria']
283
+ end
284
+
285
+ if attributes.has_key?(:'winnerDelay')
286
+ self.winner_delay = attributes[:'winnerDelay']
287
+ end
288
+
212
289
  end
213
290
 
214
291
  # Show invalid properties with the reasons. Usually used together with valid?
@@ -223,8 +300,20 @@ module SibApiV3Sdk
223
300
  invalid_properties.push("invalid value for 'name', name cannot be nil.")
224
301
  end
225
302
 
226
- if @subject.nil?
227
- invalid_properties.push("invalid value for 'subject', subject cannot be nil.")
303
+ if !@split_rule.nil? && @split_rule > 50
304
+ invalid_properties.push("invalid value for 'split_rule', must be smaller than or equal to 50.")
305
+ end
306
+
307
+ if !@split_rule.nil? && @split_rule < 1
308
+ invalid_properties.push("invalid value for 'split_rule', must be greater than or equal to 1.")
309
+ end
310
+
311
+ if !@winner_delay.nil? && @winner_delay > 168
312
+ invalid_properties.push("invalid value for 'winner_delay', must be smaller than or equal to 168.")
313
+ end
314
+
315
+ if !@winner_delay.nil? && @winner_delay < 1
316
+ invalid_properties.push("invalid value for 'winner_delay', must be greater than or equal to 1.")
228
317
  end
229
318
 
230
319
  return invalid_properties
@@ -235,10 +324,55 @@ module SibApiV3Sdk
235
324
  def valid?
236
325
  return false if @sender.nil?
237
326
  return false if @name.nil?
238
- return false if @subject.nil?
327
+ return false if !@split_rule.nil? && @split_rule > 50
328
+ return false if !@split_rule.nil? && @split_rule < 1
329
+ winner_criteria_validator = EnumAttributeValidator.new('String', ["open", "click"])
330
+ return false unless winner_criteria_validator.valid?(@winner_criteria)
331
+ return false if !@winner_delay.nil? && @winner_delay > 168
332
+ return false if !@winner_delay.nil? && @winner_delay < 1
239
333
  return true
240
334
  end
241
335
 
336
+ # Custom attribute writer method with validation
337
+ # @param [Object] split_rule Value to be assigned
338
+ def split_rule=(split_rule)
339
+
340
+ if !split_rule.nil? && split_rule > 50
341
+ fail ArgumentError, "invalid value for 'split_rule', must be smaller than or equal to 50."
342
+ end
343
+
344
+ if !split_rule.nil? && split_rule < 1
345
+ fail ArgumentError, "invalid value for 'split_rule', must be greater than or equal to 1."
346
+ end
347
+
348
+ @split_rule = split_rule
349
+ end
350
+
351
+ # Custom attribute writer method checking allowed values (enum).
352
+ # @param [Object] winner_criteria Object to be assigned
353
+ def winner_criteria=(winner_criteria)
354
+ validator = EnumAttributeValidator.new('String', ["open", "click"])
355
+ unless validator.valid?(winner_criteria)
356
+ fail ArgumentError, "invalid value for 'winner_criteria', must be one of #{validator.allowable_values}."
357
+ end
358
+ @winner_criteria = winner_criteria
359
+ end
360
+
361
+ # Custom attribute writer method with validation
362
+ # @param [Object] winner_delay Value to be assigned
363
+ def winner_delay=(winner_delay)
364
+
365
+ if !winner_delay.nil? && winner_delay > 168
366
+ fail ArgumentError, "invalid value for 'winner_delay', must be smaller than or equal to 168."
367
+ end
368
+
369
+ if !winner_delay.nil? && winner_delay < 1
370
+ fail ArgumentError, "invalid value for 'winner_delay', must be greater than or equal to 1."
371
+ end
372
+
373
+ @winner_delay = winner_delay
374
+ end
375
+
242
376
  # Checks equality by comparing each attribute.
243
377
  # @param [Object] Object to be compared
244
378
  def ==(o)
@@ -262,7 +396,13 @@ module SibApiV3Sdk
262
396
  header == o.header &&
263
397
  utm_campaign == o.utm_campaign &&
264
398
  params == o.params &&
265
- send_at_best_time == o.send_at_best_time
399
+ send_at_best_time == o.send_at_best_time &&
400
+ ab_testing == o.ab_testing &&
401
+ subject_a == o.subject_a &&
402
+ subject_b == o.subject_b &&
403
+ split_rule == o.split_rule &&
404
+ winner_criteria == o.winner_criteria &&
405
+ winner_delay == o.winner_delay
266
406
  end
267
407
 
268
408
  # @see the `==` method
@@ -274,7 +414,7 @@ module SibApiV3Sdk
274
414
  # Calculates hash code according to all attributes.
275
415
  # @return [Fixnum] Hash code
276
416
  def hash
277
- [tag, sender, name, html_content, html_url, template_id, scheduled_at, subject, reply_to, to_field, recipients, attachment_url, inline_image_activation, mirror_active, footer, header, utm_campaign, params, send_at_best_time].hash
417
+ [tag, sender, name, html_content, html_url, template_id, scheduled_at, subject, reply_to, to_field, recipients, attachment_url, inline_image_activation, mirror_active, footer, header, utm_campaign, params, send_at_best_time, ab_testing, subject_a, subject_b, split_rule, winner_criteria, winner_delay].hash
278
418
  end
279
419
 
280
420
  # Builds the object from hash
@@ -13,7 +13,7 @@ Swagger Codegen version: 2.3.1
13
13
  require 'date'
14
14
 
15
15
  module SibApiV3Sdk
16
- # Sender details including email and name (optional). For example {'name':'xyz' , 'email':'example@abc.com'}
16
+ # Sender details including email and name (optional). For example `{\"name\":\"xyz\", \"email\":\"example@abc.com\"}`
17
17
  class CreateEmailCampaignSender
18
18
  # Sender Name
19
19
  attr_accessor :name
@@ -35,7 +35,7 @@ module SibApiV3Sdk
35
35
  # Email on which campaign recipients will be able to reply to
36
36
  attr_accessor :reply_to
37
37
 
38
- # To personalize the «To» Field. If you want to include the first name and last name of your recipient, add {FNAME} {LNAME}. These contact attributes must already exist in your SendinBlue account. If input parameter 'params' used please use {{contact.FNAME}} {{contact.LNAME}} for personalization
38
+ # To personalize the «To» Field. If you want to include the first name and last name of your recipient, add `{FNAME} {LNAME}`. These contact attributes must already exist in your SendinBlue account. If input parameter 'params' used please use `{{contact.FNAME}} {{contact.LNAME}}` for personalization
39
39
  attr_accessor :to_field
40
40
 
41
41
  # Absolute url of the attachment (no local file). Extension allowed: xlsx, xls, ods, docx, docm, doc, csv, pdf, txt, gif, jpg, jpeg, png, tif, tiff, rtf, bmp, cgm, css, shtml, html, htm, zip, xml, ppt, pptx, tar, ez, ics, mobi, msg, pub and eps
@@ -13,7 +13,7 @@ Swagger Codegen version: 2.3.1
13
13
  require 'date'
14
14
 
15
15
  module SibApiV3Sdk
16
- # Sender details including email and name (optional). For example {'name':'xyz' , 'email':'example@abc.com'}
16
+ # Sender details including email and name (optional). For example `{\"name\":\"xyz\", \"email\":\"example@abc.com\"}`
17
17
  class CreateSmtpTemplateSender
18
18
  # Name of the sender. If not passed, will be set to default
19
19
  attr_accessor :name
@@ -21,7 +21,7 @@ module SibApiV3Sdk
21
21
  # Name of the campaign
22
22
  attr_accessor :name
23
23
 
24
- # Subject of the campaign
24
+ # Subject of the campaign. Only available if `abTesting` flag of the campaign is `false`
25
25
  attr_accessor :subject
26
26
 
27
27
  # Type of campaign
@@ -33,6 +33,27 @@ module SibApiV3Sdk
33
33
  # UTC date-time on which campaign is scheduled (YYYY-MM-DDTHH:mm:ss.SSSZ)
34
34
  attr_accessor :scheduled_at
35
35
 
36
+ # Status of A/B Test for the campaign. abTesting = false means it is disabled, & abTesting = true means it is enabled.
37
+ attr_accessor :ab_testing
38
+
39
+ # Subject A of the ab-test campaign. Only available if `abTesting` flag of the campaign is `true`
40
+ attr_accessor :subject_a
41
+
42
+ # Subject B of the ab-test campaign. Only available if `abTesting` flag of the campaign is `true`
43
+ attr_accessor :subject_b
44
+
45
+ # The size of your ab-test groups. Only available if `abTesting` flag of the campaign is `true`
46
+ attr_accessor :split_rule
47
+
48
+ # Criteria for the winning version. Only available if `abTesting` flag of the campaign is `true`
49
+ attr_accessor :winner_criteria
50
+
51
+ # The duration of the test in hours at the end of which the winning version will be sent. Only available if `abTesting` flag of the campaign is `true`
52
+ attr_accessor :winner_delay
53
+
54
+ # It is true if you have chosen to send your campaign at best time, otherwise it is false
55
+ attr_accessor :send_at_best_time
56
+
36
57
  class EnumAttributeValidator
37
58
  attr_reader :datatype
38
59
  attr_reader :allowable_values
@@ -63,7 +84,14 @@ module SibApiV3Sdk
63
84
  :'subject' => :'subject',
64
85
  :'type' => :'type',
65
86
  :'status' => :'status',
66
- :'scheduled_at' => :'scheduledAt'
87
+ :'scheduled_at' => :'scheduledAt',
88
+ :'ab_testing' => :'abTesting',
89
+ :'subject_a' => :'subjectA',
90
+ :'subject_b' => :'subjectB',
91
+ :'split_rule' => :'splitRule',
92
+ :'winner_criteria' => :'winnerCriteria',
93
+ :'winner_delay' => :'winnerDelay',
94
+ :'send_at_best_time' => :'sendAtBestTime'
67
95
  }
68
96
  end
69
97
 
@@ -75,7 +103,14 @@ module SibApiV3Sdk
75
103
  :'subject' => :'String',
76
104
  :'type' => :'String',
77
105
  :'status' => :'String',
78
- :'scheduled_at' => :'DateTime'
106
+ :'scheduled_at' => :'DateTime',
107
+ :'ab_testing' => :'BOOLEAN',
108
+ :'subject_a' => :'String',
109
+ :'subject_b' => :'String',
110
+ :'split_rule' => :'Integer',
111
+ :'winner_criteria' => :'String',
112
+ :'winner_delay' => :'Integer',
113
+ :'send_at_best_time' => :'BOOLEAN'
79
114
  }
80
115
  end
81
116
 
@@ -111,6 +146,34 @@ module SibApiV3Sdk
111
146
  self.scheduled_at = attributes[:'scheduledAt']
112
147
  end
113
148
 
149
+ if attributes.has_key?(:'abTesting')
150
+ self.ab_testing = attributes[:'abTesting']
151
+ end
152
+
153
+ if attributes.has_key?(:'subjectA')
154
+ self.subject_a = attributes[:'subjectA']
155
+ end
156
+
157
+ if attributes.has_key?(:'subjectB')
158
+ self.subject_b = attributes[:'subjectB']
159
+ end
160
+
161
+ if attributes.has_key?(:'splitRule')
162
+ self.split_rule = attributes[:'splitRule']
163
+ end
164
+
165
+ if attributes.has_key?(:'winnerCriteria')
166
+ self.winner_criteria = attributes[:'winnerCriteria']
167
+ end
168
+
169
+ if attributes.has_key?(:'winnerDelay')
170
+ self.winner_delay = attributes[:'winnerDelay']
171
+ end
172
+
173
+ if attributes.has_key?(:'sendAtBestTime')
174
+ self.send_at_best_time = attributes[:'sendAtBestTime']
175
+ end
176
+
114
177
  end
115
178
 
116
179
  # Show invalid properties with the reasons. Usually used together with valid?
@@ -125,10 +188,6 @@ module SibApiV3Sdk
125
188
  invalid_properties.push("invalid value for 'name', name cannot be nil.")
126
189
  end
127
190
 
128
- if @subject.nil?
129
- invalid_properties.push("invalid value for 'subject', subject cannot be nil.")
130
- end
131
-
132
191
  if @type.nil?
133
192
  invalid_properties.push("invalid value for 'type', type cannot be nil.")
134
193
  end
@@ -145,7 +204,6 @@ module SibApiV3Sdk
145
204
  def valid?
146
205
  return false if @id.nil?
147
206
  return false if @name.nil?
148
- return false if @subject.nil?
149
207
  return false if @type.nil?
150
208
  type_validator = EnumAttributeValidator.new('String', ["classic", "trigger"])
151
209
  return false unless type_validator.valid?(@type)
@@ -185,7 +243,14 @@ module SibApiV3Sdk
185
243
  subject == o.subject &&
186
244
  type == o.type &&
187
245
  status == o.status &&
188
- scheduled_at == o.scheduled_at
246
+ scheduled_at == o.scheduled_at &&
247
+ ab_testing == o.ab_testing &&
248
+ subject_a == o.subject_a &&
249
+ subject_b == o.subject_b &&
250
+ split_rule == o.split_rule &&
251
+ winner_criteria == o.winner_criteria &&
252
+ winner_delay == o.winner_delay &&
253
+ send_at_best_time == o.send_at_best_time
189
254
  end
190
255
 
191
256
  # @see the `==` method
@@ -197,7 +262,7 @@ module SibApiV3Sdk
197
262
  # Calculates hash code according to all attributes.
198
263
  # @return [Fixnum] Hash code
199
264
  def hash
200
- [id, name, subject, type, status, scheduled_at].hash
265
+ [id, name, subject, type, status, scheduled_at, ab_testing, subject_a, subject_b, split_rule, winner_criteria, winner_delay, send_at_best_time].hash
201
266
  end
202
267
 
203
268
  # Builds the object from hash