mailslurp_client 12.8.4 → 13.0.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: bea62829614880a7c645e8e9a4dc518483e8ab8e95676b2f011a1303ffb79035
|
4
|
+
data.tar.gz: ec1af163c0cb73eabc435efaec48adcb424b7e74f37f873da8b3bd96922dac49
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: d898cbdd4f72407b4694002b5de59f98e7da9d09cbfef7328e585649ead01edd47c3c5e02930725458ee32e1a6d95ef8168b94e3a4afee03bf972cfd4b339e98
|
7
|
+
data.tar.gz: b9b783ae84942f36f063e4f3f21eb130555530eaba0f392401691254fa0218a8c003d20177741814262e4eb95026aca1cdd4306ced8d4625d13fbe6afb6ea562
|
@@ -1136,7 +1136,7 @@ module MailSlurpClient
|
|
1136
1136
|
# Get latest email in all inboxes. Most recently received.
|
1137
1137
|
# Get the newest email in all inboxes or in a passed set of inbox IDs
|
1138
1138
|
# @param [Hash] opts the optional parameters
|
1139
|
-
# @option opts [Array<String>] :inbox_ids Optional set of inboxes to filter by. Only get the latest email from these inbox IDs
|
1139
|
+
# @option opts [Array<String>] :inbox_ids Optional set of inboxes to filter by. Only get the latest email from these inbox IDs. If not provided will search across all inboxes
|
1140
1140
|
# @return [Email]
|
1141
1141
|
def get_latest_email(opts = {})
|
1142
1142
|
data, _status_code, _headers = get_latest_email_with_http_info(opts)
|
@@ -1146,7 +1146,7 @@ module MailSlurpClient
|
|
1146
1146
|
# Get latest email in all inboxes. Most recently received.
|
1147
1147
|
# Get the newest email in all inboxes or in a passed set of inbox IDs
|
1148
1148
|
# @param [Hash] opts the optional parameters
|
1149
|
-
# @option opts [Array<String>] :inbox_ids Optional set of inboxes to filter by. Only get the latest email from these inbox IDs
|
1149
|
+
# @option opts [Array<String>] :inbox_ids Optional set of inboxes to filter by. Only get the latest email from these inbox IDs. If not provided will search across all inboxes
|
1150
1150
|
# @return [Array<(Email, Integer, Hash)>] Email data, response status code and response headers
|
1151
1151
|
def get_latest_email_with_http_info(opts = {})
|
1152
1152
|
if @api_client.config.debugging
|
@@ -1509,6 +1509,71 @@ module MailSlurpClient
|
|
1509
1509
|
return data, status_code, headers
|
1510
1510
|
end
|
1511
1511
|
|
1512
|
+
# Mark an email as read
|
1513
|
+
# Marks an email as read or unread. Pass boolean read flag to set value.
|
1514
|
+
# @param email_id [String] emailId
|
1515
|
+
# @param [Hash] opts the optional parameters
|
1516
|
+
# @option opts [Boolean] :read What value to assign to email read property. Default true. (default to true)
|
1517
|
+
# @return [EmailPreview]
|
1518
|
+
def mark_as_read(email_id, opts = {})
|
1519
|
+
data, _status_code, _headers = mark_as_read_with_http_info(email_id, opts)
|
1520
|
+
data
|
1521
|
+
end
|
1522
|
+
|
1523
|
+
# Mark an email as read
|
1524
|
+
# Marks an email as read or unread. Pass boolean read flag to set value.
|
1525
|
+
# @param email_id [String] emailId
|
1526
|
+
# @param [Hash] opts the optional parameters
|
1527
|
+
# @option opts [Boolean] :read What value to assign to email read property. Default true.
|
1528
|
+
# @return [Array<(EmailPreview, Integer, Hash)>] EmailPreview data, response status code and response headers
|
1529
|
+
def mark_as_read_with_http_info(email_id, opts = {})
|
1530
|
+
if @api_client.config.debugging
|
1531
|
+
@api_client.config.logger.debug 'Calling API: EmailControllerApi.mark_as_read ...'
|
1532
|
+
end
|
1533
|
+
# verify the required parameter 'email_id' is set
|
1534
|
+
if @api_client.config.client_side_validation && email_id.nil?
|
1535
|
+
fail ArgumentError, "Missing the required parameter 'email_id' when calling EmailControllerApi.mark_as_read"
|
1536
|
+
end
|
1537
|
+
# resource path
|
1538
|
+
local_var_path = '/emails/{emailId}/read'.sub('{' + 'emailId' + '}', CGI.escape(email_id.to_s))
|
1539
|
+
|
1540
|
+
# query parameters
|
1541
|
+
query_params = opts[:query_params] || {}
|
1542
|
+
query_params[:'read'] = opts[:'read'] if !opts[:'read'].nil?
|
1543
|
+
|
1544
|
+
# header parameters
|
1545
|
+
header_params = opts[:header_params] || {}
|
1546
|
+
# HTTP header 'Accept' (if needed)
|
1547
|
+
header_params['Accept'] = @api_client.select_header_accept(['application/json'])
|
1548
|
+
|
1549
|
+
# form parameters
|
1550
|
+
form_params = opts[:form_params] || {}
|
1551
|
+
|
1552
|
+
# http body (model)
|
1553
|
+
post_body = opts[:body]
|
1554
|
+
|
1555
|
+
# return_type
|
1556
|
+
return_type = opts[:return_type] || 'EmailPreview'
|
1557
|
+
|
1558
|
+
# auth_names
|
1559
|
+
auth_names = opts[:auth_names] || ['API_KEY']
|
1560
|
+
|
1561
|
+
new_options = opts.merge(
|
1562
|
+
:header_params => header_params,
|
1563
|
+
:query_params => query_params,
|
1564
|
+
:form_params => form_params,
|
1565
|
+
:body => post_body,
|
1566
|
+
:auth_names => auth_names,
|
1567
|
+
:return_type => return_type
|
1568
|
+
)
|
1569
|
+
|
1570
|
+
data, status_code, headers = @api_client.call_api(:PATCH, local_var_path, new_options)
|
1571
|
+
if @api_client.config.debugging
|
1572
|
+
@api_client.config.logger.debug "API called: EmailControllerApi#mark_as_read\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
1573
|
+
end
|
1574
|
+
return data, status_code, headers
|
1575
|
+
end
|
1576
|
+
|
1512
1577
|
# Reply to an email
|
1513
1578
|
# Send the reply to the email sender or reply-to and include same subject cc bcc etc. Reply to an email and the contents will be sent with the existing subject to the emails `to`, `cc`, and `bcc`.
|
1514
1579
|
# @param email_id [String] ID of the email that should be replied to
|
@@ -496,12 +496,14 @@ module MailSlurpClient
|
|
496
496
|
# List emails that an inbox has received. Only emails that are sent to the inbox's email address will appear in the inbox. It may take several seconds for any email you send to an inbox's email address to appear in the inbox. To make this endpoint wait for a minimum number of emails use the `minCount` parameter. The server will retry the inbox database until the `minCount` is satisfied or the `retryTimeout` is reached
|
497
497
|
# @param inbox_id [String] Id of inbox that emails belongs to
|
498
498
|
# @param [Hash] opts the optional parameters
|
499
|
+
# @option opts [Integer] :delay_timeout delayTimeout
|
499
500
|
# @option opts [Integer] :limit Limit the result set, ordered by received date time sort direction. Maximum 100. For more listing options see the email controller
|
500
501
|
# @option opts [Integer] :min_count Minimum acceptable email count. Will cause request to hang (and retry) until minCount is satisfied or retryTimeout is reached.
|
501
502
|
# @option opts [Integer] :retry_timeout Maximum milliseconds to spend retrying inbox database until minCount emails are returned
|
502
503
|
# @option opts [DateTime] :since Exclude emails received before this ISO 8601 date time
|
503
504
|
# @option opts [Integer] :size Alias for limit. Assessed first before assessing any passed limit.
|
504
505
|
# @option opts [String] :sort Sort the results by received date and direction ASC or DESC
|
506
|
+
# @option opts [Boolean] :unread_only unreadOnly
|
505
507
|
# @return [Array<EmailPreview>]
|
506
508
|
def get_emails(inbox_id, opts = {})
|
507
509
|
data, _status_code, _headers = get_emails_with_http_info(inbox_id, opts)
|
@@ -512,12 +514,14 @@ module MailSlurpClient
|
|
512
514
|
# List emails that an inbox has received. Only emails that are sent to the inbox's email address will appear in the inbox. It may take several seconds for any email you send to an inbox's email address to appear in the inbox. To make this endpoint wait for a minimum number of emails use the `minCount` parameter. The server will retry the inbox database until the `minCount` is satisfied or the `retryTimeout` is reached
|
513
515
|
# @param inbox_id [String] Id of inbox that emails belongs to
|
514
516
|
# @param [Hash] opts the optional parameters
|
517
|
+
# @option opts [Integer] :delay_timeout delayTimeout
|
515
518
|
# @option opts [Integer] :limit Limit the result set, ordered by received date time sort direction. Maximum 100. For more listing options see the email controller
|
516
519
|
# @option opts [Integer] :min_count Minimum acceptable email count. Will cause request to hang (and retry) until minCount is satisfied or retryTimeout is reached.
|
517
520
|
# @option opts [Integer] :retry_timeout Maximum milliseconds to spend retrying inbox database until minCount emails are returned
|
518
521
|
# @option opts [DateTime] :since Exclude emails received before this ISO 8601 date time
|
519
522
|
# @option opts [Integer] :size Alias for limit. Assessed first before assessing any passed limit.
|
520
523
|
# @option opts [String] :sort Sort the results by received date and direction ASC or DESC
|
524
|
+
# @option opts [Boolean] :unread_only unreadOnly
|
521
525
|
# @return [Array<(Array<EmailPreview>, Integer, Hash)>] Array<EmailPreview> data, response status code and response headers
|
522
526
|
def get_emails_with_http_info(inbox_id, opts = {})
|
523
527
|
if @api_client.config.debugging
|
@@ -536,12 +540,14 @@ module MailSlurpClient
|
|
536
540
|
|
537
541
|
# query parameters
|
538
542
|
query_params = opts[:query_params] || {}
|
543
|
+
query_params[:'delayTimeout'] = opts[:'delay_timeout'] if !opts[:'delay_timeout'].nil?
|
539
544
|
query_params[:'limit'] = opts[:'limit'] if !opts[:'limit'].nil?
|
540
545
|
query_params[:'minCount'] = opts[:'min_count'] if !opts[:'min_count'].nil?
|
541
546
|
query_params[:'retryTimeout'] = opts[:'retry_timeout'] if !opts[:'retry_timeout'].nil?
|
542
547
|
query_params[:'since'] = opts[:'since'] if !opts[:'since'].nil?
|
543
548
|
query_params[:'size'] = opts[:'size'] if !opts[:'size'].nil?
|
544
549
|
query_params[:'sort'] = opts[:'sort'] if !opts[:'sort'].nil?
|
550
|
+
query_params[:'unreadOnly'] = opts[:'unread_only'] if !opts[:'unread_only'].nil?
|
545
551
|
|
546
552
|
# header parameters
|
547
553
|
header_params = opts[:header_params] || {}
|
@@ -83,7 +83,10 @@ module MailSlurpClient
|
|
83
83
|
# If inbox contains count or more emails at time of request then return count worth of emails. If not wait until the count is reached and return those or return an error if timeout is exceeded.
|
84
84
|
# @param [Hash] opts the optional parameters
|
85
85
|
# @option opts [Integer] :count Number of emails to wait for. Must be greater that 1
|
86
|
+
# @option opts [Integer] :delay Max milliseconds delay between calls
|
86
87
|
# @option opts [String] :inbox_id Id of the inbox we are fetching emails from
|
88
|
+
# @option opts [DateTime] :since Filter for emails that were received after the given timestamp
|
89
|
+
# @option opts [String] :sort Sort direction
|
87
90
|
# @option opts [Integer] :timeout Max milliseconds to wait
|
88
91
|
# @option opts [Boolean] :unread_only Optional filter for unread only (default to false)
|
89
92
|
# @return [Array<EmailPreview>]
|
@@ -96,7 +99,10 @@ module MailSlurpClient
|
|
96
99
|
# If inbox contains count or more emails at time of request then return count worth of emails. If not wait until the count is reached and return those or return an error if timeout is exceeded.
|
97
100
|
# @param [Hash] opts the optional parameters
|
98
101
|
# @option opts [Integer] :count Number of emails to wait for. Must be greater that 1
|
102
|
+
# @option opts [Integer] :delay Max milliseconds delay between calls
|
99
103
|
# @option opts [String] :inbox_id Id of the inbox we are fetching emails from
|
104
|
+
# @option opts [DateTime] :since Filter for emails that were received after the given timestamp
|
105
|
+
# @option opts [String] :sort Sort direction
|
100
106
|
# @option opts [Integer] :timeout Max milliseconds to wait
|
101
107
|
# @option opts [Boolean] :unread_only Optional filter for unread only
|
102
108
|
# @return [Array<(Array<EmailPreview>, Integer, Hash)>] Array<EmailPreview> data, response status code and response headers
|
@@ -104,13 +110,20 @@ module MailSlurpClient
|
|
104
110
|
if @api_client.config.debugging
|
105
111
|
@api_client.config.logger.debug 'Calling API: WaitForControllerApi.wait_for_email_count ...'
|
106
112
|
end
|
113
|
+
allowable_values = ["ASC", "DESC"]
|
114
|
+
if @api_client.config.client_side_validation && opts[:'sort'] && !allowable_values.include?(opts[:'sort'])
|
115
|
+
fail ArgumentError, "invalid value for \"sort\", must be one of #{allowable_values}"
|
116
|
+
end
|
107
117
|
# resource path
|
108
118
|
local_var_path = '/waitForEmailCount'
|
109
119
|
|
110
120
|
# query parameters
|
111
121
|
query_params = opts[:query_params] || {}
|
112
122
|
query_params[:'count'] = opts[:'count'] if !opts[:'count'].nil?
|
123
|
+
query_params[:'delay'] = opts[:'delay'] if !opts[:'delay'].nil?
|
113
124
|
query_params[:'inboxId'] = opts[:'inbox_id'] if !opts[:'inbox_id'].nil?
|
125
|
+
query_params[:'since'] = opts[:'since'] if !opts[:'since'].nil?
|
126
|
+
query_params[:'sort'] = opts[:'sort'] if !opts[:'sort'].nil?
|
114
127
|
query_params[:'timeout'] = opts[:'timeout'] if !opts[:'timeout'].nil?
|
115
128
|
query_params[:'unreadOnly'] = opts[:'unread_only'] if !opts[:'unread_only'].nil?
|
116
129
|
|
@@ -150,7 +163,10 @@ module MailSlurpClient
|
|
150
163
|
# Fetch inbox's latest email or if empty wait for an email to arrive
|
151
164
|
# Will return either the last received email or wait for an email to arrive and return that. If you need to wait for an email for a non-empty inbox set `unreadOnly=true` or see the other receive methods such as `waitForNthEmail` or `waitForEmailCount`.
|
152
165
|
# @param [Hash] opts the optional parameters
|
166
|
+
# @option opts [Integer] :delay Max milliseconds delay between calls
|
153
167
|
# @option opts [String] :inbox_id Id of the inbox we are fetching emails from
|
168
|
+
# @option opts [DateTime] :since Filter for emails that were received after the given timestamp
|
169
|
+
# @option opts [String] :sort Sort direction
|
154
170
|
# @option opts [Integer] :timeout Max milliseconds to wait
|
155
171
|
# @option opts [Boolean] :unread_only Optional filter for unread only. (default to false)
|
156
172
|
# @return [Email]
|
@@ -162,7 +178,10 @@ module MailSlurpClient
|
|
162
178
|
# Fetch inbox's latest email or if empty wait for an email to arrive
|
163
179
|
# Will return either the last received email or wait for an email to arrive and return that. If you need to wait for an email for a non-empty inbox set `unreadOnly=true` or see the other receive methods such as `waitForNthEmail` or `waitForEmailCount`.
|
164
180
|
# @param [Hash] opts the optional parameters
|
181
|
+
# @option opts [Integer] :delay Max milliseconds delay between calls
|
165
182
|
# @option opts [String] :inbox_id Id of the inbox we are fetching emails from
|
183
|
+
# @option opts [DateTime] :since Filter for emails that were received after the given timestamp
|
184
|
+
# @option opts [String] :sort Sort direction
|
166
185
|
# @option opts [Integer] :timeout Max milliseconds to wait
|
167
186
|
# @option opts [Boolean] :unread_only Optional filter for unread only.
|
168
187
|
# @return [Array<(Email, Integer, Hash)>] Email data, response status code and response headers
|
@@ -170,12 +189,19 @@ module MailSlurpClient
|
|
170
189
|
if @api_client.config.debugging
|
171
190
|
@api_client.config.logger.debug 'Calling API: WaitForControllerApi.wait_for_latest_email ...'
|
172
191
|
end
|
192
|
+
allowable_values = ["ASC", "DESC"]
|
193
|
+
if @api_client.config.client_side_validation && opts[:'sort'] && !allowable_values.include?(opts[:'sort'])
|
194
|
+
fail ArgumentError, "invalid value for \"sort\", must be one of #{allowable_values}"
|
195
|
+
end
|
173
196
|
# resource path
|
174
197
|
local_var_path = '/waitForLatestEmail'
|
175
198
|
|
176
199
|
# query parameters
|
177
200
|
query_params = opts[:query_params] || {}
|
201
|
+
query_params[:'delay'] = opts[:'delay'] if !opts[:'delay'].nil?
|
178
202
|
query_params[:'inboxId'] = opts[:'inbox_id'] if !opts[:'inbox_id'].nil?
|
203
|
+
query_params[:'since'] = opts[:'since'] if !opts[:'since'].nil?
|
204
|
+
query_params[:'sort'] = opts[:'sort'] if !opts[:'sort'].nil?
|
179
205
|
query_params[:'timeout'] = opts[:'timeout'] if !opts[:'timeout'].nil?
|
180
206
|
query_params[:'unreadOnly'] = opts[:'unread_only'] if !opts[:'unread_only'].nil?
|
181
207
|
|
@@ -216,8 +242,11 @@ module MailSlurpClient
|
|
216
242
|
# Perform a search of emails in an inbox with the given patterns. If results match expected count then return or else retry the search until results are 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.
|
217
243
|
# @param match_options [MatchOptions] matchOptions
|
218
244
|
# @param [Hash] opts the optional parameters
|
219
|
-
# @option opts [Integer] :count Number of emails to wait for. Must be greater
|
245
|
+
# @option opts [Integer] :count Number of emails to wait for. Must be greater or equal to 1
|
246
|
+
# @option opts [Integer] :delay Max milliseconds delay between calls
|
220
247
|
# @option opts [String] :inbox_id Id of the inbox we are fetching emails from
|
248
|
+
# @option opts [DateTime] :since Filter for emails that were received after the given timestamp
|
249
|
+
# @option opts [String] :sort Sort direction
|
221
250
|
# @option opts [Integer] :timeout Max milliseconds to wait
|
222
251
|
# @option opts [Boolean] :unread_only Optional filter for unread only (default to false)
|
223
252
|
# @return [Array<EmailPreview>]
|
@@ -230,8 +259,11 @@ module MailSlurpClient
|
|
230
259
|
# Perform a search of emails in an inbox with the given patterns. If results match expected count then return or else retry the search until results are 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.
|
231
260
|
# @param match_options [MatchOptions] matchOptions
|
232
261
|
# @param [Hash] opts the optional parameters
|
233
|
-
# @option opts [Integer] :count Number of emails to wait for. Must be greater
|
262
|
+
# @option opts [Integer] :count Number of emails to wait for. Must be greater or equal to 1
|
263
|
+
# @option opts [Integer] :delay Max milliseconds delay between calls
|
234
264
|
# @option opts [String] :inbox_id Id of the inbox we are fetching emails from
|
265
|
+
# @option opts [DateTime] :since Filter for emails that were received after the given timestamp
|
266
|
+
# @option opts [String] :sort Sort direction
|
235
267
|
# @option opts [Integer] :timeout Max milliseconds to wait
|
236
268
|
# @option opts [Boolean] :unread_only Optional filter for unread only
|
237
269
|
# @return [Array<(Array<EmailPreview>, Integer, Hash)>] Array<EmailPreview> data, response status code and response headers
|
@@ -243,13 +275,20 @@ module MailSlurpClient
|
|
243
275
|
if @api_client.config.client_side_validation && match_options.nil?
|
244
276
|
fail ArgumentError, "Missing the required parameter 'match_options' when calling WaitForControllerApi.wait_for_matching_email"
|
245
277
|
end
|
278
|
+
allowable_values = ["ASC", "DESC"]
|
279
|
+
if @api_client.config.client_side_validation && opts[:'sort'] && !allowable_values.include?(opts[:'sort'])
|
280
|
+
fail ArgumentError, "invalid value for \"sort\", must be one of #{allowable_values}"
|
281
|
+
end
|
246
282
|
# resource path
|
247
283
|
local_var_path = '/waitForMatchingEmails'
|
248
284
|
|
249
285
|
# query parameters
|
250
286
|
query_params = opts[:query_params] || {}
|
251
287
|
query_params[:'count'] = opts[:'count'] if !opts[:'count'].nil?
|
288
|
+
query_params[:'delay'] = opts[:'delay'] if !opts[:'delay'].nil?
|
252
289
|
query_params[:'inboxId'] = opts[:'inbox_id'] if !opts[:'inbox_id'].nil?
|
290
|
+
query_params[:'since'] = opts[:'since'] if !opts[:'since'].nil?
|
291
|
+
query_params[:'sort'] = opts[:'sort'] if !opts[:'sort'].nil?
|
253
292
|
query_params[:'timeout'] = opts[:'timeout'] if !opts[:'timeout'].nil?
|
254
293
|
query_params[:'unreadOnly'] = opts[:'unread_only'] if !opts[:'unread_only'].nil?
|
255
294
|
|
@@ -292,7 +331,10 @@ module MailSlurpClient
|
|
292
331
|
# 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
332
|
# @param match_options [MatchOptions] matchOptions
|
294
333
|
# @param [Hash] opts the optional parameters
|
334
|
+
# @option opts [Integer] :delay Max milliseconds delay between calls
|
295
335
|
# @option opts [String] :inbox_id Id of the inbox we are matching an email for
|
336
|
+
# @option opts [DateTime] :since Filter for emails that were received after the given timestamp
|
337
|
+
# @option opts [String] :sort Sort direction
|
296
338
|
# @option opts [Integer] :timeout Max milliseconds to wait
|
297
339
|
# @option opts [Boolean] :unread_only Optional filter for unread only (default to false)
|
298
340
|
# @return [Email]
|
@@ -305,7 +347,10 @@ module MailSlurpClient
|
|
305
347
|
# 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
348
|
# @param match_options [MatchOptions] matchOptions
|
307
349
|
# @param [Hash] opts the optional parameters
|
350
|
+
# @option opts [Integer] :delay Max milliseconds delay between calls
|
308
351
|
# @option opts [String] :inbox_id Id of the inbox we are matching an email for
|
352
|
+
# @option opts [DateTime] :since Filter for emails that were received after the given timestamp
|
353
|
+
# @option opts [String] :sort Sort direction
|
309
354
|
# @option opts [Integer] :timeout Max milliseconds to wait
|
310
355
|
# @option opts [Boolean] :unread_only Optional filter for unread only
|
311
356
|
# @return [Array<(Email, Integer, Hash)>] Email data, response status code and response headers
|
@@ -317,12 +362,19 @@ module MailSlurpClient
|
|
317
362
|
if @api_client.config.client_side_validation && match_options.nil?
|
318
363
|
fail ArgumentError, "Missing the required parameter 'match_options' when calling WaitForControllerApi.wait_for_matching_first_email"
|
319
364
|
end
|
365
|
+
allowable_values = ["ASC", "DESC"]
|
366
|
+
if @api_client.config.client_side_validation && opts[:'sort'] && !allowable_values.include?(opts[:'sort'])
|
367
|
+
fail ArgumentError, "invalid value for \"sort\", must be one of #{allowable_values}"
|
368
|
+
end
|
320
369
|
# resource path
|
321
370
|
local_var_path = '/waitForMatchingFirstEmail'
|
322
371
|
|
323
372
|
# query parameters
|
324
373
|
query_params = opts[:query_params] || {}
|
374
|
+
query_params[:'delay'] = opts[:'delay'] if !opts[:'delay'].nil?
|
325
375
|
query_params[:'inboxId'] = opts[:'inbox_id'] if !opts[:'inbox_id'].nil?
|
376
|
+
query_params[:'since'] = opts[:'since'] if !opts[:'since'].nil?
|
377
|
+
query_params[:'sort'] = opts[:'sort'] if !opts[:'sort'].nil?
|
326
378
|
query_params[:'timeout'] = opts[:'timeout'] if !opts[:'timeout'].nil?
|
327
379
|
query_params[:'unreadOnly'] = opts[:'unread_only'] if !opts[:'unread_only'].nil?
|
328
380
|
|
@@ -364,8 +416,11 @@ module MailSlurpClient
|
|
364
416
|
# Wait for or fetch the email with a given index in the inbox specified. If index doesn't exist waits for it to exist or timeout to occur.
|
365
417
|
# 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.
|
366
418
|
# @param [Hash] opts the optional parameters
|
419
|
+
# @option opts [Integer] :delay Max milliseconds delay between calls
|
367
420
|
# @option opts [String] :inbox_id Id of the inbox you are fetching emails from
|
368
421
|
# @option opts [Integer] :index Zero based index of the email to wait for. If an inbox has 1 email already and you want to wait for the 2nd email pass index=1 (default to 0)
|
422
|
+
# @option opts [DateTime] :since Filter for emails that were received after the given timestamp
|
423
|
+
# @option opts [String] :sort Sort direction
|
369
424
|
# @option opts [Integer] :timeout Max milliseconds to wait for the nth email if not already present
|
370
425
|
# @option opts [Boolean] :unread_only Optional filter for unread only (default to false)
|
371
426
|
# @return [Email]
|
@@ -377,8 +432,11 @@ module MailSlurpClient
|
|
377
432
|
# Wait for or fetch the email with a given index in the inbox specified. If index doesn't exist waits for it to exist or timeout to occur.
|
378
433
|
# 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.
|
379
434
|
# @param [Hash] opts the optional parameters
|
435
|
+
# @option opts [Integer] :delay Max milliseconds delay between calls
|
380
436
|
# @option opts [String] :inbox_id Id of the inbox you are fetching emails from
|
381
437
|
# @option opts [Integer] :index Zero based index of the email to wait for. If an inbox has 1 email already and you want to wait for the 2nd email pass index=1
|
438
|
+
# @option opts [DateTime] :since Filter for emails that were received after the given timestamp
|
439
|
+
# @option opts [String] :sort Sort direction
|
382
440
|
# @option opts [Integer] :timeout Max milliseconds to wait for the nth email if not already present
|
383
441
|
# @option opts [Boolean] :unread_only Optional filter for unread only
|
384
442
|
# @return [Array<(Email, Integer, Hash)>] Email data, response status code and response headers
|
@@ -386,13 +444,20 @@ module MailSlurpClient
|
|
386
444
|
if @api_client.config.debugging
|
387
445
|
@api_client.config.logger.debug 'Calling API: WaitForControllerApi.wait_for_nth_email ...'
|
388
446
|
end
|
447
|
+
allowable_values = ["ASC", "DESC"]
|
448
|
+
if @api_client.config.client_side_validation && opts[:'sort'] && !allowable_values.include?(opts[:'sort'])
|
449
|
+
fail ArgumentError, "invalid value for \"sort\", must be one of #{allowable_values}"
|
450
|
+
end
|
389
451
|
# resource path
|
390
452
|
local_var_path = '/waitForNthEmail'
|
391
453
|
|
392
454
|
# query parameters
|
393
455
|
query_params = opts[:query_params] || {}
|
456
|
+
query_params[:'delay'] = opts[:'delay'] if !opts[:'delay'].nil?
|
394
457
|
query_params[:'inboxId'] = opts[:'inbox_id'] if !opts[:'inbox_id'].nil?
|
395
458
|
query_params[:'index'] = opts[:'index'] if !opts[:'index'].nil?
|
459
|
+
query_params[:'since'] = opts[:'since'] if !opts[:'since'].nil?
|
460
|
+
query_params[:'sort'] = opts[:'sort'] if !opts[:'sort'].nil?
|
396
461
|
query_params[:'timeout'] = opts[:'timeout'] if !opts[:'timeout'].nil?
|
397
462
|
query_params[:'unreadOnly'] = opts[:'unread_only'] if !opts[:'unread_only'].nil?
|
398
463
|
|
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:
|
4
|
+
version: 13.0.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- mailslurp
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2021-
|
11
|
+
date: 2021-08-03 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.
|