mailslurp_client 8.4.3 → 8.5.0
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:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: ae83a71f4c8140c751543b86a6798211fab9b535017eb58e39127c232a63dbea
|
4
|
+
data.tar.gz: a47c552fc604c48cf8ebe33912d1f312f0d2f3579df90b45732db83f144b974a
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 517f0cb1ee268bb3c25dc8c73a26c2361401a206c1407c85cfafbfb13feb021ed7af0500b48c81996a68d0380c14268b3a9539d525272ffd22b9d678cb8bbe2d
|
7
|
+
data.tar.gz: cb9241aade524718699f526f0f09344d227fcf5618c4c1cd20fcff166174bdcd0f1a90f469441c4def3050829fe3be62a003fbc0394034d8d57301eb6c2181d7
|
@@ -288,6 +288,79 @@ module MailSlurpClient
|
|
288
288
|
return data, status_code, headers
|
289
289
|
end
|
290
290
|
|
291
|
+
# Wait for or return the first email that matches proved MatchOptions array
|
292
|
+
# Perform a search of emails in an inbox with the given patterns. If a result if found then return or else retry the search until a result is found or timeout is reached. Match options allow simple CONTAINS or EQUALS filtering on SUBJECT, TO, BCC, CC, and FROM. See the `MatchOptions` object for options. An example payload is `{ matches: [{field: 'SUBJECT',should:'CONTAIN',value:'needle'}] }`. You can use an array of matches and they will be applied sequentially to filter out emails. If you want to perform matches and extractions of content using Regex patterns see the EmailController `getEmailContentMatch` method.
|
293
|
+
# @param match_options [MatchOptions] matchOptions
|
294
|
+
# @param [Hash] opts the optional parameters
|
295
|
+
# @option opts [String] :inbox_id Id of the inbox we are matching an email for
|
296
|
+
# @option opts [Integer] :timeout Max milliseconds to wait
|
297
|
+
# @option opts [Boolean] :unread_only Optional filter for unread only (default to false)
|
298
|
+
# @return [Email]
|
299
|
+
def wait_for_matching_first_email(match_options, opts = {})
|
300
|
+
data, _status_code, _headers = wait_for_matching_first_email_with_http_info(match_options, opts)
|
301
|
+
data
|
302
|
+
end
|
303
|
+
|
304
|
+
# Wait for or return the first email that matches proved MatchOptions array
|
305
|
+
# Perform a search of emails in an inbox with the given patterns. If a result if found then return or else retry the search until a result is found or timeout is reached. Match options allow simple CONTAINS or EQUALS filtering on SUBJECT, TO, BCC, CC, and FROM. See the `MatchOptions` object for options. An example payload is `{ matches: [{field: 'SUBJECT',should:'CONTAIN',value:'needle'}] }`. You can use an array of matches and they will be applied sequentially to filter out emails. If you want to perform matches and extractions of content using Regex patterns see the EmailController `getEmailContentMatch` method.
|
306
|
+
# @param match_options [MatchOptions] matchOptions
|
307
|
+
# @param [Hash] opts the optional parameters
|
308
|
+
# @option opts [String] :inbox_id Id of the inbox we are matching an email for
|
309
|
+
# @option opts [Integer] :timeout Max milliseconds to wait
|
310
|
+
# @option opts [Boolean] :unread_only Optional filter for unread only
|
311
|
+
# @return [Array<(Email, Integer, Hash)>] Email data, response status code and response headers
|
312
|
+
def wait_for_matching_first_email_with_http_info(match_options, opts = {})
|
313
|
+
if @api_client.config.debugging
|
314
|
+
@api_client.config.logger.debug 'Calling API: WaitForControllerApi.wait_for_matching_first_email ...'
|
315
|
+
end
|
316
|
+
# verify the required parameter 'match_options' is set
|
317
|
+
if @api_client.config.client_side_validation && match_options.nil?
|
318
|
+
fail ArgumentError, "Missing the required parameter 'match_options' when calling WaitForControllerApi.wait_for_matching_first_email"
|
319
|
+
end
|
320
|
+
# resource path
|
321
|
+
local_var_path = '/waitForMatchingFirstEmail'
|
322
|
+
|
323
|
+
# query parameters
|
324
|
+
query_params = opts[:query_params] || {}
|
325
|
+
query_params[:'inboxId'] = opts[:'inbox_id'] if !opts[:'inbox_id'].nil?
|
326
|
+
query_params[:'timeout'] = opts[:'timeout'] if !opts[:'timeout'].nil?
|
327
|
+
query_params[:'unreadOnly'] = opts[:'unread_only'] if !opts[:'unread_only'].nil?
|
328
|
+
|
329
|
+
# header parameters
|
330
|
+
header_params = opts[:header_params] || {}
|
331
|
+
# HTTP header 'Accept' (if needed)
|
332
|
+
header_params['Accept'] = @api_client.select_header_accept(['application/json'])
|
333
|
+
# HTTP header 'Content-Type'
|
334
|
+
header_params['Content-Type'] = @api_client.select_header_content_type(['application/json'])
|
335
|
+
|
336
|
+
# form parameters
|
337
|
+
form_params = opts[:form_params] || {}
|
338
|
+
|
339
|
+
# http body (model)
|
340
|
+
post_body = opts[:body] || @api_client.object_to_http_body(match_options)
|
341
|
+
|
342
|
+
# return_type
|
343
|
+
return_type = opts[:return_type] || 'Email'
|
344
|
+
|
345
|
+
# auth_names
|
346
|
+
auth_names = opts[:auth_names] || ['API_KEY']
|
347
|
+
|
348
|
+
new_options = opts.merge(
|
349
|
+
:header_params => header_params,
|
350
|
+
:query_params => query_params,
|
351
|
+
:form_params => form_params,
|
352
|
+
:body => post_body,
|
353
|
+
:auth_names => auth_names,
|
354
|
+
:return_type => return_type
|
355
|
+
)
|
356
|
+
|
357
|
+
data, status_code, headers = @api_client.call_api(:POST, local_var_path, new_options)
|
358
|
+
if @api_client.config.debugging
|
359
|
+
@api_client.config.logger.debug "API called: WaitForControllerApi#wait_for_matching_first_email\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
360
|
+
end
|
361
|
+
return data, status_code, headers
|
362
|
+
end
|
363
|
+
|
291
364
|
# Wait for or fetch the email with a given index in the inbox specified
|
292
365
|
# If nth email is already present in inbox then return it. If not hold the connection open until timeout expires or the nth email is received and returned.
|
293
366
|
# @param [Hash] opts the optional parameters
|