mailslurp_client 15.13.7 → 15.13.10
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/mailslurp_client/api/api_user_controller_api.rb +23 -58
- data/lib/mailslurp_client/api/email_controller_api.rb +7 -10
- data/lib/mailslurp_client/api/inbox_controller_api.rb +2 -2
- data/lib/mailslurp_client/api/webhook_controller_api.rb +195 -2
- data/lib/mailslurp_client/models/abstract_webhook_payload.rb +2 -2
- data/lib/mailslurp_client/models/bounce_projection.rb +10 -10
- data/lib/mailslurp_client/models/create_webhook_options.rb +2 -2
- data/lib/mailslurp_client/models/email_projection.rb +10 -10
- data/lib/mailslurp_client/models/page_alias.rb +10 -10
- data/lib/mailslurp_client/models/page_attachment_entity.rb +10 -10
- data/lib/mailslurp_client/models/page_bounced_email.rb +10 -10
- data/lib/mailslurp_client/models/page_bounced_recipients.rb +10 -10
- data/lib/mailslurp_client/models/page_complaint.rb +10 -10
- data/lib/mailslurp_client/models/page_contact_projection.rb +10 -10
- data/lib/mailslurp_client/models/page_delivery_status.rb +10 -10
- data/lib/mailslurp_client/models/page_email_preview.rb +10 -10
- data/lib/mailslurp_client/models/page_email_projection.rb +10 -10
- data/lib/mailslurp_client/models/page_email_validation_request.rb +10 -10
- data/lib/mailslurp_client/models/page_expired_inbox_record_projection.rb +10 -10
- data/lib/mailslurp_client/models/page_group_projection.rb +10 -10
- data/lib/mailslurp_client/models/page_inbox_forwarder_dto.rb +10 -10
- data/lib/mailslurp_client/models/page_inbox_projection.rb +10 -10
- data/lib/mailslurp_client/models/page_inbox_ruleset_dto.rb +10 -10
- data/lib/mailslurp_client/models/page_missed_email_projection.rb +10 -10
- data/lib/mailslurp_client/models/page_organization_inbox_projection.rb +10 -10
- data/lib/mailslurp_client/models/page_phone_number_projection.rb +10 -10
- data/lib/mailslurp_client/models/page_sent_email_projection.rb +16 -16
- data/lib/mailslurp_client/models/page_sent_email_with_queue_projection.rb +16 -16
- data/lib/mailslurp_client/models/page_sms_projection.rb +10 -10
- data/lib/mailslurp_client/models/page_template_projection.rb +10 -10
- data/lib/mailslurp_client/models/page_thread_projection.rb +10 -10
- data/lib/mailslurp_client/models/page_tracking_pixel_projection.rb +10 -10
- data/lib/mailslurp_client/models/page_unknown_missed_email_projection.rb +10 -10
- data/lib/mailslurp_client/models/page_webhook_projection.rb +10 -10
- data/lib/mailslurp_client/models/page_webhook_result.rb +10 -10
- data/lib/mailslurp_client/models/sent_email_projection.rb +15 -15
- data/lib/mailslurp_client/models/sort.rb +13 -13
- data/lib/mailslurp_client/models/tracking_pixel_projection.rb +10 -10
- data/lib/mailslurp_client/models/webhook_bounce_payload.rb +4 -2
- data/lib/mailslurp_client/models/webhook_bounce_recipient_payload.rb +2 -2
- data/lib/mailslurp_client/models/webhook_delivery_status_payload.rb +429 -0
- data/lib/mailslurp_client/models/webhook_dto.rb +2 -2
- data/lib/mailslurp_client/models/webhook_email_opened_payload.rb +3 -3
- data/lib/mailslurp_client/models/webhook_email_read_payload.rb +3 -3
- data/lib/mailslurp_client/models/webhook_new_attachment_payload.rb +2 -2
- data/lib/mailslurp_client/models/webhook_new_contact_payload.rb +17 -2
- data/lib/mailslurp_client/models/webhook_new_email_payload.rb +3 -3
- data/lib/mailslurp_client/models/webhook_new_sms_payload.rb +393 -0
- data/lib/mailslurp_client/models/webhook_projection.rb +12 -3
- data/lib/mailslurp_client/models/webhook_result_dto.rb +2 -2
- data/lib/mailslurp_client/version.rb +1 -1
- data/lib/mailslurp_client.rb +2 -0
- metadata +4 -2
@@ -0,0 +1,429 @@
|
|
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
|
+
# DELIVERY_STATUS webhook payload. Sent to your webhook url endpoint via HTTP POST when an email delivery status is created. This could be a successful delivery or a delivery failure.
|
17
|
+
class WebhookDeliveryStatusPayload
|
18
|
+
# Idempotent message ID. Store this ID locally or in a database to prevent message duplication.
|
19
|
+
attr_accessor :message_id
|
20
|
+
|
21
|
+
# ID of webhook entity being triggered
|
22
|
+
attr_accessor :webhook_id
|
23
|
+
|
24
|
+
# Name of the event type webhook is being triggered for.
|
25
|
+
attr_accessor :event_name
|
26
|
+
|
27
|
+
# Name of the webhook being triggered
|
28
|
+
attr_accessor :webhook_name
|
29
|
+
|
30
|
+
# ID of delivery status
|
31
|
+
attr_accessor :id
|
32
|
+
|
33
|
+
# User ID of event
|
34
|
+
attr_accessor :user_id
|
35
|
+
|
36
|
+
# ID of sent email
|
37
|
+
attr_accessor :sent_id
|
38
|
+
|
39
|
+
# IP address of the remote Mail Transfer Agent
|
40
|
+
attr_accessor :remote_mta_ip
|
41
|
+
|
42
|
+
# Id of the inbox
|
43
|
+
attr_accessor :inbox_id
|
44
|
+
|
45
|
+
# Mail Transfer Agent reporting delivery status
|
46
|
+
attr_accessor :reporting_mta
|
47
|
+
|
48
|
+
# Recipients for delivery
|
49
|
+
attr_accessor :recipients
|
50
|
+
|
51
|
+
# SMTP server response message
|
52
|
+
attr_accessor :smtp_response
|
53
|
+
|
54
|
+
# SMTP server status
|
55
|
+
attr_accessor :smtp_status_code
|
56
|
+
|
57
|
+
# Time in milliseconds for delivery processing
|
58
|
+
attr_accessor :processing_time_millis
|
59
|
+
|
60
|
+
# Time event was received
|
61
|
+
attr_accessor :received
|
62
|
+
|
63
|
+
# Email subject
|
64
|
+
attr_accessor :subject
|
65
|
+
|
66
|
+
class EnumAttributeValidator
|
67
|
+
attr_reader :datatype
|
68
|
+
attr_reader :allowable_values
|
69
|
+
|
70
|
+
def initialize(datatype, allowable_values)
|
71
|
+
@allowable_values = allowable_values.map do |value|
|
72
|
+
case datatype.to_s
|
73
|
+
when /Integer/i
|
74
|
+
value.to_i
|
75
|
+
when /Float/i
|
76
|
+
value.to_f
|
77
|
+
else
|
78
|
+
value
|
79
|
+
end
|
80
|
+
end
|
81
|
+
end
|
82
|
+
|
83
|
+
def valid?(value)
|
84
|
+
!value || allowable_values.include?(value)
|
85
|
+
end
|
86
|
+
end
|
87
|
+
|
88
|
+
# Attribute mapping from ruby-style variable name to JSON key.
|
89
|
+
def self.attribute_map
|
90
|
+
{
|
91
|
+
:'message_id' => :'messageId',
|
92
|
+
:'webhook_id' => :'webhookId',
|
93
|
+
:'event_name' => :'eventName',
|
94
|
+
:'webhook_name' => :'webhookName',
|
95
|
+
:'id' => :'id',
|
96
|
+
:'user_id' => :'userId',
|
97
|
+
:'sent_id' => :'sentId',
|
98
|
+
:'remote_mta_ip' => :'remoteMtaIp',
|
99
|
+
:'inbox_id' => :'inboxId',
|
100
|
+
:'reporting_mta' => :'reportingMta',
|
101
|
+
:'recipients' => :'recipients',
|
102
|
+
:'smtp_response' => :'smtpResponse',
|
103
|
+
:'smtp_status_code' => :'smtpStatusCode',
|
104
|
+
:'processing_time_millis' => :'processingTimeMillis',
|
105
|
+
:'received' => :'received',
|
106
|
+
:'subject' => :'subject'
|
107
|
+
}
|
108
|
+
end
|
109
|
+
|
110
|
+
# Attribute type mapping.
|
111
|
+
def self.openapi_types
|
112
|
+
{
|
113
|
+
:'message_id' => :'String',
|
114
|
+
:'webhook_id' => :'String',
|
115
|
+
:'event_name' => :'String',
|
116
|
+
:'webhook_name' => :'String',
|
117
|
+
:'id' => :'String',
|
118
|
+
:'user_id' => :'String',
|
119
|
+
:'sent_id' => :'String',
|
120
|
+
:'remote_mta_ip' => :'String',
|
121
|
+
:'inbox_id' => :'String',
|
122
|
+
:'reporting_mta' => :'String',
|
123
|
+
:'recipients' => :'Array<String>',
|
124
|
+
:'smtp_response' => :'String',
|
125
|
+
:'smtp_status_code' => :'Integer',
|
126
|
+
:'processing_time_millis' => :'Integer',
|
127
|
+
:'received' => :'DateTime',
|
128
|
+
:'subject' => :'String'
|
129
|
+
}
|
130
|
+
end
|
131
|
+
|
132
|
+
# List of attributes with nullable: true
|
133
|
+
def self.openapi_nullable
|
134
|
+
Set.new([
|
135
|
+
:'sent_id',
|
136
|
+
:'remote_mta_ip',
|
137
|
+
:'inbox_id',
|
138
|
+
:'reporting_mta',
|
139
|
+
:'recipients',
|
140
|
+
:'smtp_response',
|
141
|
+
:'smtp_status_code',
|
142
|
+
:'processing_time_millis',
|
143
|
+
:'received',
|
144
|
+
:'subject'
|
145
|
+
])
|
146
|
+
end
|
147
|
+
|
148
|
+
# Initializes the object
|
149
|
+
# @param [Hash] attributes Model attributes in the form of hash
|
150
|
+
def initialize(attributes = {})
|
151
|
+
if (!attributes.is_a?(Hash))
|
152
|
+
fail ArgumentError, "The input argument (attributes) must be a hash in `MailSlurpClient::WebhookDeliveryStatusPayload` initialize method"
|
153
|
+
end
|
154
|
+
|
155
|
+
# check to see if the attribute exists and convert string to symbol for hash key
|
156
|
+
attributes = attributes.each_with_object({}) { |(k, v), h|
|
157
|
+
if (!self.class.attribute_map.key?(k.to_sym))
|
158
|
+
fail ArgumentError, "`#{k}` is not a valid attribute in `MailSlurpClient::WebhookDeliveryStatusPayload`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect
|
159
|
+
end
|
160
|
+
h[k.to_sym] = v
|
161
|
+
}
|
162
|
+
|
163
|
+
if attributes.key?(:'message_id')
|
164
|
+
self.message_id = attributes[:'message_id']
|
165
|
+
end
|
166
|
+
|
167
|
+
if attributes.key?(:'webhook_id')
|
168
|
+
self.webhook_id = attributes[:'webhook_id']
|
169
|
+
end
|
170
|
+
|
171
|
+
if attributes.key?(:'event_name')
|
172
|
+
self.event_name = attributes[:'event_name']
|
173
|
+
end
|
174
|
+
|
175
|
+
if attributes.key?(:'webhook_name')
|
176
|
+
self.webhook_name = attributes[:'webhook_name']
|
177
|
+
end
|
178
|
+
|
179
|
+
if attributes.key?(:'id')
|
180
|
+
self.id = attributes[:'id']
|
181
|
+
end
|
182
|
+
|
183
|
+
if attributes.key?(:'user_id')
|
184
|
+
self.user_id = attributes[:'user_id']
|
185
|
+
end
|
186
|
+
|
187
|
+
if attributes.key?(:'sent_id')
|
188
|
+
self.sent_id = attributes[:'sent_id']
|
189
|
+
end
|
190
|
+
|
191
|
+
if attributes.key?(:'remote_mta_ip')
|
192
|
+
self.remote_mta_ip = attributes[:'remote_mta_ip']
|
193
|
+
end
|
194
|
+
|
195
|
+
if attributes.key?(:'inbox_id')
|
196
|
+
self.inbox_id = attributes[:'inbox_id']
|
197
|
+
end
|
198
|
+
|
199
|
+
if attributes.key?(:'reporting_mta')
|
200
|
+
self.reporting_mta = attributes[:'reporting_mta']
|
201
|
+
end
|
202
|
+
|
203
|
+
if attributes.key?(:'recipients')
|
204
|
+
if (value = attributes[:'recipients']).is_a?(Array)
|
205
|
+
self.recipients = value
|
206
|
+
end
|
207
|
+
end
|
208
|
+
|
209
|
+
if attributes.key?(:'smtp_response')
|
210
|
+
self.smtp_response = attributes[:'smtp_response']
|
211
|
+
end
|
212
|
+
|
213
|
+
if attributes.key?(:'smtp_status_code')
|
214
|
+
self.smtp_status_code = attributes[:'smtp_status_code']
|
215
|
+
end
|
216
|
+
|
217
|
+
if attributes.key?(:'processing_time_millis')
|
218
|
+
self.processing_time_millis = attributes[:'processing_time_millis']
|
219
|
+
end
|
220
|
+
|
221
|
+
if attributes.key?(:'received')
|
222
|
+
self.received = attributes[:'received']
|
223
|
+
end
|
224
|
+
|
225
|
+
if attributes.key?(:'subject')
|
226
|
+
self.subject = attributes[:'subject']
|
227
|
+
end
|
228
|
+
end
|
229
|
+
|
230
|
+
# Show invalid properties with the reasons. Usually used together with valid?
|
231
|
+
# @return Array for valid properties with the reasons
|
232
|
+
def list_invalid_properties
|
233
|
+
invalid_properties = Array.new
|
234
|
+
if @message_id.nil?
|
235
|
+
invalid_properties.push('invalid value for "message_id", message_id cannot be nil.')
|
236
|
+
end
|
237
|
+
|
238
|
+
if @webhook_id.nil?
|
239
|
+
invalid_properties.push('invalid value for "webhook_id", webhook_id cannot be nil.')
|
240
|
+
end
|
241
|
+
|
242
|
+
if @event_name.nil?
|
243
|
+
invalid_properties.push('invalid value for "event_name", event_name cannot be nil.')
|
244
|
+
end
|
245
|
+
|
246
|
+
if @id.nil?
|
247
|
+
invalid_properties.push('invalid value for "id", id cannot be nil.')
|
248
|
+
end
|
249
|
+
|
250
|
+
if @user_id.nil?
|
251
|
+
invalid_properties.push('invalid value for "user_id", user_id cannot be nil.')
|
252
|
+
end
|
253
|
+
|
254
|
+
invalid_properties
|
255
|
+
end
|
256
|
+
|
257
|
+
# Check to see if the all the properties in the model are valid
|
258
|
+
# @return true if the model is valid
|
259
|
+
def valid?
|
260
|
+
return false if @message_id.nil?
|
261
|
+
return false if @webhook_id.nil?
|
262
|
+
return false if @event_name.nil?
|
263
|
+
event_name_validator = EnumAttributeValidator.new('String', ["EMAIL_RECEIVED", "NEW_EMAIL", "NEW_CONTACT", "NEW_ATTACHMENT", "EMAIL_OPENED", "EMAIL_READ", "DELIVERY_STATUS", "BOUNCE", "BOUNCE_RECIPIENT", "NEW_SMS"])
|
264
|
+
return false unless event_name_validator.valid?(@event_name)
|
265
|
+
return false if @id.nil?
|
266
|
+
return false if @user_id.nil?
|
267
|
+
true
|
268
|
+
end
|
269
|
+
|
270
|
+
# Custom attribute writer method checking allowed values (enum).
|
271
|
+
# @param [Object] event_name Object to be assigned
|
272
|
+
def event_name=(event_name)
|
273
|
+
validator = EnumAttributeValidator.new('String', ["EMAIL_RECEIVED", "NEW_EMAIL", "NEW_CONTACT", "NEW_ATTACHMENT", "EMAIL_OPENED", "EMAIL_READ", "DELIVERY_STATUS", "BOUNCE", "BOUNCE_RECIPIENT", "NEW_SMS"])
|
274
|
+
unless validator.valid?(event_name)
|
275
|
+
fail ArgumentError, "invalid value for \"event_name\", must be one of #{validator.allowable_values}."
|
276
|
+
end
|
277
|
+
@event_name = event_name
|
278
|
+
end
|
279
|
+
|
280
|
+
# Checks equality by comparing each attribute.
|
281
|
+
# @param [Object] Object to be compared
|
282
|
+
def ==(o)
|
283
|
+
return true if self.equal?(o)
|
284
|
+
self.class == o.class &&
|
285
|
+
message_id == o.message_id &&
|
286
|
+
webhook_id == o.webhook_id &&
|
287
|
+
event_name == o.event_name &&
|
288
|
+
webhook_name == o.webhook_name &&
|
289
|
+
id == o.id &&
|
290
|
+
user_id == o.user_id &&
|
291
|
+
sent_id == o.sent_id &&
|
292
|
+
remote_mta_ip == o.remote_mta_ip &&
|
293
|
+
inbox_id == o.inbox_id &&
|
294
|
+
reporting_mta == o.reporting_mta &&
|
295
|
+
recipients == o.recipients &&
|
296
|
+
smtp_response == o.smtp_response &&
|
297
|
+
smtp_status_code == o.smtp_status_code &&
|
298
|
+
processing_time_millis == o.processing_time_millis &&
|
299
|
+
received == o.received &&
|
300
|
+
subject == o.subject
|
301
|
+
end
|
302
|
+
|
303
|
+
# @see the `==` method
|
304
|
+
# @param [Object] Object to be compared
|
305
|
+
def eql?(o)
|
306
|
+
self == o
|
307
|
+
end
|
308
|
+
|
309
|
+
# Calculates hash code according to all attributes.
|
310
|
+
# @return [Integer] Hash code
|
311
|
+
def hash
|
312
|
+
[message_id, webhook_id, event_name, webhook_name, id, user_id, sent_id, remote_mta_ip, inbox_id, reporting_mta, recipients, smtp_response, smtp_status_code, processing_time_millis, received, subject].hash
|
313
|
+
end
|
314
|
+
|
315
|
+
# Builds the object from hash
|
316
|
+
# @param [Hash] attributes Model attributes in the form of hash
|
317
|
+
# @return [Object] Returns the model itself
|
318
|
+
def self.build_from_hash(attributes)
|
319
|
+
new.build_from_hash(attributes)
|
320
|
+
end
|
321
|
+
|
322
|
+
# Builds the object from hash
|
323
|
+
# @param [Hash] attributes Model attributes in the form of hash
|
324
|
+
# @return [Object] Returns the model itself
|
325
|
+
def build_from_hash(attributes)
|
326
|
+
return nil unless attributes.is_a?(Hash)
|
327
|
+
self.class.openapi_types.each_pair do |key, type|
|
328
|
+
if type =~ /\AArray<(.*)>/i
|
329
|
+
# check to ensure the input is an array given that the attribute
|
330
|
+
# is documented as an array but the input is not
|
331
|
+
if attributes[self.class.attribute_map[key]].is_a?(Array)
|
332
|
+
self.send("#{key}=", attributes[self.class.attribute_map[key]].map { |v| _deserialize($1, v) })
|
333
|
+
end
|
334
|
+
elsif !attributes[self.class.attribute_map[key]].nil?
|
335
|
+
self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]]))
|
336
|
+
end # or else data not found in attributes(hash), not an issue as the data can be optional
|
337
|
+
end
|
338
|
+
|
339
|
+
self
|
340
|
+
end
|
341
|
+
|
342
|
+
# Deserializes the data based on type
|
343
|
+
# @param string type Data type
|
344
|
+
# @param string value Value to be deserialized
|
345
|
+
# @return [Object] Deserialized data
|
346
|
+
def _deserialize(type, value)
|
347
|
+
case type.to_sym
|
348
|
+
when :DateTime
|
349
|
+
DateTime.parse(value)
|
350
|
+
when :Date
|
351
|
+
Date.parse(value)
|
352
|
+
when :String
|
353
|
+
value.to_s
|
354
|
+
when :Integer
|
355
|
+
value.to_i
|
356
|
+
when :Float
|
357
|
+
value.to_f
|
358
|
+
when :Boolean
|
359
|
+
if value.to_s =~ /\A(true|t|yes|y|1)\z/i
|
360
|
+
true
|
361
|
+
else
|
362
|
+
false
|
363
|
+
end
|
364
|
+
when :Object
|
365
|
+
# generic object (usually a Hash), return directly
|
366
|
+
value
|
367
|
+
when /\AArray<(?<inner_type>.+)>\z/
|
368
|
+
inner_type = Regexp.last_match[:inner_type]
|
369
|
+
value.map { |v| _deserialize(inner_type, v) }
|
370
|
+
when /\AHash<(?<k_type>.+?), (?<v_type>.+)>\z/
|
371
|
+
k_type = Regexp.last_match[:k_type]
|
372
|
+
v_type = Regexp.last_match[:v_type]
|
373
|
+
{}.tap do |hash|
|
374
|
+
value.each do |k, v|
|
375
|
+
hash[_deserialize(k_type, k)] = _deserialize(v_type, v)
|
376
|
+
end
|
377
|
+
end
|
378
|
+
else # model
|
379
|
+
MailSlurpClient.const_get(type).build_from_hash(value)
|
380
|
+
end
|
381
|
+
end
|
382
|
+
|
383
|
+
# Returns the string representation of the object
|
384
|
+
# @return [String] String presentation of the object
|
385
|
+
def to_s
|
386
|
+
to_hash.to_s
|
387
|
+
end
|
388
|
+
|
389
|
+
# to_body is an alias to to_hash (backward compatibility)
|
390
|
+
# @return [Hash] Returns the object in the form of hash
|
391
|
+
def to_body
|
392
|
+
to_hash
|
393
|
+
end
|
394
|
+
|
395
|
+
# Returns the object in the form of hash
|
396
|
+
# @return [Hash] Returns the object in the form of hash
|
397
|
+
def to_hash
|
398
|
+
hash = {}
|
399
|
+
self.class.attribute_map.each_pair do |attr, param|
|
400
|
+
value = self.send(attr)
|
401
|
+
if value.nil?
|
402
|
+
is_nullable = self.class.openapi_nullable.include?(attr)
|
403
|
+
next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}"))
|
404
|
+
end
|
405
|
+
|
406
|
+
hash[param] = _to_hash(value)
|
407
|
+
end
|
408
|
+
hash
|
409
|
+
end
|
410
|
+
|
411
|
+
# Outputs non-array value in the form of hash
|
412
|
+
# For object, use to_hash. Otherwise, just return the value
|
413
|
+
# @param [Object] value Any valid value
|
414
|
+
# @return [Hash] Returns the value in the form of hash
|
415
|
+
def _to_hash(value)
|
416
|
+
if value.is_a?(Array)
|
417
|
+
value.compact.map { |v| _to_hash(v) }
|
418
|
+
elsif value.is_a?(Hash)
|
419
|
+
{}.tap do |hash|
|
420
|
+
value.each { |k, v| hash[k] = _to_hash(v) }
|
421
|
+
end
|
422
|
+
elsif value.respond_to? :to_hash
|
423
|
+
value.to_hash
|
424
|
+
else
|
425
|
+
value
|
426
|
+
end
|
427
|
+
end
|
428
|
+
end
|
429
|
+
end
|
@@ -238,7 +238,7 @@ module MailSlurpClient
|
|
238
238
|
return false unless method_validator.valid?(@method)
|
239
239
|
return false if @payload_json_schema.nil?
|
240
240
|
return false if @updated_at.nil?
|
241
|
-
event_name_validator = EnumAttributeValidator.new('String', ["EMAIL_RECEIVED", "NEW_EMAIL", "NEW_CONTACT", "NEW_ATTACHMENT", "EMAIL_OPENED", "EMAIL_READ", "BOUNCE", "BOUNCE_RECIPIENT", "NEW_SMS"])
|
241
|
+
event_name_validator = EnumAttributeValidator.new('String', ["EMAIL_RECEIVED", "NEW_EMAIL", "NEW_CONTACT", "NEW_ATTACHMENT", "EMAIL_OPENED", "EMAIL_READ", "DELIVERY_STATUS", "BOUNCE", "BOUNCE_RECIPIENT", "NEW_SMS"])
|
242
242
|
return false unless event_name_validator.valid?(@event_name)
|
243
243
|
true
|
244
244
|
end
|
@@ -256,7 +256,7 @@ module MailSlurpClient
|
|
256
256
|
# Custom attribute writer method checking allowed values (enum).
|
257
257
|
# @param [Object] event_name Object to be assigned
|
258
258
|
def event_name=(event_name)
|
259
|
-
validator = EnumAttributeValidator.new('String', ["EMAIL_RECEIVED", "NEW_EMAIL", "NEW_CONTACT", "NEW_ATTACHMENT", "EMAIL_OPENED", "EMAIL_READ", "BOUNCE", "BOUNCE_RECIPIENT", "NEW_SMS"])
|
259
|
+
validator = EnumAttributeValidator.new('String', ["EMAIL_RECEIVED", "NEW_EMAIL", "NEW_CONTACT", "NEW_ATTACHMENT", "EMAIL_OPENED", "EMAIL_READ", "DELIVERY_STATUS", "BOUNCE", "BOUNCE_RECIPIENT", "NEW_SMS"])
|
260
260
|
unless validator.valid?(event_name)
|
261
261
|
fail ArgumentError, "invalid value for \"event_name\", must be one of #{validator.allowable_values}."
|
262
262
|
end
|
@@ -27,7 +27,7 @@ module MailSlurpClient
|
|
27
27
|
# Name of the webhook being triggered
|
28
28
|
attr_accessor :webhook_name
|
29
29
|
|
30
|
-
# Id of the inbox
|
30
|
+
# Id of the inbox
|
31
31
|
attr_accessor :inbox_id
|
32
32
|
|
33
33
|
# ID of the tracking pixel
|
@@ -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", "NEW_SMS"])
|
200
|
+
event_name_validator = EnumAttributeValidator.new('String', ["EMAIL_RECEIVED", "NEW_EMAIL", "NEW_CONTACT", "NEW_ATTACHMENT", "EMAIL_OPENED", "EMAIL_READ", "DELIVERY_STATUS", "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", "NEW_SMS"])
|
213
|
+
validator = EnumAttributeValidator.new('String', ["EMAIL_RECEIVED", "NEW_EMAIL", "NEW_CONTACT", "NEW_ATTACHMENT", "EMAIL_OPENED", "EMAIL_READ", "DELIVERY_STATUS", "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
|
@@ -30,7 +30,7 @@ module MailSlurpClient
|
|
30
30
|
# ID of the email that was received. Use this ID for fetching the email with the `EmailController`.
|
31
31
|
attr_accessor :email_id
|
32
32
|
|
33
|
-
# Id of the inbox
|
33
|
+
# Id of the inbox
|
34
34
|
attr_accessor :inbox_id
|
35
35
|
|
36
36
|
# Is the email read
|
@@ -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", "NEW_SMS"])
|
187
|
+
event_name_validator = EnumAttributeValidator.new('String', ["EMAIL_RECEIVED", "NEW_EMAIL", "NEW_CONTACT", "NEW_ATTACHMENT", "EMAIL_OPENED", "EMAIL_READ", "DELIVERY_STATUS", "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", "NEW_SMS"])
|
199
|
+
validator = EnumAttributeValidator.new('String', ["EMAIL_RECEIVED", "NEW_EMAIL", "NEW_CONTACT", "NEW_ATTACHMENT", "EMAIL_OPENED", "EMAIL_READ", "DELIVERY_STATUS", "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", "NEW_SMS"])
|
187
|
+
event_name_validator = EnumAttributeValidator.new('String', ["EMAIL_RECEIVED", "NEW_EMAIL", "NEW_CONTACT", "NEW_ATTACHMENT", "EMAIL_OPENED", "EMAIL_READ", "DELIVERY_STATUS", "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", "NEW_SMS"])
|
199
|
+
validator = EnumAttributeValidator.new('String', ["EMAIL_RECEIVED", "NEW_EMAIL", "NEW_CONTACT", "NEW_ATTACHMENT", "EMAIL_OPENED", "EMAIL_READ", "DELIVERY_STATUS", "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
|
@@ -27,26 +27,36 @@ module MailSlurpClient
|
|
27
27
|
# Name of the event type webhook is being triggered for.
|
28
28
|
attr_accessor :event_name
|
29
29
|
|
30
|
+
# Contact ID
|
30
31
|
attr_accessor :contact_id
|
31
32
|
|
33
|
+
# Contact group ID
|
32
34
|
attr_accessor :group_id
|
33
35
|
|
36
|
+
# Contact first name
|
34
37
|
attr_accessor :first_name
|
35
38
|
|
39
|
+
# Contact last name
|
36
40
|
attr_accessor :last_name
|
37
41
|
|
42
|
+
# Contact company name
|
38
43
|
attr_accessor :company
|
39
44
|
|
45
|
+
# Primary email address for contact
|
40
46
|
attr_accessor :primary_email_address
|
41
47
|
|
48
|
+
# Email addresses for contact
|
42
49
|
attr_accessor :email_addresses
|
43
50
|
|
51
|
+
# Tags for contact
|
44
52
|
attr_accessor :tags
|
45
53
|
|
46
54
|
attr_accessor :meta_data
|
47
55
|
|
56
|
+
# Has contact opted out of emails
|
48
57
|
attr_accessor :opt_out
|
49
58
|
|
59
|
+
# Date time of event creation
|
50
60
|
attr_accessor :created_at
|
51
61
|
|
52
62
|
class EnumAttributeValidator
|
@@ -116,6 +126,11 @@ module MailSlurpClient
|
|
116
126
|
# List of attributes with nullable: true
|
117
127
|
def self.openapi_nullable
|
118
128
|
Set.new([
|
129
|
+
:'group_id',
|
130
|
+
:'first_name',
|
131
|
+
:'last_name',
|
132
|
+
:'company',
|
133
|
+
:'primary_email_address',
|
119
134
|
])
|
120
135
|
end
|
121
136
|
|
@@ -244,7 +259,7 @@ module MailSlurpClient
|
|
244
259
|
return false if @message_id.nil?
|
245
260
|
return false if @webhook_id.nil?
|
246
261
|
return false if @event_name.nil?
|
247
|
-
event_name_validator = EnumAttributeValidator.new('String', ["EMAIL_RECEIVED", "NEW_EMAIL", "NEW_CONTACT", "NEW_ATTACHMENT", "EMAIL_OPENED", "EMAIL_READ", "BOUNCE", "BOUNCE_RECIPIENT", "NEW_SMS"])
|
262
|
+
event_name_validator = EnumAttributeValidator.new('String', ["EMAIL_RECEIVED", "NEW_EMAIL", "NEW_CONTACT", "NEW_ATTACHMENT", "EMAIL_OPENED", "EMAIL_READ", "DELIVERY_STATUS", "BOUNCE", "BOUNCE_RECIPIENT", "NEW_SMS"])
|
248
263
|
return false unless event_name_validator.valid?(@event_name)
|
249
264
|
return false if @contact_id.nil?
|
250
265
|
return false if @email_addresses.nil?
|
@@ -257,7 +272,7 @@ module MailSlurpClient
|
|
257
272
|
# Custom attribute writer method checking allowed values (enum).
|
258
273
|
# @param [Object] event_name Object to be assigned
|
259
274
|
def event_name=(event_name)
|
260
|
-
validator = EnumAttributeValidator.new('String', ["EMAIL_RECEIVED", "NEW_EMAIL", "NEW_CONTACT", "NEW_ATTACHMENT", "EMAIL_OPENED", "EMAIL_READ", "BOUNCE", "BOUNCE_RECIPIENT", "NEW_SMS"])
|
275
|
+
validator = EnumAttributeValidator.new('String', ["EMAIL_RECEIVED", "NEW_EMAIL", "NEW_CONTACT", "NEW_ATTACHMENT", "EMAIL_OPENED", "EMAIL_READ", "DELIVERY_STATUS", "BOUNCE", "BOUNCE_RECIPIENT", "NEW_SMS"])
|
261
276
|
unless validator.valid?(event_name)
|
262
277
|
fail ArgumentError, "invalid value for \"event_name\", must be one of #{validator.allowable_values}."
|
263
278
|
end
|
@@ -27,7 +27,7 @@ module MailSlurpClient
|
|
27
27
|
# Name of the webhook being triggered
|
28
28
|
attr_accessor :webhook_name
|
29
29
|
|
30
|
-
# Id of the inbox
|
30
|
+
# Id of the inbox
|
31
31
|
attr_accessor :inbox_id
|
32
32
|
|
33
33
|
# Id of the domain that received an email
|
@@ -262,7 +262,7 @@ module MailSlurpClient
|
|
262
262
|
return false if @message_id.nil?
|
263
263
|
return false if @webhook_id.nil?
|
264
264
|
return false if @event_name.nil?
|
265
|
-
event_name_validator = EnumAttributeValidator.new('String', ["EMAIL_RECEIVED", "NEW_EMAIL", "NEW_CONTACT", "NEW_ATTACHMENT", "EMAIL_OPENED", "EMAIL_READ", "BOUNCE", "BOUNCE_RECIPIENT", "NEW_SMS"])
|
265
|
+
event_name_validator = EnumAttributeValidator.new('String', ["EMAIL_RECEIVED", "NEW_EMAIL", "NEW_CONTACT", "NEW_ATTACHMENT", "EMAIL_OPENED", "EMAIL_READ", "DELIVERY_STATUS", "BOUNCE", "BOUNCE_RECIPIENT", "NEW_SMS"])
|
266
266
|
return false unless event_name_validator.valid?(@event_name)
|
267
267
|
return false if @inbox_id.nil?
|
268
268
|
return false if @email_id.nil?
|
@@ -278,7 +278,7 @@ module MailSlurpClient
|
|
278
278
|
# Custom attribute writer method checking allowed values (enum).
|
279
279
|
# @param [Object] event_name Object to be assigned
|
280
280
|
def event_name=(event_name)
|
281
|
-
validator = EnumAttributeValidator.new('String', ["EMAIL_RECEIVED", "NEW_EMAIL", "NEW_CONTACT", "NEW_ATTACHMENT", "EMAIL_OPENED", "EMAIL_READ", "BOUNCE", "BOUNCE_RECIPIENT", "NEW_SMS"])
|
281
|
+
validator = EnumAttributeValidator.new('String', ["EMAIL_RECEIVED", "NEW_EMAIL", "NEW_CONTACT", "NEW_ATTACHMENT", "EMAIL_OPENED", "EMAIL_READ", "DELIVERY_STATUS", "BOUNCE", "BOUNCE_RECIPIENT", "NEW_SMS"])
|
282
282
|
unless validator.valid?(event_name)
|
283
283
|
fail ArgumentError, "invalid value for \"event_name\", must be one of #{validator.allowable_values}."
|
284
284
|
end
|