mailslurp_client 12.1.22 → 12.1.23

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 5f878bf983ebb1864e73ab7693ac90d1a04f8ef4a84698f2bef34752d9d97c5b
4
- data.tar.gz: ce0ed9bf08a4bf8490cf11e9cbe8f041f3e9595c78a6ad86afe7fbdfc017dba3
3
+ metadata.gz: e348595f12c7883bc61dfd8ee93246cc6ff3eb4de9d3524991f056c5d956c4ca
4
+ data.tar.gz: e066552194ab1625a538955428e6bd018810dee6a7c7e4c52dec28bfd1dacee3
5
5
  SHA512:
6
- metadata.gz: 3b241ae5a62ce1bcff2d129230d81b83f60449620c762041ef5d6c1ccb474f1f5ac4c4d2a5d4d7c0fe4eb61b7d3d8fc9f8383eef39ed5f782c30bb2532a6a177
7
- data.tar.gz: 79597481eb7050d4be1858b872252269f6a4ec540a9859196a7af4a60ca86041c0a2d09a376e15cd37674f764d06767ef7deb564de75c54d22dd789e3363e971
6
+ metadata.gz: 618fb2e6aea9d13c9672dbaf1580324c3d3a8bad2b912004548777d0b53382f55da900c6bef90d3620ce11c6495c77559217b49be2a2a2fbe3ecbc7d618a00aa
7
+ data.tar.gz: da77198329de17364579af22ffce1e0955a1fea153f9cee90865c03a6b7fd92f54a98acf9b2e5d359c400f9f1bcaf569c6649cbc76b2d278c1a9fedebf3a04a3
@@ -108,6 +108,9 @@ require 'mailslurp_client/models/validation_message'
108
108
  require 'mailslurp_client/models/verify_email_address_options'
109
109
  require 'mailslurp_client/models/wait_for_conditions'
110
110
  require 'mailslurp_client/models/webhook_dto'
111
+ require 'mailslurp_client/models/webhook_new_attachment_payload'
112
+ require 'mailslurp_client/models/webhook_new_contact_payload'
113
+ require 'mailslurp_client/models/webhook_new_email_payload'
111
114
  require 'mailslurp_client/models/webhook_projection'
112
115
  require 'mailslurp_client/models/webhook_test_request'
113
116
  require 'mailslurp_client/models/webhook_test_response'
@@ -283,6 +283,168 @@ module MailSlurpClient
283
283
  return data, status_code, headers
284
284
  end
285
285
 
286
+ # Get webhook test payload for new attachment event
287
+ # @param [Hash] opts the optional parameters
288
+ # @return [WebhookNewAttachmentPayload]
289
+ def get_test_webhook_payload_new_attachment(opts = {})
290
+ data, _status_code, _headers = get_test_webhook_payload_new_attachment_with_http_info(opts)
291
+ data
292
+ end
293
+
294
+ # Get webhook test payload for new attachment event
295
+ # @param [Hash] opts the optional parameters
296
+ # @return [Array<(WebhookNewAttachmentPayload, Integer, Hash)>] WebhookNewAttachmentPayload data, response status code and response headers
297
+ def get_test_webhook_payload_new_attachment_with_http_info(opts = {})
298
+ if @api_client.config.debugging
299
+ @api_client.config.logger.debug 'Calling API: WebhookControllerApi.get_test_webhook_payload_new_attachment ...'
300
+ end
301
+ # resource path
302
+ local_var_path = '/webhooks/test/new-attachment-payload'
303
+
304
+ # query parameters
305
+ query_params = opts[:query_params] || {}
306
+
307
+ # header parameters
308
+ header_params = opts[:header_params] || {}
309
+ # HTTP header 'Accept' (if needed)
310
+ header_params['Accept'] = @api_client.select_header_accept(['application/json'])
311
+
312
+ # form parameters
313
+ form_params = opts[:form_params] || {}
314
+
315
+ # http body (model)
316
+ post_body = opts[:body]
317
+
318
+ # return_type
319
+ return_type = opts[:return_type] || 'WebhookNewAttachmentPayload'
320
+
321
+ # auth_names
322
+ auth_names = opts[:auth_names] || ['API_KEY']
323
+
324
+ new_options = opts.merge(
325
+ :header_params => header_params,
326
+ :query_params => query_params,
327
+ :form_params => form_params,
328
+ :body => post_body,
329
+ :auth_names => auth_names,
330
+ :return_type => return_type
331
+ )
332
+
333
+ data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options)
334
+ if @api_client.config.debugging
335
+ @api_client.config.logger.debug "API called: WebhookControllerApi#get_test_webhook_payload_new_attachment\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
336
+ end
337
+ return data, status_code, headers
338
+ end
339
+
340
+ # Get webhook test payload for new contact event
341
+ # @param [Hash] opts the optional parameters
342
+ # @return [WebhookNewContactPayload]
343
+ def get_test_webhook_payload_new_contact(opts = {})
344
+ data, _status_code, _headers = get_test_webhook_payload_new_contact_with_http_info(opts)
345
+ data
346
+ end
347
+
348
+ # Get webhook test payload for new contact event
349
+ # @param [Hash] opts the optional parameters
350
+ # @return [Array<(WebhookNewContactPayload, Integer, Hash)>] WebhookNewContactPayload data, response status code and response headers
351
+ def get_test_webhook_payload_new_contact_with_http_info(opts = {})
352
+ if @api_client.config.debugging
353
+ @api_client.config.logger.debug 'Calling API: WebhookControllerApi.get_test_webhook_payload_new_contact ...'
354
+ end
355
+ # resource path
356
+ local_var_path = '/webhooks/test/new-contact-payload'
357
+
358
+ # query parameters
359
+ query_params = opts[:query_params] || {}
360
+
361
+ # header parameters
362
+ header_params = opts[:header_params] || {}
363
+ # HTTP header 'Accept' (if needed)
364
+ header_params['Accept'] = @api_client.select_header_accept(['application/json'])
365
+
366
+ # form parameters
367
+ form_params = opts[:form_params] || {}
368
+
369
+ # http body (model)
370
+ post_body = opts[:body]
371
+
372
+ # return_type
373
+ return_type = opts[:return_type] || 'WebhookNewContactPayload'
374
+
375
+ # auth_names
376
+ auth_names = opts[:auth_names] || ['API_KEY']
377
+
378
+ new_options = opts.merge(
379
+ :header_params => header_params,
380
+ :query_params => query_params,
381
+ :form_params => form_params,
382
+ :body => post_body,
383
+ :auth_names => auth_names,
384
+ :return_type => return_type
385
+ )
386
+
387
+ data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options)
388
+ if @api_client.config.debugging
389
+ @api_client.config.logger.debug "API called: WebhookControllerApi#get_test_webhook_payload_new_contact\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
390
+ end
391
+ return data, status_code, headers
392
+ end
393
+
394
+ # Get webhook test payload for new email event
395
+ # @param [Hash] opts the optional parameters
396
+ # @return [WebhookNewEmailPayload]
397
+ def get_test_webhook_payload_new_email(opts = {})
398
+ data, _status_code, _headers = get_test_webhook_payload_new_email_with_http_info(opts)
399
+ data
400
+ end
401
+
402
+ # Get webhook test payload for new email event
403
+ # @param [Hash] opts the optional parameters
404
+ # @return [Array<(WebhookNewEmailPayload, Integer, Hash)>] WebhookNewEmailPayload data, response status code and response headers
405
+ def get_test_webhook_payload_new_email_with_http_info(opts = {})
406
+ if @api_client.config.debugging
407
+ @api_client.config.logger.debug 'Calling API: WebhookControllerApi.get_test_webhook_payload_new_email ...'
408
+ end
409
+ # resource path
410
+ local_var_path = '/webhooks/test/new-email-payload'
411
+
412
+ # query parameters
413
+ query_params = opts[:query_params] || {}
414
+
415
+ # header parameters
416
+ header_params = opts[:header_params] || {}
417
+ # HTTP header 'Accept' (if needed)
418
+ header_params['Accept'] = @api_client.select_header_accept(['application/json'])
419
+
420
+ # form parameters
421
+ form_params = opts[:form_params] || {}
422
+
423
+ # http body (model)
424
+ post_body = opts[:body]
425
+
426
+ # return_type
427
+ return_type = opts[:return_type] || 'WebhookNewEmailPayload'
428
+
429
+ # auth_names
430
+ auth_names = opts[:auth_names] || ['API_KEY']
431
+
432
+ new_options = opts.merge(
433
+ :header_params => header_params,
434
+ :query_params => query_params,
435
+ :form_params => form_params,
436
+ :body => post_body,
437
+ :auth_names => auth_names,
438
+ :return_type => return_type
439
+ )
440
+
441
+ data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options)
442
+ if @api_client.config.debugging
443
+ @api_client.config.logger.debug "API called: WebhookControllerApi#get_test_webhook_payload_new_email\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
444
+ end
445
+ return data, status_code, headers
446
+ end
447
+
286
448
  # Get a webhook for an Inbox
287
449
  # @param webhook_id [String] webhookId
288
450
  # @param [Hash] opts the optional parameters
@@ -13,6 +13,7 @@ OpenAPI Generator version: 4.3.1
13
13
  require 'date'
14
14
 
15
15
  module MailSlurpClient
16
+ # Abstract webhook payload. Use the correct payload type for your webhook event type in order to access all the specific properties for that event. See the `NEW_EMAIL`,`NEW_CONTACT` and `NEW_ATTACHMENT` payloads for the properties available for those events.
16
17
  class AbstractWebhookPayload
17
18
  attr_accessor :event_name
18
19
 
@@ -0,0 +1,312 @@
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://www.mailslurp.com/docs/) - [Examples](https://github.com/mailslurp/examples) repository
5
+
6
+ The version of the OpenAPI document: 6.5.2
7
+
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
+ # NEW_ATTACHMENT webhook payload
17
+ class WebhookNewAttachmentPayload
18
+ # ID of attachment. Use the `AttachmentController` to
19
+ attr_accessor :attachment_id
20
+
21
+ # Size of attachment in bytes
22
+ attr_accessor :content_length
23
+
24
+ # Content type of attachment such as 'image/png' or 'application/pdf
25
+ attr_accessor :content_type
26
+
27
+ # Name of the event type webhook is being triggered for.
28
+ attr_accessor :event_name
29
+
30
+ # Idempotent message ID. Store this ID locally or in a database to prevent message duplication.
31
+ attr_accessor :message_id
32
+
33
+ # Filename of the attachment if present
34
+ attr_accessor :name
35
+
36
+ # ID of webhook entity being triggered
37
+ attr_accessor :webhook_id
38
+
39
+ # Name of the webhook being triggered
40
+ attr_accessor :webhook_name
41
+
42
+ class EnumAttributeValidator
43
+ attr_reader :datatype
44
+ attr_reader :allowable_values
45
+
46
+ def initialize(datatype, allowable_values)
47
+ @allowable_values = allowable_values.map do |value|
48
+ case datatype.to_s
49
+ when /Integer/i
50
+ value.to_i
51
+ when /Float/i
52
+ value.to_f
53
+ else
54
+ value
55
+ end
56
+ end
57
+ end
58
+
59
+ def valid?(value)
60
+ !value || allowable_values.include?(value)
61
+ end
62
+ end
63
+
64
+ # Attribute mapping from ruby-style variable name to JSON key.
65
+ def self.attribute_map
66
+ {
67
+ :'attachment_id' => :'attachmentId',
68
+ :'content_length' => :'contentLength',
69
+ :'content_type' => :'contentType',
70
+ :'event_name' => :'eventName',
71
+ :'message_id' => :'messageId',
72
+ :'name' => :'name',
73
+ :'webhook_id' => :'webhookId',
74
+ :'webhook_name' => :'webhookName'
75
+ }
76
+ end
77
+
78
+ # Attribute type mapping.
79
+ def self.openapi_types
80
+ {
81
+ :'attachment_id' => :'String',
82
+ :'content_length' => :'Integer',
83
+ :'content_type' => :'String',
84
+ :'event_name' => :'String',
85
+ :'message_id' => :'String',
86
+ :'name' => :'String',
87
+ :'webhook_id' => :'String',
88
+ :'webhook_name' => :'String'
89
+ }
90
+ end
91
+
92
+ # List of attributes with nullable: true
93
+ def self.openapi_nullable
94
+ Set.new([
95
+ ])
96
+ end
97
+
98
+ # Initializes the object
99
+ # @param [Hash] attributes Model attributes in the form of hash
100
+ def initialize(attributes = {})
101
+ if (!attributes.is_a?(Hash))
102
+ fail ArgumentError, "The input argument (attributes) must be a hash in `MailSlurpClient::WebhookNewAttachmentPayload` initialize method"
103
+ end
104
+
105
+ # check to see if the attribute exists and convert string to symbol for hash key
106
+ attributes = attributes.each_with_object({}) { |(k, v), h|
107
+ if (!self.class.attribute_map.key?(k.to_sym))
108
+ fail ArgumentError, "`#{k}` is not a valid attribute in `MailSlurpClient::WebhookNewAttachmentPayload`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect
109
+ end
110
+ h[k.to_sym] = v
111
+ }
112
+
113
+ if attributes.key?(:'attachment_id')
114
+ self.attachment_id = attributes[:'attachment_id']
115
+ end
116
+
117
+ if attributes.key?(:'content_length')
118
+ self.content_length = attributes[:'content_length']
119
+ end
120
+
121
+ if attributes.key?(:'content_type')
122
+ self.content_type = attributes[:'content_type']
123
+ end
124
+
125
+ if attributes.key?(:'event_name')
126
+ self.event_name = attributes[:'event_name']
127
+ end
128
+
129
+ if attributes.key?(:'message_id')
130
+ self.message_id = attributes[:'message_id']
131
+ end
132
+
133
+ if attributes.key?(:'name')
134
+ self.name = attributes[:'name']
135
+ end
136
+
137
+ if attributes.key?(:'webhook_id')
138
+ self.webhook_id = attributes[:'webhook_id']
139
+ end
140
+
141
+ if attributes.key?(:'webhook_name')
142
+ self.webhook_name = attributes[:'webhook_name']
143
+ end
144
+ end
145
+
146
+ # Show invalid properties with the reasons. Usually used together with valid?
147
+ # @return Array for valid properties with the reasons
148
+ def list_invalid_properties
149
+ invalid_properties = Array.new
150
+ invalid_properties
151
+ end
152
+
153
+ # Check to see if the all the properties in the model are valid
154
+ # @return true if the model is valid
155
+ def valid?
156
+ event_name_validator = EnumAttributeValidator.new('String', ["EMAIL_RECEIVED", "NEW_EMAIL", "NEW_CONTACT", "NEW_ATTACHMENT"])
157
+ return false unless event_name_validator.valid?(@event_name)
158
+ true
159
+ end
160
+
161
+ # Custom attribute writer method checking allowed values (enum).
162
+ # @param [Object] event_name Object to be assigned
163
+ def event_name=(event_name)
164
+ validator = EnumAttributeValidator.new('String', ["EMAIL_RECEIVED", "NEW_EMAIL", "NEW_CONTACT", "NEW_ATTACHMENT"])
165
+ unless validator.valid?(event_name)
166
+ fail ArgumentError, "invalid value for \"event_name\", must be one of #{validator.allowable_values}."
167
+ end
168
+ @event_name = event_name
169
+ end
170
+
171
+ # Checks equality by comparing each attribute.
172
+ # @param [Object] Object to be compared
173
+ def ==(o)
174
+ return true if self.equal?(o)
175
+ self.class == o.class &&
176
+ attachment_id == o.attachment_id &&
177
+ content_length == o.content_length &&
178
+ content_type == o.content_type &&
179
+ event_name == o.event_name &&
180
+ message_id == o.message_id &&
181
+ name == o.name &&
182
+ webhook_id == o.webhook_id &&
183
+ webhook_name == o.webhook_name
184
+ end
185
+
186
+ # @see the `==` method
187
+ # @param [Object] Object to be compared
188
+ def eql?(o)
189
+ self == o
190
+ end
191
+
192
+ # Calculates hash code according to all attributes.
193
+ # @return [Integer] Hash code
194
+ def hash
195
+ [attachment_id, content_length, content_type, event_name, message_id, name, webhook_id, webhook_name].hash
196
+ end
197
+
198
+ # Builds the object from hash
199
+ # @param [Hash] attributes Model attributes in the form of hash
200
+ # @return [Object] Returns the model itself
201
+ def self.build_from_hash(attributes)
202
+ new.build_from_hash(attributes)
203
+ end
204
+
205
+ # Builds the object from hash
206
+ # @param [Hash] attributes Model attributes in the form of hash
207
+ # @return [Object] Returns the model itself
208
+ def build_from_hash(attributes)
209
+ return nil unless attributes.is_a?(Hash)
210
+ self.class.openapi_types.each_pair do |key, type|
211
+ if type =~ /\AArray<(.*)>/i
212
+ # check to ensure the input is an array given that the attribute
213
+ # is documented as an array but the input is not
214
+ if attributes[self.class.attribute_map[key]].is_a?(Array)
215
+ self.send("#{key}=", attributes[self.class.attribute_map[key]].map { |v| _deserialize($1, v) })
216
+ end
217
+ elsif !attributes[self.class.attribute_map[key]].nil?
218
+ self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]]))
219
+ end # or else data not found in attributes(hash), not an issue as the data can be optional
220
+ end
221
+
222
+ self
223
+ end
224
+
225
+ # Deserializes the data based on type
226
+ # @param string type Data type
227
+ # @param string value Value to be deserialized
228
+ # @return [Object] Deserialized data
229
+ def _deserialize(type, value)
230
+ case type.to_sym
231
+ when :DateTime
232
+ DateTime.parse(value)
233
+ when :Date
234
+ Date.parse(value)
235
+ when :String
236
+ value.to_s
237
+ when :Integer
238
+ value.to_i
239
+ when :Float
240
+ value.to_f
241
+ when :Boolean
242
+ if value.to_s =~ /\A(true|t|yes|y|1)\z/i
243
+ true
244
+ else
245
+ false
246
+ end
247
+ when :Object
248
+ # generic object (usually a Hash), return directly
249
+ value
250
+ when /\AArray<(?<inner_type>.+)>\z/
251
+ inner_type = Regexp.last_match[:inner_type]
252
+ value.map { |v| _deserialize(inner_type, v) }
253
+ when /\AHash<(?<k_type>.+?), (?<v_type>.+)>\z/
254
+ k_type = Regexp.last_match[:k_type]
255
+ v_type = Regexp.last_match[:v_type]
256
+ {}.tap do |hash|
257
+ value.each do |k, v|
258
+ hash[_deserialize(k_type, k)] = _deserialize(v_type, v)
259
+ end
260
+ end
261
+ else # model
262
+ MailSlurpClient.const_get(type).build_from_hash(value)
263
+ end
264
+ end
265
+
266
+ # Returns the string representation of the object
267
+ # @return [String] String presentation of the object
268
+ def to_s
269
+ to_hash.to_s
270
+ end
271
+
272
+ # to_body is an alias to to_hash (backward compatibility)
273
+ # @return [Hash] Returns the object in the form of hash
274
+ def to_body
275
+ to_hash
276
+ end
277
+
278
+ # Returns the object in the form of hash
279
+ # @return [Hash] Returns the object in the form of hash
280
+ def to_hash
281
+ hash = {}
282
+ self.class.attribute_map.each_pair do |attr, param|
283
+ value = self.send(attr)
284
+ if value.nil?
285
+ is_nullable = self.class.openapi_nullable.include?(attr)
286
+ next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}"))
287
+ end
288
+
289
+ hash[param] = _to_hash(value)
290
+ end
291
+ hash
292
+ end
293
+
294
+ # Outputs non-array value in the form of hash
295
+ # For object, use to_hash. Otherwise, just return the value
296
+ # @param [Object] value Any valid value
297
+ # @return [Hash] Returns the value in the form of hash
298
+ def _to_hash(value)
299
+ if value.is_a?(Array)
300
+ value.compact.map { |v| _to_hash(v) }
301
+ elsif value.is_a?(Hash)
302
+ {}.tap do |hash|
303
+ value.each { |k, v| hash[k] = _to_hash(v) }
304
+ end
305
+ elsif value.respond_to? :to_hash
306
+ value.to_hash
307
+ else
308
+ value
309
+ end
310
+ end
311
+ end
312
+ end
@@ -0,0 +1,395 @@
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://www.mailslurp.com/docs/) - [Examples](https://github.com/mailslurp/examples) repository
5
+
6
+ The version of the OpenAPI document: 6.5.2
7
+
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
+ # NEW_CONTACT webhook payload
17
+ class WebhookNewContactPayload
18
+ attr_accessor :company
19
+
20
+ attr_accessor :contact_id
21
+
22
+ attr_accessor :created_at
23
+
24
+ attr_accessor :email_addresses
25
+
26
+ # Name of the event type webhook is being triggered for.
27
+ attr_accessor :event_name
28
+
29
+ attr_accessor :first_name
30
+
31
+ attr_accessor :group_id
32
+
33
+ attr_accessor :last_name
34
+
35
+ # Idempotent message ID. Store this ID locally or in a database to prevent message duplication.
36
+ attr_accessor :message_id
37
+
38
+ attr_accessor :meta_data
39
+
40
+ attr_accessor :opt_out
41
+
42
+ attr_accessor :primary_email_address
43
+
44
+ attr_accessor :tags
45
+
46
+ # ID of webhook entity being triggered
47
+ attr_accessor :webhook_id
48
+
49
+ # Name of the webhook being triggered
50
+ attr_accessor :webhook_name
51
+
52
+ class EnumAttributeValidator
53
+ attr_reader :datatype
54
+ attr_reader :allowable_values
55
+
56
+ def initialize(datatype, allowable_values)
57
+ @allowable_values = allowable_values.map do |value|
58
+ case datatype.to_s
59
+ when /Integer/i
60
+ value.to_i
61
+ when /Float/i
62
+ value.to_f
63
+ else
64
+ value
65
+ end
66
+ end
67
+ end
68
+
69
+ def valid?(value)
70
+ !value || allowable_values.include?(value)
71
+ end
72
+ end
73
+
74
+ # Attribute mapping from ruby-style variable name to JSON key.
75
+ def self.attribute_map
76
+ {
77
+ :'company' => :'company',
78
+ :'contact_id' => :'contactId',
79
+ :'created_at' => :'createdAt',
80
+ :'email_addresses' => :'emailAddresses',
81
+ :'event_name' => :'eventName',
82
+ :'first_name' => :'firstName',
83
+ :'group_id' => :'groupId',
84
+ :'last_name' => :'lastName',
85
+ :'message_id' => :'messageId',
86
+ :'meta_data' => :'metaData',
87
+ :'opt_out' => :'optOut',
88
+ :'primary_email_address' => :'primaryEmailAddress',
89
+ :'tags' => :'tags',
90
+ :'webhook_id' => :'webhookId',
91
+ :'webhook_name' => :'webhookName'
92
+ }
93
+ end
94
+
95
+ # Attribute type mapping.
96
+ def self.openapi_types
97
+ {
98
+ :'company' => :'String',
99
+ :'contact_id' => :'String',
100
+ :'created_at' => :'DateTime',
101
+ :'email_addresses' => :'Array<String>',
102
+ :'event_name' => :'String',
103
+ :'first_name' => :'String',
104
+ :'group_id' => :'String',
105
+ :'last_name' => :'String',
106
+ :'message_id' => :'String',
107
+ :'meta_data' => :'Object',
108
+ :'opt_out' => :'Boolean',
109
+ :'primary_email_address' => :'String',
110
+ :'tags' => :'Array<String>',
111
+ :'webhook_id' => :'String',
112
+ :'webhook_name' => :'String'
113
+ }
114
+ end
115
+
116
+ # List of attributes with nullable: true
117
+ def self.openapi_nullable
118
+ Set.new([
119
+ ])
120
+ end
121
+
122
+ # Initializes the object
123
+ # @param [Hash] attributes Model attributes in the form of hash
124
+ def initialize(attributes = {})
125
+ if (!attributes.is_a?(Hash))
126
+ fail ArgumentError, "The input argument (attributes) must be a hash in `MailSlurpClient::WebhookNewContactPayload` initialize method"
127
+ end
128
+
129
+ # check to see if the attribute exists and convert string to symbol for hash key
130
+ attributes = attributes.each_with_object({}) { |(k, v), h|
131
+ if (!self.class.attribute_map.key?(k.to_sym))
132
+ fail ArgumentError, "`#{k}` is not a valid attribute in `MailSlurpClient::WebhookNewContactPayload`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect
133
+ end
134
+ h[k.to_sym] = v
135
+ }
136
+
137
+ if attributes.key?(:'company')
138
+ self.company = attributes[:'company']
139
+ end
140
+
141
+ if attributes.key?(:'contact_id')
142
+ self.contact_id = attributes[:'contact_id']
143
+ end
144
+
145
+ if attributes.key?(:'created_at')
146
+ self.created_at = attributes[:'created_at']
147
+ end
148
+
149
+ if attributes.key?(:'email_addresses')
150
+ if (value = attributes[:'email_addresses']).is_a?(Array)
151
+ self.email_addresses = value
152
+ end
153
+ end
154
+
155
+ if attributes.key?(:'event_name')
156
+ self.event_name = attributes[:'event_name']
157
+ end
158
+
159
+ if attributes.key?(:'first_name')
160
+ self.first_name = attributes[:'first_name']
161
+ end
162
+
163
+ if attributes.key?(:'group_id')
164
+ self.group_id = attributes[:'group_id']
165
+ end
166
+
167
+ if attributes.key?(:'last_name')
168
+ self.last_name = attributes[:'last_name']
169
+ end
170
+
171
+ if attributes.key?(:'message_id')
172
+ self.message_id = attributes[:'message_id']
173
+ end
174
+
175
+ if attributes.key?(:'meta_data')
176
+ self.meta_data = attributes[:'meta_data']
177
+ end
178
+
179
+ if attributes.key?(:'opt_out')
180
+ self.opt_out = attributes[:'opt_out']
181
+ end
182
+
183
+ if attributes.key?(:'primary_email_address')
184
+ self.primary_email_address = attributes[:'primary_email_address']
185
+ end
186
+
187
+ if attributes.key?(:'tags')
188
+ if (value = attributes[:'tags']).is_a?(Array)
189
+ self.tags = value
190
+ end
191
+ end
192
+
193
+ if attributes.key?(:'webhook_id')
194
+ self.webhook_id = attributes[:'webhook_id']
195
+ end
196
+
197
+ if attributes.key?(:'webhook_name')
198
+ self.webhook_name = attributes[:'webhook_name']
199
+ end
200
+ end
201
+
202
+ # Show invalid properties with the reasons. Usually used together with valid?
203
+ # @return Array for valid properties with the reasons
204
+ def list_invalid_properties
205
+ invalid_properties = Array.new
206
+ if @contact_id.nil?
207
+ invalid_properties.push('invalid value for "contact_id", contact_id cannot be nil.')
208
+ end
209
+
210
+ if @created_at.nil?
211
+ invalid_properties.push('invalid value for "created_at", created_at cannot be nil.')
212
+ end
213
+
214
+ if @email_addresses.nil?
215
+ invalid_properties.push('invalid value for "email_addresses", email_addresses cannot be nil.')
216
+ end
217
+
218
+ if @tags.nil?
219
+ invalid_properties.push('invalid value for "tags", tags cannot be nil.')
220
+ end
221
+
222
+ invalid_properties
223
+ end
224
+
225
+ # Check to see if the all the properties in the model are valid
226
+ # @return true if the model is valid
227
+ def valid?
228
+ return false if @contact_id.nil?
229
+ return false if @created_at.nil?
230
+ return false if @email_addresses.nil?
231
+ event_name_validator = EnumAttributeValidator.new('String', ["EMAIL_RECEIVED", "NEW_EMAIL", "NEW_CONTACT", "NEW_ATTACHMENT"])
232
+ return false unless event_name_validator.valid?(@event_name)
233
+ return false if @tags.nil?
234
+ true
235
+ end
236
+
237
+ # Custom attribute writer method checking allowed values (enum).
238
+ # @param [Object] event_name Object to be assigned
239
+ def event_name=(event_name)
240
+ validator = EnumAttributeValidator.new('String', ["EMAIL_RECEIVED", "NEW_EMAIL", "NEW_CONTACT", "NEW_ATTACHMENT"])
241
+ unless validator.valid?(event_name)
242
+ fail ArgumentError, "invalid value for \"event_name\", must be one of #{validator.allowable_values}."
243
+ end
244
+ @event_name = event_name
245
+ end
246
+
247
+ # Checks equality by comparing each attribute.
248
+ # @param [Object] Object to be compared
249
+ def ==(o)
250
+ return true if self.equal?(o)
251
+ self.class == o.class &&
252
+ company == o.company &&
253
+ contact_id == o.contact_id &&
254
+ created_at == o.created_at &&
255
+ email_addresses == o.email_addresses &&
256
+ event_name == o.event_name &&
257
+ first_name == o.first_name &&
258
+ group_id == o.group_id &&
259
+ last_name == o.last_name &&
260
+ message_id == o.message_id &&
261
+ meta_data == o.meta_data &&
262
+ opt_out == o.opt_out &&
263
+ primary_email_address == o.primary_email_address &&
264
+ tags == o.tags &&
265
+ webhook_id == o.webhook_id &&
266
+ webhook_name == o.webhook_name
267
+ end
268
+
269
+ # @see the `==` method
270
+ # @param [Object] Object to be compared
271
+ def eql?(o)
272
+ self == o
273
+ end
274
+
275
+ # Calculates hash code according to all attributes.
276
+ # @return [Integer] Hash code
277
+ def hash
278
+ [company, contact_id, created_at, email_addresses, event_name, first_name, group_id, last_name, message_id, meta_data, opt_out, primary_email_address, tags, webhook_id, webhook_name].hash
279
+ end
280
+
281
+ # Builds the object from hash
282
+ # @param [Hash] attributes Model attributes in the form of hash
283
+ # @return [Object] Returns the model itself
284
+ def self.build_from_hash(attributes)
285
+ new.build_from_hash(attributes)
286
+ end
287
+
288
+ # Builds the object from hash
289
+ # @param [Hash] attributes Model attributes in the form of hash
290
+ # @return [Object] Returns the model itself
291
+ def build_from_hash(attributes)
292
+ return nil unless attributes.is_a?(Hash)
293
+ self.class.openapi_types.each_pair do |key, type|
294
+ if type =~ /\AArray<(.*)>/i
295
+ # check to ensure the input is an array given that the attribute
296
+ # is documented as an array but the input is not
297
+ if attributes[self.class.attribute_map[key]].is_a?(Array)
298
+ self.send("#{key}=", attributes[self.class.attribute_map[key]].map { |v| _deserialize($1, v) })
299
+ end
300
+ elsif !attributes[self.class.attribute_map[key]].nil?
301
+ self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]]))
302
+ end # or else data not found in attributes(hash), not an issue as the data can be optional
303
+ end
304
+
305
+ self
306
+ end
307
+
308
+ # Deserializes the data based on type
309
+ # @param string type Data type
310
+ # @param string value Value to be deserialized
311
+ # @return [Object] Deserialized data
312
+ def _deserialize(type, value)
313
+ case type.to_sym
314
+ when :DateTime
315
+ DateTime.parse(value)
316
+ when :Date
317
+ Date.parse(value)
318
+ when :String
319
+ value.to_s
320
+ when :Integer
321
+ value.to_i
322
+ when :Float
323
+ value.to_f
324
+ when :Boolean
325
+ if value.to_s =~ /\A(true|t|yes|y|1)\z/i
326
+ true
327
+ else
328
+ false
329
+ end
330
+ when :Object
331
+ # generic object (usually a Hash), return directly
332
+ value
333
+ when /\AArray<(?<inner_type>.+)>\z/
334
+ inner_type = Regexp.last_match[:inner_type]
335
+ value.map { |v| _deserialize(inner_type, v) }
336
+ when /\AHash<(?<k_type>.+?), (?<v_type>.+)>\z/
337
+ k_type = Regexp.last_match[:k_type]
338
+ v_type = Regexp.last_match[:v_type]
339
+ {}.tap do |hash|
340
+ value.each do |k, v|
341
+ hash[_deserialize(k_type, k)] = _deserialize(v_type, v)
342
+ end
343
+ end
344
+ else # model
345
+ MailSlurpClient.const_get(type).build_from_hash(value)
346
+ end
347
+ end
348
+
349
+ # Returns the string representation of the object
350
+ # @return [String] String presentation of the object
351
+ def to_s
352
+ to_hash.to_s
353
+ end
354
+
355
+ # to_body is an alias to to_hash (backward compatibility)
356
+ # @return [Hash] Returns the object in the form of hash
357
+ def to_body
358
+ to_hash
359
+ end
360
+
361
+ # Returns the object in the form of hash
362
+ # @return [Hash] Returns the object in the form of hash
363
+ def to_hash
364
+ hash = {}
365
+ self.class.attribute_map.each_pair do |attr, param|
366
+ value = self.send(attr)
367
+ if value.nil?
368
+ is_nullable = self.class.openapi_nullable.include?(attr)
369
+ next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}"))
370
+ end
371
+
372
+ hash[param] = _to_hash(value)
373
+ end
374
+ hash
375
+ end
376
+
377
+ # Outputs non-array value in the form of hash
378
+ # For object, use to_hash. Otherwise, just return the value
379
+ # @param [Object] value Any valid value
380
+ # @return [Hash] Returns the value in the form of hash
381
+ def _to_hash(value)
382
+ if value.is_a?(Array)
383
+ value.compact.map { |v| _to_hash(v) }
384
+ elsif value.is_a?(Hash)
385
+ {}.tap do |hash|
386
+ value.each { |k, v| hash[k] = _to_hash(v) }
387
+ end
388
+ elsif value.respond_to? :to_hash
389
+ value.to_hash
390
+ else
391
+ value
392
+ end
393
+ end
394
+ end
395
+ end
@@ -0,0 +1,370 @@
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://www.mailslurp.com/docs/) - [Examples](https://github.com/mailslurp/examples) repository
5
+
6
+ The version of the OpenAPI document: 6.5.2
7
+
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
+ # NEW_EMAIL webhook payload
17
+ class WebhookNewEmailPayload
18
+ # List of attachment meta data objects if attachments present
19
+ attr_accessor :attachment_meta_datas
20
+
21
+ # List of `BCC` recipients email was addressed to
22
+ attr_accessor :bcc
23
+
24
+ # List of `CC` recipients email was addressed to
25
+ attr_accessor :cc
26
+
27
+ # Date time of event creation
28
+ attr_accessor :created_at
29
+
30
+ # ID of the email that was received. Use this ID for fetching the email with the `EmailController`.
31
+ attr_accessor :email_id
32
+
33
+ # Name of the event type webhook is being triggered for.
34
+ attr_accessor :event_name
35
+
36
+ # Who the email was sent from
37
+ attr_accessor :from
38
+
39
+ # Id of the inbox that received an email
40
+ attr_accessor :inbox_id
41
+
42
+ # Idempotent message ID. Store this ID locally or in a database to prevent message duplication.
43
+ attr_accessor :message_id
44
+
45
+ # The subject line of the email message
46
+ attr_accessor :subject
47
+
48
+ # List of `To` recipients that email was addressed to
49
+ attr_accessor :to
50
+
51
+ # ID of webhook entity being triggered
52
+ attr_accessor :webhook_id
53
+
54
+ # Name of the webhook being triggered
55
+ attr_accessor :webhook_name
56
+
57
+ class EnumAttributeValidator
58
+ attr_reader :datatype
59
+ attr_reader :allowable_values
60
+
61
+ def initialize(datatype, allowable_values)
62
+ @allowable_values = allowable_values.map do |value|
63
+ case datatype.to_s
64
+ when /Integer/i
65
+ value.to_i
66
+ when /Float/i
67
+ value.to_f
68
+ else
69
+ value
70
+ end
71
+ end
72
+ end
73
+
74
+ def valid?(value)
75
+ !value || allowable_values.include?(value)
76
+ end
77
+ end
78
+
79
+ # Attribute mapping from ruby-style variable name to JSON key.
80
+ def self.attribute_map
81
+ {
82
+ :'attachment_meta_datas' => :'attachmentMetaDatas',
83
+ :'bcc' => :'bcc',
84
+ :'cc' => :'cc',
85
+ :'created_at' => :'createdAt',
86
+ :'email_id' => :'emailId',
87
+ :'event_name' => :'eventName',
88
+ :'from' => :'from',
89
+ :'inbox_id' => :'inboxId',
90
+ :'message_id' => :'messageId',
91
+ :'subject' => :'subject',
92
+ :'to' => :'to',
93
+ :'webhook_id' => :'webhookId',
94
+ :'webhook_name' => :'webhookName'
95
+ }
96
+ end
97
+
98
+ # Attribute type mapping.
99
+ def self.openapi_types
100
+ {
101
+ :'attachment_meta_datas' => :'Array<AttachmentMetaData>',
102
+ :'bcc' => :'Array<String>',
103
+ :'cc' => :'Array<String>',
104
+ :'created_at' => :'DateTime',
105
+ :'email_id' => :'String',
106
+ :'event_name' => :'String',
107
+ :'from' => :'String',
108
+ :'inbox_id' => :'String',
109
+ :'message_id' => :'String',
110
+ :'subject' => :'String',
111
+ :'to' => :'Array<String>',
112
+ :'webhook_id' => :'String',
113
+ :'webhook_name' => :'String'
114
+ }
115
+ end
116
+
117
+ # List of attributes with nullable: true
118
+ def self.openapi_nullable
119
+ Set.new([
120
+ ])
121
+ end
122
+
123
+ # Initializes the object
124
+ # @param [Hash] attributes Model attributes in the form of hash
125
+ def initialize(attributes = {})
126
+ if (!attributes.is_a?(Hash))
127
+ fail ArgumentError, "The input argument (attributes) must be a hash in `MailSlurpClient::WebhookNewEmailPayload` initialize method"
128
+ end
129
+
130
+ # check to see if the attribute exists and convert string to symbol for hash key
131
+ attributes = attributes.each_with_object({}) { |(k, v), h|
132
+ if (!self.class.attribute_map.key?(k.to_sym))
133
+ fail ArgumentError, "`#{k}` is not a valid attribute in `MailSlurpClient::WebhookNewEmailPayload`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect
134
+ end
135
+ h[k.to_sym] = v
136
+ }
137
+
138
+ if attributes.key?(:'attachment_meta_datas')
139
+ if (value = attributes[:'attachment_meta_datas']).is_a?(Array)
140
+ self.attachment_meta_datas = value
141
+ end
142
+ end
143
+
144
+ if attributes.key?(:'bcc')
145
+ if (value = attributes[:'bcc']).is_a?(Array)
146
+ self.bcc = value
147
+ end
148
+ end
149
+
150
+ if attributes.key?(:'cc')
151
+ if (value = attributes[:'cc']).is_a?(Array)
152
+ self.cc = value
153
+ end
154
+ end
155
+
156
+ if attributes.key?(:'created_at')
157
+ self.created_at = attributes[:'created_at']
158
+ end
159
+
160
+ if attributes.key?(:'email_id')
161
+ self.email_id = attributes[:'email_id']
162
+ end
163
+
164
+ if attributes.key?(:'event_name')
165
+ self.event_name = attributes[:'event_name']
166
+ end
167
+
168
+ if attributes.key?(:'from')
169
+ self.from = attributes[:'from']
170
+ end
171
+
172
+ if attributes.key?(:'inbox_id')
173
+ self.inbox_id = attributes[:'inbox_id']
174
+ end
175
+
176
+ if attributes.key?(:'message_id')
177
+ self.message_id = attributes[:'message_id']
178
+ end
179
+
180
+ if attributes.key?(:'subject')
181
+ self.subject = attributes[:'subject']
182
+ end
183
+
184
+ if attributes.key?(:'to')
185
+ if (value = attributes[:'to']).is_a?(Array)
186
+ self.to = value
187
+ end
188
+ end
189
+
190
+ if attributes.key?(:'webhook_id')
191
+ self.webhook_id = attributes[:'webhook_id']
192
+ end
193
+
194
+ if attributes.key?(:'webhook_name')
195
+ self.webhook_name = attributes[:'webhook_name']
196
+ end
197
+ end
198
+
199
+ # Show invalid properties with the reasons. Usually used together with valid?
200
+ # @return Array for valid properties with the reasons
201
+ def list_invalid_properties
202
+ invalid_properties = Array.new
203
+ invalid_properties
204
+ end
205
+
206
+ # Check to see if the all the properties in the model are valid
207
+ # @return true if the model is valid
208
+ def valid?
209
+ event_name_validator = EnumAttributeValidator.new('String', ["EMAIL_RECEIVED", "NEW_EMAIL", "NEW_CONTACT", "NEW_ATTACHMENT"])
210
+ return false unless event_name_validator.valid?(@event_name)
211
+ true
212
+ end
213
+
214
+ # Custom attribute writer method checking allowed values (enum).
215
+ # @param [Object] event_name Object to be assigned
216
+ def event_name=(event_name)
217
+ validator = EnumAttributeValidator.new('String', ["EMAIL_RECEIVED", "NEW_EMAIL", "NEW_CONTACT", "NEW_ATTACHMENT"])
218
+ unless validator.valid?(event_name)
219
+ fail ArgumentError, "invalid value for \"event_name\", must be one of #{validator.allowable_values}."
220
+ end
221
+ @event_name = event_name
222
+ end
223
+
224
+ # Checks equality by comparing each attribute.
225
+ # @param [Object] Object to be compared
226
+ def ==(o)
227
+ return true if self.equal?(o)
228
+ self.class == o.class &&
229
+ attachment_meta_datas == o.attachment_meta_datas &&
230
+ bcc == o.bcc &&
231
+ cc == o.cc &&
232
+ created_at == o.created_at &&
233
+ email_id == o.email_id &&
234
+ event_name == o.event_name &&
235
+ from == o.from &&
236
+ inbox_id == o.inbox_id &&
237
+ message_id == o.message_id &&
238
+ subject == o.subject &&
239
+ to == o.to &&
240
+ webhook_id == o.webhook_id &&
241
+ webhook_name == o.webhook_name
242
+ end
243
+
244
+ # @see the `==` method
245
+ # @param [Object] Object to be compared
246
+ def eql?(o)
247
+ self == o
248
+ end
249
+
250
+ # Calculates hash code according to all attributes.
251
+ # @return [Integer] Hash code
252
+ def hash
253
+ [attachment_meta_datas, bcc, cc, created_at, email_id, event_name, from, inbox_id, message_id, subject, to, webhook_id, webhook_name].hash
254
+ end
255
+
256
+ # Builds the object from hash
257
+ # @param [Hash] attributes Model attributes in the form of hash
258
+ # @return [Object] Returns the model itself
259
+ def self.build_from_hash(attributes)
260
+ new.build_from_hash(attributes)
261
+ end
262
+
263
+ # Builds the object from hash
264
+ # @param [Hash] attributes Model attributes in the form of hash
265
+ # @return [Object] Returns the model itself
266
+ def build_from_hash(attributes)
267
+ return nil unless attributes.is_a?(Hash)
268
+ self.class.openapi_types.each_pair do |key, type|
269
+ if type =~ /\AArray<(.*)>/i
270
+ # check to ensure the input is an array given that the attribute
271
+ # is documented as an array but the input is not
272
+ if attributes[self.class.attribute_map[key]].is_a?(Array)
273
+ self.send("#{key}=", attributes[self.class.attribute_map[key]].map { |v| _deserialize($1, v) })
274
+ end
275
+ elsif !attributes[self.class.attribute_map[key]].nil?
276
+ self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]]))
277
+ end # or else data not found in attributes(hash), not an issue as the data can be optional
278
+ end
279
+
280
+ self
281
+ end
282
+
283
+ # Deserializes the data based on type
284
+ # @param string type Data type
285
+ # @param string value Value to be deserialized
286
+ # @return [Object] Deserialized data
287
+ def _deserialize(type, value)
288
+ case type.to_sym
289
+ when :DateTime
290
+ DateTime.parse(value)
291
+ when :Date
292
+ Date.parse(value)
293
+ when :String
294
+ value.to_s
295
+ when :Integer
296
+ value.to_i
297
+ when :Float
298
+ value.to_f
299
+ when :Boolean
300
+ if value.to_s =~ /\A(true|t|yes|y|1)\z/i
301
+ true
302
+ else
303
+ false
304
+ end
305
+ when :Object
306
+ # generic object (usually a Hash), return directly
307
+ value
308
+ when /\AArray<(?<inner_type>.+)>\z/
309
+ inner_type = Regexp.last_match[:inner_type]
310
+ value.map { |v| _deserialize(inner_type, v) }
311
+ when /\AHash<(?<k_type>.+?), (?<v_type>.+)>\z/
312
+ k_type = Regexp.last_match[:k_type]
313
+ v_type = Regexp.last_match[:v_type]
314
+ {}.tap do |hash|
315
+ value.each do |k, v|
316
+ hash[_deserialize(k_type, k)] = _deserialize(v_type, v)
317
+ end
318
+ end
319
+ else # model
320
+ MailSlurpClient.const_get(type).build_from_hash(value)
321
+ end
322
+ end
323
+
324
+ # Returns the string representation of the object
325
+ # @return [String] String presentation of the object
326
+ def to_s
327
+ to_hash.to_s
328
+ end
329
+
330
+ # to_body is an alias to to_hash (backward compatibility)
331
+ # @return [Hash] Returns the object in the form of hash
332
+ def to_body
333
+ to_hash
334
+ end
335
+
336
+ # Returns the object in the form of hash
337
+ # @return [Hash] Returns the object in the form of hash
338
+ def to_hash
339
+ hash = {}
340
+ self.class.attribute_map.each_pair do |attr, param|
341
+ value = self.send(attr)
342
+ if value.nil?
343
+ is_nullable = self.class.openapi_nullable.include?(attr)
344
+ next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}"))
345
+ end
346
+
347
+ hash[param] = _to_hash(value)
348
+ end
349
+ hash
350
+ end
351
+
352
+ # Outputs non-array value in the form of hash
353
+ # For object, use to_hash. Otherwise, just return the value
354
+ # @param [Object] value Any valid value
355
+ # @return [Hash] Returns the value in the form of hash
356
+ def _to_hash(value)
357
+ if value.is_a?(Array)
358
+ value.compact.map { |v| _to_hash(v) }
359
+ elsif value.is_a?(Hash)
360
+ {}.tap do |hash|
361
+ value.each { |k, v| hash[k] = _to_hash(v) }
362
+ end
363
+ elsif value.respond_to? :to_hash
364
+ value.to_hash
365
+ else
366
+ value
367
+ end
368
+ end
369
+ end
370
+ end
@@ -11,5 +11,5 @@ OpenAPI Generator version: 4.3.1
11
11
  =end
12
12
 
13
13
  module MailSlurpClient
14
- VERSION = '12.1.22'
14
+ VERSION = '12.1.23'
15
15
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: mailslurp_client
3
3
  version: !ruby/object:Gem::Version
4
- version: 12.1.22
4
+ version: 12.1.23
5
5
  platform: ruby
6
6
  authors:
7
7
  - mailslurp
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2021-06-05 00:00:00.000000000 Z
11
+ date: 2021-06-06 00:00:00.000000000 Z
12
12
  dependencies: []
13
13
  description: Create emails addresses in Ruby then send and receive real emails and
14
14
  attachments. See https://www.mailslurp.com/docs/ruby/ for full Ruby documentation.
@@ -134,6 +134,9 @@ files:
134
134
  - lib/mailslurp_client/models/verify_email_address_options.rb
135
135
  - lib/mailslurp_client/models/wait_for_conditions.rb
136
136
  - lib/mailslurp_client/models/webhook_dto.rb
137
+ - lib/mailslurp_client/models/webhook_new_attachment_payload.rb
138
+ - lib/mailslurp_client/models/webhook_new_contact_payload.rb
139
+ - lib/mailslurp_client/models/webhook_new_email_payload.rb
137
140
  - lib/mailslurp_client/models/webhook_projection.rb
138
141
  - lib/mailslurp_client/models/webhook_test_request.rb
139
142
  - lib/mailslurp_client/models/webhook_test_response.rb