mailslurp_client 15.9.0 → 15.12.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (88) hide show
  1. checksums.yaml +4 -4
  2. data/lib/mailslurp_client/api/api_user_controller_api.rb +74 -0
  3. data/lib/mailslurp_client/api/attachment_controller_api.rb +4 -4
  4. data/lib/mailslurp_client/api/email_controller_api.rb +68 -3
  5. data/lib/mailslurp_client/api/inbox_controller_api.rb +138 -0
  6. data/lib/mailslurp_client/api/missed_email_controller_api.rb +56 -0
  7. data/lib/mailslurp_client/api/phone_controller_api.rb +487 -0
  8. data/lib/mailslurp_client/api/sent_emails_controller_api.rb +73 -0
  9. data/lib/mailslurp_client/api/sms_controller_api.rb +286 -0
  10. data/lib/mailslurp_client/api/template_controller_api.rb +124 -0
  11. data/lib/mailslurp_client/api/wait_for_controller_api.rb +64 -0
  12. data/lib/mailslurp_client/api/webhook_controller_api.rb +2 -2
  13. data/lib/mailslurp_client/models/abstract_webhook_payload.rb +2 -2
  14. data/lib/mailslurp_client/models/alias_projection.rb +31 -31
  15. data/lib/mailslurp_client/models/attachment_entity.rb +10 -1
  16. data/lib/mailslurp_client/models/attachment_projection.rb +14 -14
  17. data/lib/mailslurp_client/models/bounce_projection.rb +31 -4
  18. data/lib/mailslurp_client/models/{bounce_recipient.rb → bounce_recipient_projection.rb} +35 -36
  19. data/lib/mailslurp_client/models/bounced_email_dto.rb +19 -1
  20. data/lib/mailslurp_client/models/bounced_recipient_dto.rb +37 -1
  21. data/lib/mailslurp_client/models/contact_projection.rb +18 -13
  22. data/lib/mailslurp_client/models/create_emergency_address_options.rb +324 -0
  23. data/lib/mailslurp_client/models/create_webhook_options.rb +2 -2
  24. data/lib/mailslurp_client/models/email_html_dto.rb +215 -0
  25. data/lib/mailslurp_client/models/email_preview.rb +5 -0
  26. data/lib/mailslurp_client/models/email_projection.rb +29 -19
  27. data/lib/mailslurp_client/models/emergency_address.rb +408 -0
  28. data/lib/mailslurp_client/models/emergency_address_dto.rb +273 -0
  29. data/lib/mailslurp_client/models/empty_response_dto.rb +206 -0
  30. data/lib/mailslurp_client/models/expired_inbox_record_projection.rb +15 -15
  31. data/lib/mailslurp_client/models/inbox_by_name_result.rb +221 -0
  32. data/lib/mailslurp_client/models/inbox_dto.rb +11 -1
  33. data/lib/mailslurp_client/models/inbox_preview.rb +5 -0
  34. data/lib/mailslurp_client/models/missed_email.rb +37 -1
  35. data/lib/mailslurp_client/models/organization_inbox_projection.rb +5 -0
  36. data/lib/mailslurp_client/models/page_alias.rb +22 -22
  37. data/lib/mailslurp_client/models/page_attachment_entity.rb +22 -22
  38. data/lib/mailslurp_client/models/page_bounced_email.rb +22 -22
  39. data/lib/mailslurp_client/models/page_bounced_recipients.rb +23 -23
  40. data/lib/mailslurp_client/models/page_contact_projection.rb +22 -22
  41. data/lib/mailslurp_client/models/page_email_preview.rb +22 -22
  42. data/lib/mailslurp_client/models/page_email_projection.rb +22 -22
  43. data/lib/mailslurp_client/models/page_email_validation_request.rb +22 -22
  44. data/lib/mailslurp_client/models/page_expired_inbox_record_projection.rb +22 -22
  45. data/lib/mailslurp_client/models/page_group_projection.rb +22 -22
  46. data/lib/mailslurp_client/models/page_inbox_forwarder_dto.rb +22 -22
  47. data/lib/mailslurp_client/models/page_inbox_projection.rb +22 -22
  48. data/lib/mailslurp_client/models/page_inbox_ruleset_dto.rb +22 -22
  49. data/lib/mailslurp_client/models/page_missed_email_projection.rb +22 -22
  50. data/lib/mailslurp_client/models/page_organization_inbox_projection.rb +22 -22
  51. data/lib/mailslurp_client/models/page_phone_number_projection.rb +308 -0
  52. data/lib/mailslurp_client/models/page_sent_email_projection.rb +16 -16
  53. data/lib/mailslurp_client/models/page_sent_email_with_queue_projection.rb +344 -0
  54. data/lib/mailslurp_client/models/page_sms_projection.rb +308 -0
  55. data/lib/mailslurp_client/models/page_template_projection.rb +22 -22
  56. data/lib/mailslurp_client/models/page_thread_projection.rb +22 -22
  57. data/lib/mailslurp_client/models/page_tracking_pixel_projection.rb +22 -22
  58. data/lib/mailslurp_client/models/page_unknown_missed_email_projection.rb +22 -22
  59. data/lib/mailslurp_client/models/page_webhook_projection.rb +22 -22
  60. data/lib/mailslurp_client/models/page_webhook_result.rb +22 -22
  61. data/lib/mailslurp_client/models/phone_number_dto.rb +347 -0
  62. data/lib/mailslurp_client/models/phone_number_projection.rb +302 -0
  63. data/lib/mailslurp_client/models/phone_plan_dto.rb +287 -0
  64. data/lib/mailslurp_client/models/send_with_queue_result.rb +318 -0
  65. data/lib/mailslurp_client/models/sent_email_projection.rb +18 -13
  66. data/lib/mailslurp_client/models/sms_match_option.rb +289 -0
  67. data/lib/mailslurp_client/models/sms_message.rb +318 -0
  68. data/lib/mailslurp_client/models/sms_preview.rb +267 -0
  69. data/lib/mailslurp_client/models/sms_projection.rb +282 -0
  70. data/lib/mailslurp_client/models/template_preview.rb +211 -0
  71. data/lib/mailslurp_client/models/template_projection.rb +18 -18
  72. data/lib/mailslurp_client/models/thread_projection.rb +36 -36
  73. data/lib/mailslurp_client/models/tracking_pixel_projection.rb +19 -19
  74. data/lib/mailslurp_client/models/user_info_dto.rb +334 -0
  75. data/lib/mailslurp_client/models/wait_for_sms_conditions.rb +371 -0
  76. data/lib/mailslurp_client/models/webhook_bounce_payload.rb +2 -2
  77. data/lib/mailslurp_client/models/webhook_bounce_recipient_payload.rb +2 -2
  78. data/lib/mailslurp_client/models/webhook_dto.rb +2 -2
  79. data/lib/mailslurp_client/models/webhook_email_opened_payload.rb +2 -2
  80. data/lib/mailslurp_client/models/webhook_email_read_payload.rb +2 -2
  81. data/lib/mailslurp_client/models/webhook_new_attachment_payload.rb +2 -2
  82. data/lib/mailslurp_client/models/webhook_new_contact_payload.rb +7 -2
  83. data/lib/mailslurp_client/models/webhook_new_email_payload.rb +2 -2
  84. data/lib/mailslurp_client/models/webhook_projection.rb +2 -2
  85. data/lib/mailslurp_client/models/webhook_result_dto.rb +7 -2
  86. data/lib/mailslurp_client/version.rb +1 -1
  87. data/lib/mailslurp_client.rb +24 -1
  88. metadata +26 -3
@@ -0,0 +1,371 @@
1
+ =begin
2
+ #MailSlurp API
3
+
4
+ #MailSlurp is an API for sending and receiving emails from dynamically allocated email addresses. It's designed for developers and QA teams to test applications, process inbound emails, send templated notifications, attachments, and more. ## Resources - [Homepage](https://www.mailslurp.com) - Get an [API KEY](https://app.mailslurp.com/sign-up/) - Generated [SDK Clients](https://docs.mailslurp.com/) - [Examples](https://github.com/mailslurp/examples) repository
5
+
6
+ The version of the OpenAPI document: 6.5.2
7
+ Contact: contact@mailslurp.dev
8
+ Generated by: https://openapi-generator.tech
9
+ OpenAPI Generator version: 4.3.1
10
+
11
+ =end
12
+
13
+ require 'date'
14
+
15
+ module MailSlurpClient
16
+ # Conditions to apply to emails that you are waiting for
17
+ class WaitForSmsConditions
18
+ # ID of phone number to search within and apply conditions to. Essentially filtering the SMS found to give a count.
19
+ attr_accessor :phone_number_id
20
+
21
+ # Limit results
22
+ attr_accessor :limit
23
+
24
+ # Number of results that should match conditions. Either exactly or at least this amount based on the `countType`. If count condition is not met and the timeout has not been reached the `waitFor` method will retry the operation.
25
+ attr_accessor :count
26
+
27
+ # Max time in milliseconds to wait between retries if a `timeout` is specified.
28
+ attr_accessor :delay_timeout
29
+
30
+ # Max time in milliseconds to retry the `waitFor` operation until conditions are met.
31
+ attr_accessor :timeout
32
+
33
+ # Apply conditions only to **unread** SMS. All SMS messages begin with `read=false`. An SMS is marked `read=true` when an `SMS` has been returned to the user at least once. For example you have called `getSms` or `waitForSms` etc., or you have viewed the SMS in the dashboard.
34
+ attr_accessor :unread_only
35
+
36
+ # How result size should be compared with the expected size. Exactly or at-least matching result?
37
+ attr_accessor :count_type
38
+
39
+ # Conditions that should be matched for an SMS to qualify for results. Each condition will be applied in order to each SMS within a phone number to filter a result list of matching SMSs you are waiting for.
40
+ attr_accessor :matches
41
+
42
+ # Direction to sort matching SMSs by created time
43
+ attr_accessor :sort_direction
44
+
45
+ # ISO Date Time earliest time of SMS to consider. Filter for matching SMSs that were received after this date
46
+ attr_accessor :since
47
+
48
+ # ISO Date Time latest time of SMS to consider. Filter for matching SMSs that were received before this date
49
+ attr_accessor :before
50
+
51
+ class EnumAttributeValidator
52
+ attr_reader :datatype
53
+ attr_reader :allowable_values
54
+
55
+ def initialize(datatype, allowable_values)
56
+ @allowable_values = allowable_values.map do |value|
57
+ case datatype.to_s
58
+ when /Integer/i
59
+ value.to_i
60
+ when /Float/i
61
+ value.to_f
62
+ else
63
+ value
64
+ end
65
+ end
66
+ end
67
+
68
+ def valid?(value)
69
+ !value || allowable_values.include?(value)
70
+ end
71
+ end
72
+
73
+ # Attribute mapping from ruby-style variable name to JSON key.
74
+ def self.attribute_map
75
+ {
76
+ :'phone_number_id' => :'phoneNumberId',
77
+ :'limit' => :'limit',
78
+ :'count' => :'count',
79
+ :'delay_timeout' => :'delayTimeout',
80
+ :'timeout' => :'timeout',
81
+ :'unread_only' => :'unreadOnly',
82
+ :'count_type' => :'countType',
83
+ :'matches' => :'matches',
84
+ :'sort_direction' => :'sortDirection',
85
+ :'since' => :'since',
86
+ :'before' => :'before'
87
+ }
88
+ end
89
+
90
+ # Attribute type mapping.
91
+ def self.openapi_types
92
+ {
93
+ :'phone_number_id' => :'String',
94
+ :'limit' => :'Integer',
95
+ :'count' => :'Integer',
96
+ :'delay_timeout' => :'Integer',
97
+ :'timeout' => :'Integer',
98
+ :'unread_only' => :'Boolean',
99
+ :'count_type' => :'String',
100
+ :'matches' => :'Array<SmsMatchOption>',
101
+ :'sort_direction' => :'String',
102
+ :'since' => :'DateTime',
103
+ :'before' => :'DateTime'
104
+ }
105
+ end
106
+
107
+ # List of attributes with nullable: true
108
+ def self.openapi_nullable
109
+ Set.new([
110
+ ])
111
+ end
112
+
113
+ # Initializes the object
114
+ # @param [Hash] attributes Model attributes in the form of hash
115
+ def initialize(attributes = {})
116
+ if (!attributes.is_a?(Hash))
117
+ fail ArgumentError, "The input argument (attributes) must be a hash in `MailSlurpClient::WaitForSmsConditions` initialize method"
118
+ end
119
+
120
+ # check to see if the attribute exists and convert string to symbol for hash key
121
+ attributes = attributes.each_with_object({}) { |(k, v), h|
122
+ if (!self.class.attribute_map.key?(k.to_sym))
123
+ fail ArgumentError, "`#{k}` is not a valid attribute in `MailSlurpClient::WaitForSmsConditions`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect
124
+ end
125
+ h[k.to_sym] = v
126
+ }
127
+
128
+ if attributes.key?(:'phone_number_id')
129
+ self.phone_number_id = attributes[:'phone_number_id']
130
+ end
131
+
132
+ if attributes.key?(:'limit')
133
+ self.limit = attributes[:'limit']
134
+ end
135
+
136
+ if attributes.key?(:'count')
137
+ self.count = attributes[:'count']
138
+ end
139
+
140
+ if attributes.key?(:'delay_timeout')
141
+ self.delay_timeout = attributes[:'delay_timeout']
142
+ end
143
+
144
+ if attributes.key?(:'timeout')
145
+ self.timeout = attributes[:'timeout']
146
+ end
147
+
148
+ if attributes.key?(:'unread_only')
149
+ self.unread_only = attributes[:'unread_only']
150
+ end
151
+
152
+ if attributes.key?(:'count_type')
153
+ self.count_type = attributes[:'count_type']
154
+ end
155
+
156
+ if attributes.key?(:'matches')
157
+ if (value = attributes[:'matches']).is_a?(Array)
158
+ self.matches = value
159
+ end
160
+ end
161
+
162
+ if attributes.key?(:'sort_direction')
163
+ self.sort_direction = attributes[:'sort_direction']
164
+ end
165
+
166
+ if attributes.key?(:'since')
167
+ self.since = attributes[:'since']
168
+ end
169
+
170
+ if attributes.key?(:'before')
171
+ self.before = attributes[:'before']
172
+ end
173
+ end
174
+
175
+ # Show invalid properties with the reasons. Usually used together with valid?
176
+ # @return Array for valid properties with the reasons
177
+ def list_invalid_properties
178
+ invalid_properties = Array.new
179
+ if @phone_number_id.nil?
180
+ invalid_properties.push('invalid value for "phone_number_id", phone_number_id cannot be nil.')
181
+ end
182
+
183
+ if @count.nil?
184
+ invalid_properties.push('invalid value for "count", count cannot be nil.')
185
+ end
186
+
187
+ if @timeout.nil?
188
+ invalid_properties.push('invalid value for "timeout", timeout cannot be nil.')
189
+ end
190
+
191
+ invalid_properties
192
+ end
193
+
194
+ # Check to see if the all the properties in the model are valid
195
+ # @return true if the model is valid
196
+ def valid?
197
+ return false if @phone_number_id.nil?
198
+ return false if @count.nil?
199
+ return false if @timeout.nil?
200
+ count_type_validator = EnumAttributeValidator.new('String', ["EXACTLY", "ATLEAST"])
201
+ return false unless count_type_validator.valid?(@count_type)
202
+ sort_direction_validator = EnumAttributeValidator.new('String', ["ASC", "DESC"])
203
+ return false unless sort_direction_validator.valid?(@sort_direction)
204
+ true
205
+ end
206
+
207
+ # Custom attribute writer method checking allowed values (enum).
208
+ # @param [Object] count_type Object to be assigned
209
+ def count_type=(count_type)
210
+ validator = EnumAttributeValidator.new('String', ["EXACTLY", "ATLEAST"])
211
+ unless validator.valid?(count_type)
212
+ fail ArgumentError, "invalid value for \"count_type\", must be one of #{validator.allowable_values}."
213
+ end
214
+ @count_type = count_type
215
+ end
216
+
217
+ # Custom attribute writer method checking allowed values (enum).
218
+ # @param [Object] sort_direction Object to be assigned
219
+ def sort_direction=(sort_direction)
220
+ validator = EnumAttributeValidator.new('String', ["ASC", "DESC"])
221
+ unless validator.valid?(sort_direction)
222
+ fail ArgumentError, "invalid value for \"sort_direction\", must be one of #{validator.allowable_values}."
223
+ end
224
+ @sort_direction = sort_direction
225
+ end
226
+
227
+ # Checks equality by comparing each attribute.
228
+ # @param [Object] Object to be compared
229
+ def ==(o)
230
+ return true if self.equal?(o)
231
+ self.class == o.class &&
232
+ phone_number_id == o.phone_number_id &&
233
+ limit == o.limit &&
234
+ count == o.count &&
235
+ delay_timeout == o.delay_timeout &&
236
+ timeout == o.timeout &&
237
+ unread_only == o.unread_only &&
238
+ count_type == o.count_type &&
239
+ matches == o.matches &&
240
+ sort_direction == o.sort_direction &&
241
+ since == o.since &&
242
+ before == o.before
243
+ end
244
+
245
+ # @see the `==` method
246
+ # @param [Object] Object to be compared
247
+ def eql?(o)
248
+ self == o
249
+ end
250
+
251
+ # Calculates hash code according to all attributes.
252
+ # @return [Integer] Hash code
253
+ def hash
254
+ [phone_number_id, limit, count, delay_timeout, timeout, unread_only, count_type, matches, sort_direction, since, before].hash
255
+ end
256
+
257
+ # Builds the object from hash
258
+ # @param [Hash] attributes Model attributes in the form of hash
259
+ # @return [Object] Returns the model itself
260
+ def self.build_from_hash(attributes)
261
+ new.build_from_hash(attributes)
262
+ end
263
+
264
+ # Builds the object from hash
265
+ # @param [Hash] attributes Model attributes in the form of hash
266
+ # @return [Object] Returns the model itself
267
+ def build_from_hash(attributes)
268
+ return nil unless attributes.is_a?(Hash)
269
+ self.class.openapi_types.each_pair do |key, type|
270
+ if type =~ /\AArray<(.*)>/i
271
+ # check to ensure the input is an array given that the attribute
272
+ # is documented as an array but the input is not
273
+ if attributes[self.class.attribute_map[key]].is_a?(Array)
274
+ self.send("#{key}=", attributes[self.class.attribute_map[key]].map { |v| _deserialize($1, v) })
275
+ end
276
+ elsif !attributes[self.class.attribute_map[key]].nil?
277
+ self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]]))
278
+ end # or else data not found in attributes(hash), not an issue as the data can be optional
279
+ end
280
+
281
+ self
282
+ end
283
+
284
+ # Deserializes the data based on type
285
+ # @param string type Data type
286
+ # @param string value Value to be deserialized
287
+ # @return [Object] Deserialized data
288
+ def _deserialize(type, value)
289
+ case type.to_sym
290
+ when :DateTime
291
+ DateTime.parse(value)
292
+ when :Date
293
+ Date.parse(value)
294
+ when :String
295
+ value.to_s
296
+ when :Integer
297
+ value.to_i
298
+ when :Float
299
+ value.to_f
300
+ when :Boolean
301
+ if value.to_s =~ /\A(true|t|yes|y|1)\z/i
302
+ true
303
+ else
304
+ false
305
+ end
306
+ when :Object
307
+ # generic object (usually a Hash), return directly
308
+ value
309
+ when /\AArray<(?<inner_type>.+)>\z/
310
+ inner_type = Regexp.last_match[:inner_type]
311
+ value.map { |v| _deserialize(inner_type, v) }
312
+ when /\AHash<(?<k_type>.+?), (?<v_type>.+)>\z/
313
+ k_type = Regexp.last_match[:k_type]
314
+ v_type = Regexp.last_match[:v_type]
315
+ {}.tap do |hash|
316
+ value.each do |k, v|
317
+ hash[_deserialize(k_type, k)] = _deserialize(v_type, v)
318
+ end
319
+ end
320
+ else # model
321
+ MailSlurpClient.const_get(type).build_from_hash(value)
322
+ end
323
+ end
324
+
325
+ # Returns the string representation of the object
326
+ # @return [String] String presentation of the object
327
+ def to_s
328
+ to_hash.to_s
329
+ end
330
+
331
+ # to_body is an alias to to_hash (backward compatibility)
332
+ # @return [Hash] Returns the object in the form of hash
333
+ def to_body
334
+ to_hash
335
+ end
336
+
337
+ # Returns the object in the form of hash
338
+ # @return [Hash] Returns the object in the form of hash
339
+ def to_hash
340
+ hash = {}
341
+ self.class.attribute_map.each_pair do |attr, param|
342
+ value = self.send(attr)
343
+ if value.nil?
344
+ is_nullable = self.class.openapi_nullable.include?(attr)
345
+ next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}"))
346
+ end
347
+
348
+ hash[param] = _to_hash(value)
349
+ end
350
+ hash
351
+ end
352
+
353
+ # Outputs non-array value in the form of hash
354
+ # For object, use to_hash. Otherwise, just return the value
355
+ # @param [Object] value Any valid value
356
+ # @return [Hash] Returns the value in the form of hash
357
+ def _to_hash(value)
358
+ if value.is_a?(Array)
359
+ value.compact.map { |v| _to_hash(v) }
360
+ elsif value.is_a?(Hash)
361
+ {}.tap do |hash|
362
+ value.each { |k, v| hash[k] = _to_hash(v) }
363
+ end
364
+ elsif value.respond_to? :to_hash
365
+ value.to_hash
366
+ else
367
+ value
368
+ end
369
+ end
370
+ end
371
+ end
@@ -178,7 +178,7 @@ module MailSlurpClient
178
178
  return false if @message_id.nil?
179
179
  return false if @webhook_id.nil?
180
180
  return false if @event_name.nil?
181
- event_name_validator = EnumAttributeValidator.new('String', ["EMAIL_RECEIVED", "NEW_EMAIL", "NEW_CONTACT", "NEW_ATTACHMENT", "EMAIL_OPENED", "EMAIL_READ", "BOUNCE", "BOUNCE_RECIPIENT"])
181
+ event_name_validator = EnumAttributeValidator.new('String', ["EMAIL_RECEIVED", "NEW_EMAIL", "NEW_CONTACT", "NEW_ATTACHMENT", "EMAIL_OPENED", "EMAIL_READ", "BOUNCE", "BOUNCE_RECIPIENT", "NEW_SMS"])
182
182
  return false unless event_name_validator.valid?(@event_name)
183
183
  return false if @bounce_id.nil?
184
184
  return false if @sender.nil?
@@ -188,7 +188,7 @@ module MailSlurpClient
188
188
  # Custom attribute writer method checking allowed values (enum).
189
189
  # @param [Object] event_name Object to be assigned
190
190
  def event_name=(event_name)
191
- validator = EnumAttributeValidator.new('String', ["EMAIL_RECEIVED", "NEW_EMAIL", "NEW_CONTACT", "NEW_ATTACHMENT", "EMAIL_OPENED", "EMAIL_READ", "BOUNCE", "BOUNCE_RECIPIENT"])
191
+ validator = EnumAttributeValidator.new('String', ["EMAIL_RECEIVED", "NEW_EMAIL", "NEW_CONTACT", "NEW_ATTACHMENT", "EMAIL_OPENED", "EMAIL_READ", "BOUNCE", "BOUNCE_RECIPIENT", "NEW_SMS"])
192
192
  unless validator.valid?(event_name)
193
193
  fail ArgumentError, "invalid value for \"event_name\", must be one of #{validator.allowable_values}."
194
194
  end
@@ -145,7 +145,7 @@ module MailSlurpClient
145
145
  return false if @message_id.nil?
146
146
  return false if @webhook_id.nil?
147
147
  return false if @event_name.nil?
148
- event_name_validator = EnumAttributeValidator.new('String', ["EMAIL_RECEIVED", "NEW_EMAIL", "NEW_CONTACT", "NEW_ATTACHMENT", "EMAIL_OPENED", "EMAIL_READ", "BOUNCE", "BOUNCE_RECIPIENT"])
148
+ event_name_validator = EnumAttributeValidator.new('String', ["EMAIL_RECEIVED", "NEW_EMAIL", "NEW_CONTACT", "NEW_ATTACHMENT", "EMAIL_OPENED", "EMAIL_READ", "BOUNCE", "BOUNCE_RECIPIENT", "NEW_SMS"])
149
149
  return false unless event_name_validator.valid?(@event_name)
150
150
  return false if @recipient.nil?
151
151
  true
@@ -154,7 +154,7 @@ module MailSlurpClient
154
154
  # Custom attribute writer method checking allowed values (enum).
155
155
  # @param [Object] event_name Object to be assigned
156
156
  def event_name=(event_name)
157
- validator = EnumAttributeValidator.new('String', ["EMAIL_RECEIVED", "NEW_EMAIL", "NEW_CONTACT", "NEW_ATTACHMENT", "EMAIL_OPENED", "EMAIL_READ", "BOUNCE", "BOUNCE_RECIPIENT"])
157
+ validator = EnumAttributeValidator.new('String', ["EMAIL_RECEIVED", "NEW_EMAIL", "NEW_CONTACT", "NEW_ATTACHMENT", "EMAIL_OPENED", "EMAIL_READ", "BOUNCE", "BOUNCE_RECIPIENT", "NEW_SMS"])
158
158
  unless validator.valid?(event_name)
159
159
  fail ArgumentError, "invalid value for \"event_name\", must be one of #{validator.allowable_values}."
160
160
  end
@@ -220,7 +220,7 @@ module MailSlurpClient
220
220
  return false if @payload_json_schema.nil?
221
221
  return false if @created_at.nil?
222
222
  return false if @updated_at.nil?
223
- event_name_validator = EnumAttributeValidator.new('String', ["EMAIL_RECEIVED", "NEW_EMAIL", "NEW_CONTACT", "NEW_ATTACHMENT", "EMAIL_OPENED", "EMAIL_READ", "BOUNCE", "BOUNCE_RECIPIENT"])
223
+ event_name_validator = EnumAttributeValidator.new('String', ["EMAIL_RECEIVED", "NEW_EMAIL", "NEW_CONTACT", "NEW_ATTACHMENT", "EMAIL_OPENED", "EMAIL_READ", "BOUNCE", "BOUNCE_RECIPIENT", "NEW_SMS"])
224
224
  return false unless event_name_validator.valid?(@event_name)
225
225
  true
226
226
  end
@@ -238,7 +238,7 @@ module MailSlurpClient
238
238
  # Custom attribute writer method checking allowed values (enum).
239
239
  # @param [Object] event_name Object to be assigned
240
240
  def event_name=(event_name)
241
- validator = EnumAttributeValidator.new('String', ["EMAIL_RECEIVED", "NEW_EMAIL", "NEW_CONTACT", "NEW_ATTACHMENT", "EMAIL_OPENED", "EMAIL_READ", "BOUNCE", "BOUNCE_RECIPIENT"])
241
+ validator = EnumAttributeValidator.new('String', ["EMAIL_RECEIVED", "NEW_EMAIL", "NEW_CONTACT", "NEW_ATTACHMENT", "EMAIL_OPENED", "EMAIL_READ", "BOUNCE", "BOUNCE_RECIPIENT", "NEW_SMS"])
242
242
  unless validator.valid?(event_name)
243
243
  fail ArgumentError, "invalid value for \"event_name\", must be one of #{validator.allowable_values}."
244
244
  end
@@ -197,7 +197,7 @@ module MailSlurpClient
197
197
  return false if @message_id.nil?
198
198
  return false if @webhook_id.nil?
199
199
  return false if @event_name.nil?
200
- event_name_validator = EnumAttributeValidator.new('String', ["EMAIL_RECEIVED", "NEW_EMAIL", "NEW_CONTACT", "NEW_ATTACHMENT", "EMAIL_OPENED", "EMAIL_READ", "BOUNCE", "BOUNCE_RECIPIENT"])
200
+ event_name_validator = EnumAttributeValidator.new('String', ["EMAIL_RECEIVED", "NEW_EMAIL", "NEW_CONTACT", "NEW_ATTACHMENT", "EMAIL_OPENED", "EMAIL_READ", "BOUNCE", "BOUNCE_RECIPIENT", "NEW_SMS"])
201
201
  return false unless event_name_validator.valid?(@event_name)
202
202
  return false if @inbox_id.nil?
203
203
  return false if @pixel_id.nil?
@@ -210,7 +210,7 @@ module MailSlurpClient
210
210
  # Custom attribute writer method checking allowed values (enum).
211
211
  # @param [Object] event_name Object to be assigned
212
212
  def event_name=(event_name)
213
- validator = EnumAttributeValidator.new('String', ["EMAIL_RECEIVED", "NEW_EMAIL", "NEW_CONTACT", "NEW_ATTACHMENT", "EMAIL_OPENED", "EMAIL_READ", "BOUNCE", "BOUNCE_RECIPIENT"])
213
+ validator = EnumAttributeValidator.new('String', ["EMAIL_RECEIVED", "NEW_EMAIL", "NEW_CONTACT", "NEW_ATTACHMENT", "EMAIL_OPENED", "EMAIL_READ", "BOUNCE", "BOUNCE_RECIPIENT", "NEW_SMS"])
214
214
  unless validator.valid?(event_name)
215
215
  fail ArgumentError, "invalid value for \"event_name\", must be one of #{validator.allowable_values}."
216
216
  end
@@ -184,7 +184,7 @@ module MailSlurpClient
184
184
  return false if @message_id.nil?
185
185
  return false if @webhook_id.nil?
186
186
  return false if @event_name.nil?
187
- event_name_validator = EnumAttributeValidator.new('String', ["EMAIL_RECEIVED", "NEW_EMAIL", "NEW_CONTACT", "NEW_ATTACHMENT", "EMAIL_OPENED", "EMAIL_READ", "BOUNCE", "BOUNCE_RECIPIENT"])
187
+ event_name_validator = EnumAttributeValidator.new('String', ["EMAIL_RECEIVED", "NEW_EMAIL", "NEW_CONTACT", "NEW_ATTACHMENT", "EMAIL_OPENED", "EMAIL_READ", "BOUNCE", "BOUNCE_RECIPIENT", "NEW_SMS"])
188
188
  return false unless event_name_validator.valid?(@event_name)
189
189
  return false if @email_id.nil?
190
190
  return false if @inbox_id.nil?
@@ -196,7 +196,7 @@ module MailSlurpClient
196
196
  # Custom attribute writer method checking allowed values (enum).
197
197
  # @param [Object] event_name Object to be assigned
198
198
  def event_name=(event_name)
199
- validator = EnumAttributeValidator.new('String', ["EMAIL_RECEIVED", "NEW_EMAIL", "NEW_CONTACT", "NEW_ATTACHMENT", "EMAIL_OPENED", "EMAIL_READ", "BOUNCE", "BOUNCE_RECIPIENT"])
199
+ validator = EnumAttributeValidator.new('String', ["EMAIL_RECEIVED", "NEW_EMAIL", "NEW_CONTACT", "NEW_ATTACHMENT", "EMAIL_OPENED", "EMAIL_READ", "BOUNCE", "BOUNCE_RECIPIENT", "NEW_SMS"])
200
200
  unless validator.valid?(event_name)
201
201
  fail ArgumentError, "invalid value for \"event_name\", must be one of #{validator.allowable_values}."
202
202
  end
@@ -184,7 +184,7 @@ module MailSlurpClient
184
184
  return false if @message_id.nil?
185
185
  return false if @webhook_id.nil?
186
186
  return false if @event_name.nil?
187
- event_name_validator = EnumAttributeValidator.new('String', ["EMAIL_RECEIVED", "NEW_EMAIL", "NEW_CONTACT", "NEW_ATTACHMENT", "EMAIL_OPENED", "EMAIL_READ", "BOUNCE", "BOUNCE_RECIPIENT"])
187
+ event_name_validator = EnumAttributeValidator.new('String', ["EMAIL_RECEIVED", "NEW_EMAIL", "NEW_CONTACT", "NEW_ATTACHMENT", "EMAIL_OPENED", "EMAIL_READ", "BOUNCE", "BOUNCE_RECIPIENT", "NEW_SMS"])
188
188
  return false unless event_name_validator.valid?(@event_name)
189
189
  return false if @attachment_id.nil?
190
190
  return false if @name.nil?
@@ -196,7 +196,7 @@ module MailSlurpClient
196
196
  # Custom attribute writer method checking allowed values (enum).
197
197
  # @param [Object] event_name Object to be assigned
198
198
  def event_name=(event_name)
199
- validator = EnumAttributeValidator.new('String', ["EMAIL_RECEIVED", "NEW_EMAIL", "NEW_CONTACT", "NEW_ATTACHMENT", "EMAIL_OPENED", "EMAIL_READ", "BOUNCE", "BOUNCE_RECIPIENT"])
199
+ validator = EnumAttributeValidator.new('String', ["EMAIL_RECEIVED", "NEW_EMAIL", "NEW_CONTACT", "NEW_ATTACHMENT", "EMAIL_OPENED", "EMAIL_READ", "BOUNCE", "BOUNCE_RECIPIENT", "NEW_SMS"])
200
200
  unless validator.valid?(event_name)
201
201
  fail ArgumentError, "invalid value for \"event_name\", must be one of #{validator.allowable_values}."
202
202
  end
@@ -227,6 +227,10 @@ module MailSlurpClient
227
227
  invalid_properties.push('invalid value for "tags", tags cannot be nil.')
228
228
  end
229
229
 
230
+ if @opt_out.nil?
231
+ invalid_properties.push('invalid value for "opt_out", opt_out cannot be nil.')
232
+ end
233
+
230
234
  if @created_at.nil?
231
235
  invalid_properties.push('invalid value for "created_at", created_at cannot be nil.')
232
236
  end
@@ -240,11 +244,12 @@ module MailSlurpClient
240
244
  return false if @message_id.nil?
241
245
  return false if @webhook_id.nil?
242
246
  return false if @event_name.nil?
243
- event_name_validator = EnumAttributeValidator.new('String', ["EMAIL_RECEIVED", "NEW_EMAIL", "NEW_CONTACT", "NEW_ATTACHMENT", "EMAIL_OPENED", "EMAIL_READ", "BOUNCE", "BOUNCE_RECIPIENT"])
247
+ event_name_validator = EnumAttributeValidator.new('String', ["EMAIL_RECEIVED", "NEW_EMAIL", "NEW_CONTACT", "NEW_ATTACHMENT", "EMAIL_OPENED", "EMAIL_READ", "BOUNCE", "BOUNCE_RECIPIENT", "NEW_SMS"])
244
248
  return false unless event_name_validator.valid?(@event_name)
245
249
  return false if @contact_id.nil?
246
250
  return false if @email_addresses.nil?
247
251
  return false if @tags.nil?
252
+ return false if @opt_out.nil?
248
253
  return false if @created_at.nil?
249
254
  true
250
255
  end
@@ -252,7 +257,7 @@ module MailSlurpClient
252
257
  # Custom attribute writer method checking allowed values (enum).
253
258
  # @param [Object] event_name Object to be assigned
254
259
  def event_name=(event_name)
255
- validator = EnumAttributeValidator.new('String', ["EMAIL_RECEIVED", "NEW_EMAIL", "NEW_CONTACT", "NEW_ATTACHMENT", "EMAIL_OPENED", "EMAIL_READ", "BOUNCE", "BOUNCE_RECIPIENT"])
260
+ validator = EnumAttributeValidator.new('String', ["EMAIL_RECEIVED", "NEW_EMAIL", "NEW_CONTACT", "NEW_ATTACHMENT", "EMAIL_OPENED", "EMAIL_READ", "BOUNCE", "BOUNCE_RECIPIENT", "NEW_SMS"])
256
261
  unless validator.valid?(event_name)
257
262
  fail ArgumentError, "invalid value for \"event_name\", must be one of #{validator.allowable_values}."
258
263
  end
@@ -253,7 +253,7 @@ module MailSlurpClient
253
253
  return false if @message_id.nil?
254
254
  return false if @webhook_id.nil?
255
255
  return false if @event_name.nil?
256
- event_name_validator = EnumAttributeValidator.new('String', ["EMAIL_RECEIVED", "NEW_EMAIL", "NEW_CONTACT", "NEW_ATTACHMENT", "EMAIL_OPENED", "EMAIL_READ", "BOUNCE", "BOUNCE_RECIPIENT"])
256
+ event_name_validator = EnumAttributeValidator.new('String', ["EMAIL_RECEIVED", "NEW_EMAIL", "NEW_CONTACT", "NEW_ATTACHMENT", "EMAIL_OPENED", "EMAIL_READ", "BOUNCE", "BOUNCE_RECIPIENT", "NEW_SMS"])
257
257
  return false unless event_name_validator.valid?(@event_name)
258
258
  return false if @inbox_id.nil?
259
259
  return false if @email_id.nil?
@@ -269,7 +269,7 @@ module MailSlurpClient
269
269
  # Custom attribute writer method checking allowed values (enum).
270
270
  # @param [Object] event_name Object to be assigned
271
271
  def event_name=(event_name)
272
- validator = EnumAttributeValidator.new('String', ["EMAIL_RECEIVED", "NEW_EMAIL", "NEW_CONTACT", "NEW_ATTACHMENT", "EMAIL_OPENED", "EMAIL_READ", "BOUNCE", "BOUNCE_RECIPIENT"])
272
+ validator = EnumAttributeValidator.new('String', ["EMAIL_RECEIVED", "NEW_EMAIL", "NEW_CONTACT", "NEW_ATTACHMENT", "EMAIL_OPENED", "EMAIL_READ", "BOUNCE", "BOUNCE_RECIPIENT", "NEW_SMS"])
273
273
  unless validator.valid?(event_name)
274
274
  fail ArgumentError, "invalid value for \"event_name\", must be one of #{validator.allowable_values}."
275
275
  end
@@ -155,7 +155,7 @@ module MailSlurpClient
155
155
  def valid?
156
156
  return false if @id.nil?
157
157
  return false if @url.nil?
158
- event_name_validator = EnumAttributeValidator.new('String', ["EMAIL_RECEIVED", "NEW_EMAIL", "NEW_CONTACT", "NEW_ATTACHMENT", "EMAIL_OPENED", "EMAIL_READ", "BOUNCE", "BOUNCE_RECIPIENT"])
158
+ event_name_validator = EnumAttributeValidator.new('String', ["EMAIL_RECEIVED", "NEW_EMAIL", "NEW_CONTACT", "NEW_ATTACHMENT", "EMAIL_OPENED", "EMAIL_READ", "BOUNCE", "BOUNCE_RECIPIENT", "NEW_SMS"])
159
159
  return false unless event_name_validator.valid?(@event_name)
160
160
  return false if @created_at.nil?
161
161
  return false if @updated_at.nil?
@@ -165,7 +165,7 @@ module MailSlurpClient
165
165
  # Custom attribute writer method checking allowed values (enum).
166
166
  # @param [Object] event_name Object to be assigned
167
167
  def event_name=(event_name)
168
- validator = EnumAttributeValidator.new('String', ["EMAIL_RECEIVED", "NEW_EMAIL", "NEW_CONTACT", "NEW_ATTACHMENT", "EMAIL_OPENED", "EMAIL_READ", "BOUNCE", "BOUNCE_RECIPIENT"])
168
+ validator = EnumAttributeValidator.new('String', ["EMAIL_RECEIVED", "NEW_EMAIL", "NEW_CONTACT", "NEW_ATTACHMENT", "EMAIL_OPENED", "EMAIL_READ", "BOUNCE", "BOUNCE_RECIPIENT", "NEW_SMS"])
169
169
  unless validator.valid?(event_name)
170
170
  fail ArgumentError, "invalid value for \"event_name\", must be one of #{validator.allowable_values}."
171
171
  end
@@ -239,6 +239,10 @@ module MailSlurpClient
239
239
  invalid_properties.push('invalid value for "updated_at", updated_at cannot be nil.')
240
240
  end
241
241
 
242
+ if @seen.nil?
243
+ invalid_properties.push('invalid value for "seen", seen cannot be nil.')
244
+ end
245
+
242
246
  invalid_properties
243
247
  end
244
248
 
@@ -253,13 +257,14 @@ module MailSlurpClient
253
257
  http_method_validator = EnumAttributeValidator.new('String', ["GET", "HEAD", "POST", "PUT", "PATCH", "DELETE", "OPTIONS", "TRACE"])
254
258
  return false unless http_method_validator.valid?(@http_method)
255
259
  return false if @webhook_event.nil?
256
- webhook_event_validator = EnumAttributeValidator.new('String', ["EMAIL_RECEIVED", "NEW_EMAIL", "NEW_CONTACT", "NEW_ATTACHMENT", "EMAIL_OPENED", "EMAIL_READ", "BOUNCE", "BOUNCE_RECIPIENT"])
260
+ webhook_event_validator = EnumAttributeValidator.new('String', ["EMAIL_RECEIVED", "NEW_EMAIL", "NEW_CONTACT", "NEW_ATTACHMENT", "EMAIL_OPENED", "EMAIL_READ", "BOUNCE", "BOUNCE_RECIPIENT", "NEW_SMS"])
257
261
  return false unless webhook_event_validator.valid?(@webhook_event)
258
262
  return false if @response_time_millis.nil?
259
263
  result_type_validator = EnumAttributeValidator.new('String', ["BAD_RESPONSE", "EXCEPTION", "SUCCESS"])
260
264
  return false unless result_type_validator.valid?(@result_type)
261
265
  return false if @created_at.nil?
262
266
  return false if @updated_at.nil?
267
+ return false if @seen.nil?
263
268
  true
264
269
  end
265
270
 
@@ -276,7 +281,7 @@ module MailSlurpClient
276
281
  # Custom attribute writer method checking allowed values (enum).
277
282
  # @param [Object] webhook_event Object to be assigned
278
283
  def webhook_event=(webhook_event)
279
- validator = EnumAttributeValidator.new('String', ["EMAIL_RECEIVED", "NEW_EMAIL", "NEW_CONTACT", "NEW_ATTACHMENT", "EMAIL_OPENED", "EMAIL_READ", "BOUNCE", "BOUNCE_RECIPIENT"])
284
+ validator = EnumAttributeValidator.new('String', ["EMAIL_RECEIVED", "NEW_EMAIL", "NEW_CONTACT", "NEW_ATTACHMENT", "EMAIL_OPENED", "EMAIL_READ", "BOUNCE", "BOUNCE_RECIPIENT", "NEW_SMS"])
280
285
  unless validator.valid?(webhook_event)
281
286
  fail ArgumentError, "invalid value for \"webhook_event\", must be one of #{validator.allowable_values}."
282
287
  end
@@ -11,5 +11,5 @@ OpenAPI Generator version: 4.3.1
11
11
  =end
12
12
 
13
13
  module MailSlurpClient
14
- VERSION = '15.9.0'
14
+ VERSION = '15.12.0'
15
15
  end