mailslurp_client 13.1.0 → 14.0.0
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/alias_controller_api.rb +18 -0
- data/lib/mailslurp_client/api/attachment_controller_api.rb +6 -0
- data/lib/mailslurp_client/api/bounce_controller_api.rb +12 -0
- data/lib/mailslurp_client/api/common_actions_controller_api.rb +44 -0
- data/lib/mailslurp_client/api/contact_controller_api.rb +6 -0
- data/lib/mailslurp_client/api/email_controller_api.rb +12 -0
- data/lib/mailslurp_client/api/expired_controller_api.rb +6 -0
- data/lib/mailslurp_client/api/group_controller_api.rb +12 -0
- data/lib/mailslurp_client/api/inbox_controller_api.rb +51 -6
- data/lib/mailslurp_client/api/inbox_forwarder_controller_api.rb +6 -0
- data/lib/mailslurp_client/api/inbox_ruleset_controller_api.rb +6 -0
- data/lib/mailslurp_client/api/missed_email_controller_api.rb +18 -0
- data/lib/mailslurp_client/api/sent_emails_controller_api.rb +24 -0
- data/lib/mailslurp_client/api/template_controller_api.rb +6 -0
- data/lib/mailslurp_client/api/tracking_controller_api.rb +6 -0
- data/lib/mailslurp_client/api/wait_for_controller_api.rb +15 -0
- data/lib/mailslurp_client/api/webhook_controller_api.rb +144 -0
- data/lib/mailslurp_client/models/create_inbox_dto.rb +1 -1
- data/lib/mailslurp_client/models/json_schema_dto.rb +211 -0
- data/lib/mailslurp_client/models/wait_for_conditions.rb +21 -6
- data/lib/mailslurp_client/models/webhook_dto.rb +1 -1
- data/lib/mailslurp_client/version.rb +1 -1
- data/lib/mailslurp_client.rb +1 -0
- metadata +3 -2
@@ -141,7 +141,9 @@ module MailSlurpClient
|
|
141
141
|
|
142
142
|
# Get all Templates in paginated format
|
143
143
|
# @param [Hash] opts the optional parameters
|
144
|
+
# @option opts [DateTime] :before Filter by created at before the given timestamp
|
144
145
|
# @option opts [Integer] :page Optional page index in list pagination (default to 0)
|
146
|
+
# @option opts [DateTime] :since Filter by created at after the given timestamp
|
145
147
|
# @option opts [Integer] :size Optional page size in list pagination (default to 20)
|
146
148
|
# @option opts [String] :sort Optional createdAt sort direction ASC or DESC (default to 'ASC')
|
147
149
|
# @return [PageTemplateProjection]
|
@@ -152,7 +154,9 @@ module MailSlurpClient
|
|
152
154
|
|
153
155
|
# Get all Templates in paginated format
|
154
156
|
# @param [Hash] opts the optional parameters
|
157
|
+
# @option opts [DateTime] :before Filter by created at before the given timestamp
|
155
158
|
# @option opts [Integer] :page Optional page index in list pagination
|
159
|
+
# @option opts [DateTime] :since Filter by created at after the given timestamp
|
156
160
|
# @option opts [Integer] :size Optional page size in list pagination
|
157
161
|
# @option opts [String] :sort Optional createdAt sort direction ASC or DESC
|
158
162
|
# @return [Array<(PageTemplateProjection, Integer, Hash)>] PageTemplateProjection data, response status code and response headers
|
@@ -169,7 +173,9 @@ module MailSlurpClient
|
|
169
173
|
|
170
174
|
# query parameters
|
171
175
|
query_params = opts[:query_params] || {}
|
176
|
+
query_params[:'before'] = opts[:'before'] if !opts[:'before'].nil?
|
172
177
|
query_params[:'page'] = opts[:'page'] if !opts[:'page'].nil?
|
178
|
+
query_params[:'since'] = opts[:'since'] if !opts[:'since'].nil?
|
173
179
|
query_params[:'size'] = opts[:'size'] if !opts[:'size'].nil?
|
174
180
|
query_params[:'sort'] = opts[:'sort'] if !opts[:'sort'].nil?
|
175
181
|
|
@@ -86,8 +86,10 @@ module MailSlurpClient
|
|
86
86
|
# Get tracking pixels
|
87
87
|
# List tracking pixels in paginated form
|
88
88
|
# @param [Hash] opts the optional parameters
|
89
|
+
# @option opts [DateTime] :before Filter by created at before the given timestamp
|
89
90
|
# @option opts [Integer] :page Optional page index in list pagination (default to 0)
|
90
91
|
# @option opts [String] :search_filter Optional search filter
|
92
|
+
# @option opts [DateTime] :since Filter by created at after the given timestamp
|
91
93
|
# @option opts [Integer] :size Optional page size in list pagination (default to 20)
|
92
94
|
# @option opts [String] :sort Optional createdAt sort direction ASC or DESC (default to 'ASC')
|
93
95
|
# @return [PageTrackingPixelProjection]
|
@@ -99,8 +101,10 @@ module MailSlurpClient
|
|
99
101
|
# Get tracking pixels
|
100
102
|
# List tracking pixels in paginated form
|
101
103
|
# @param [Hash] opts the optional parameters
|
104
|
+
# @option opts [DateTime] :before Filter by created at before the given timestamp
|
102
105
|
# @option opts [Integer] :page Optional page index in list pagination
|
103
106
|
# @option opts [String] :search_filter Optional search filter
|
107
|
+
# @option opts [DateTime] :since Filter by created at after the given timestamp
|
104
108
|
# @option opts [Integer] :size Optional page size in list pagination
|
105
109
|
# @option opts [String] :sort Optional createdAt sort direction ASC or DESC
|
106
110
|
# @return [Array<(PageTrackingPixelProjection, Integer, Hash)>] PageTrackingPixelProjection data, response status code and response headers
|
@@ -117,8 +121,10 @@ module MailSlurpClient
|
|
117
121
|
|
118
122
|
# query parameters
|
119
123
|
query_params = opts[:query_params] || {}
|
124
|
+
query_params[:'before'] = opts[:'before'] if !opts[:'before'].nil?
|
120
125
|
query_params[:'page'] = opts[:'page'] if !opts[:'page'].nil?
|
121
126
|
query_params[:'searchFilter'] = opts[:'search_filter'] if !opts[:'search_filter'].nil?
|
127
|
+
query_params[:'since'] = opts[:'since'] if !opts[:'since'].nil?
|
122
128
|
query_params[:'size'] = opts[:'size'] if !opts[:'size'].nil?
|
123
129
|
query_params[:'sort'] = opts[:'sort'] if !opts[:'sort'].nil?
|
124
130
|
|
@@ -82,6 +82,7 @@ module MailSlurpClient
|
|
82
82
|
# Wait for and return count number of emails. Hold connection until inbox count matches expected or timeout occurs
|
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
|
+
# @option opts [DateTime] :before Filter for emails that were received before the given timestamp
|
85
86
|
# @option opts [Integer] :count Number of emails to wait for. Must be greater that 1
|
86
87
|
# @option opts [Integer] :delay Max milliseconds delay between calls
|
87
88
|
# @option opts [String] :inbox_id Id of the inbox we are fetching emails from
|
@@ -98,6 +99,7 @@ module MailSlurpClient
|
|
98
99
|
# Wait for and return count number of emails. Hold connection until inbox count matches expected or timeout occurs
|
99
100
|
# 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.
|
100
101
|
# @param [Hash] opts the optional parameters
|
102
|
+
# @option opts [DateTime] :before Filter for emails that were received before the given timestamp
|
101
103
|
# @option opts [Integer] :count Number of emails to wait for. Must be greater that 1
|
102
104
|
# @option opts [Integer] :delay Max milliseconds delay between calls
|
103
105
|
# @option opts [String] :inbox_id Id of the inbox we are fetching emails from
|
@@ -119,6 +121,7 @@ module MailSlurpClient
|
|
119
121
|
|
120
122
|
# query parameters
|
121
123
|
query_params = opts[:query_params] || {}
|
124
|
+
query_params[:'before'] = opts[:'before'] if !opts[:'before'].nil?
|
122
125
|
query_params[:'count'] = opts[:'count'] if !opts[:'count'].nil?
|
123
126
|
query_params[:'delay'] = opts[:'delay'] if !opts[:'delay'].nil?
|
124
127
|
query_params[:'inboxId'] = opts[:'inbox_id'] if !opts[:'inbox_id'].nil?
|
@@ -163,6 +166,7 @@ module MailSlurpClient
|
|
163
166
|
# Fetch inbox's latest email or if empty wait for an email to arrive
|
164
167
|
# 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`.
|
165
168
|
# @param [Hash] opts the optional parameters
|
169
|
+
# @option opts [DateTime] :before Filter for emails that were before after the given timestamp
|
166
170
|
# @option opts [Integer] :delay Max milliseconds delay between calls
|
167
171
|
# @option opts [String] :inbox_id Id of the inbox we are fetching emails from
|
168
172
|
# @option opts [DateTime] :since Filter for emails that were received after the given timestamp
|
@@ -178,6 +182,7 @@ module MailSlurpClient
|
|
178
182
|
# Fetch inbox's latest email or if empty wait for an email to arrive
|
179
183
|
# 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`.
|
180
184
|
# @param [Hash] opts the optional parameters
|
185
|
+
# @option opts [DateTime] :before Filter for emails that were before after the given timestamp
|
181
186
|
# @option opts [Integer] :delay Max milliseconds delay between calls
|
182
187
|
# @option opts [String] :inbox_id Id of the inbox we are fetching emails from
|
183
188
|
# @option opts [DateTime] :since Filter for emails that were received after the given timestamp
|
@@ -198,6 +203,7 @@ module MailSlurpClient
|
|
198
203
|
|
199
204
|
# query parameters
|
200
205
|
query_params = opts[:query_params] || {}
|
206
|
+
query_params[:'before'] = opts[:'before'] if !opts[:'before'].nil?
|
201
207
|
query_params[:'delay'] = opts[:'delay'] if !opts[:'delay'].nil?
|
202
208
|
query_params[:'inboxId'] = opts[:'inbox_id'] if !opts[:'inbox_id'].nil?
|
203
209
|
query_params[:'since'] = opts[:'since'] if !opts[:'since'].nil?
|
@@ -242,6 +248,7 @@ module MailSlurpClient
|
|
242
248
|
# 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.
|
243
249
|
# @param match_options [MatchOptions] matchOptions
|
244
250
|
# @param [Hash] opts the optional parameters
|
251
|
+
# @option opts [DateTime] :before Filter for emails that were received before the given timestamp
|
245
252
|
# @option opts [Integer] :count Number of emails to wait for. Must be greater or equal to 1
|
246
253
|
# @option opts [Integer] :delay Max milliseconds delay between calls
|
247
254
|
# @option opts [String] :inbox_id Id of the inbox we are fetching emails from
|
@@ -259,6 +266,7 @@ module MailSlurpClient
|
|
259
266
|
# 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.
|
260
267
|
# @param match_options [MatchOptions] matchOptions
|
261
268
|
# @param [Hash] opts the optional parameters
|
269
|
+
# @option opts [DateTime] :before Filter for emails that were received before the given timestamp
|
262
270
|
# @option opts [Integer] :count Number of emails to wait for. Must be greater or equal to 1
|
263
271
|
# @option opts [Integer] :delay Max milliseconds delay between calls
|
264
272
|
# @option opts [String] :inbox_id Id of the inbox we are fetching emails from
|
@@ -284,6 +292,7 @@ module MailSlurpClient
|
|
284
292
|
|
285
293
|
# query parameters
|
286
294
|
query_params = opts[:query_params] || {}
|
295
|
+
query_params[:'before'] = opts[:'before'] if !opts[:'before'].nil?
|
287
296
|
query_params[:'count'] = opts[:'count'] if !opts[:'count'].nil?
|
288
297
|
query_params[:'delay'] = opts[:'delay'] if !opts[:'delay'].nil?
|
289
298
|
query_params[:'inboxId'] = opts[:'inbox_id'] if !opts[:'inbox_id'].nil?
|
@@ -331,6 +340,7 @@ module MailSlurpClient
|
|
331
340
|
# 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.
|
332
341
|
# @param match_options [MatchOptions] matchOptions
|
333
342
|
# @param [Hash] opts the optional parameters
|
343
|
+
# @option opts [DateTime] :before Filter for emails that were received before the given timestamp
|
334
344
|
# @option opts [Integer] :delay Max milliseconds delay between calls
|
335
345
|
# @option opts [String] :inbox_id Id of the inbox we are matching an email for
|
336
346
|
# @option opts [DateTime] :since Filter for emails that were received after the given timestamp
|
@@ -347,6 +357,7 @@ module MailSlurpClient
|
|
347
357
|
# 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.
|
348
358
|
# @param match_options [MatchOptions] matchOptions
|
349
359
|
# @param [Hash] opts the optional parameters
|
360
|
+
# @option opts [DateTime] :before Filter for emails that were received before the given timestamp
|
350
361
|
# @option opts [Integer] :delay Max milliseconds delay between calls
|
351
362
|
# @option opts [String] :inbox_id Id of the inbox we are matching an email for
|
352
363
|
# @option opts [DateTime] :since Filter for emails that were received after the given timestamp
|
@@ -371,6 +382,7 @@ module MailSlurpClient
|
|
371
382
|
|
372
383
|
# query parameters
|
373
384
|
query_params = opts[:query_params] || {}
|
385
|
+
query_params[:'before'] = opts[:'before'] if !opts[:'before'].nil?
|
374
386
|
query_params[:'delay'] = opts[:'delay'] if !opts[:'delay'].nil?
|
375
387
|
query_params[:'inboxId'] = opts[:'inbox_id'] if !opts[:'inbox_id'].nil?
|
376
388
|
query_params[:'since'] = opts[:'since'] if !opts[:'since'].nil?
|
@@ -416,6 +428,7 @@ module MailSlurpClient
|
|
416
428
|
# 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.
|
417
429
|
# 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.
|
418
430
|
# @param [Hash] opts the optional parameters
|
431
|
+
# @option opts [DateTime] :before Filter for emails that were received before the given timestamp
|
419
432
|
# @option opts [Integer] :delay Max milliseconds delay between calls
|
420
433
|
# @option opts [String] :inbox_id Id of the inbox you are fetching emails from
|
421
434
|
# @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)
|
@@ -432,6 +445,7 @@ module MailSlurpClient
|
|
432
445
|
# 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.
|
433
446
|
# 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.
|
434
447
|
# @param [Hash] opts the optional parameters
|
448
|
+
# @option opts [DateTime] :before Filter for emails that were received before the given timestamp
|
435
449
|
# @option opts [Integer] :delay Max milliseconds delay between calls
|
436
450
|
# @option opts [String] :inbox_id Id of the inbox you are fetching emails from
|
437
451
|
# @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
|
@@ -453,6 +467,7 @@ module MailSlurpClient
|
|
453
467
|
|
454
468
|
# query parameters
|
455
469
|
query_params = opts[:query_params] || {}
|
470
|
+
query_params[:'before'] = opts[:'before'] if !opts[:'before'].nil?
|
456
471
|
query_params[:'delay'] = opts[:'delay'] if !opts[:'delay'].nil?
|
457
472
|
query_params[:'inboxId'] = opts[:'inbox_id'] if !opts[:'inbox_id'].nil?
|
458
473
|
query_params[:'index'] = opts[:'index'] if !opts[:'index'].nil?
|
@@ -155,8 +155,10 @@ module MailSlurpClient
|
|
155
155
|
|
156
156
|
# Get results for all webhooks
|
157
157
|
# @param [Hash] opts the optional parameters
|
158
|
+
# @option opts [DateTime] :before Filter by created at before the given timestamp
|
158
159
|
# @option opts [Integer] :page Optional page index in list pagination (default to 0)
|
159
160
|
# @option opts [String] :search_filter Optional search filter
|
161
|
+
# @option opts [DateTime] :since Filter by created at after the given timestamp
|
160
162
|
# @option opts [Integer] :size Optional page size in list pagination (default to 20)
|
161
163
|
# @option opts [String] :sort Optional createdAt sort direction ASC or DESC (default to 'ASC')
|
162
164
|
# @return [PageWebhookResult]
|
@@ -167,8 +169,10 @@ module MailSlurpClient
|
|
167
169
|
|
168
170
|
# Get results for all webhooks
|
169
171
|
# @param [Hash] opts the optional parameters
|
172
|
+
# @option opts [DateTime] :before Filter by created at before the given timestamp
|
170
173
|
# @option opts [Integer] :page Optional page index in list pagination
|
171
174
|
# @option opts [String] :search_filter Optional search filter
|
175
|
+
# @option opts [DateTime] :since Filter by created at after the given timestamp
|
172
176
|
# @option opts [Integer] :size Optional page size in list pagination
|
173
177
|
# @option opts [String] :sort Optional createdAt sort direction ASC or DESC
|
174
178
|
# @return [Array<(PageWebhookResult, Integer, Hash)>] PageWebhookResult data, response status code and response headers
|
@@ -185,8 +189,10 @@ module MailSlurpClient
|
|
185
189
|
|
186
190
|
# query parameters
|
187
191
|
query_params = opts[:query_params] || {}
|
192
|
+
query_params[:'before'] = opts[:'before'] if !opts[:'before'].nil?
|
188
193
|
query_params[:'page'] = opts[:'page'] if !opts[:'page'].nil?
|
189
194
|
query_params[:'searchFilter'] = opts[:'search_filter'] if !opts[:'search_filter'].nil?
|
195
|
+
query_params[:'since'] = opts[:'since'] if !opts[:'since'].nil?
|
190
196
|
query_params[:'size'] = opts[:'size'] if !opts[:'size'].nil?
|
191
197
|
query_params[:'sort'] = opts[:'sort'] if !opts[:'sort'].nil?
|
192
198
|
|
@@ -226,8 +232,10 @@ module MailSlurpClient
|
|
226
232
|
# List Webhooks Paginated
|
227
233
|
# List webhooks in paginated form. Allows for page index, page size, and sort direction.
|
228
234
|
# @param [Hash] opts the optional parameters
|
235
|
+
# @option opts [DateTime] :before Filter by created at before the given timestamp
|
229
236
|
# @option opts [Integer] :page Optional page index in list pagination (default to 0)
|
230
237
|
# @option opts [String] :search_filter Optional search filter
|
238
|
+
# @option opts [DateTime] :since Filter by created at after the given timestamp
|
231
239
|
# @option opts [Integer] :size Optional page size for paginated result list. (default to 20)
|
232
240
|
# @option opts [String] :sort Optional createdAt sort direction ASC or DESC (default to 'DESC')
|
233
241
|
# @return [PageWebhookProjection]
|
@@ -239,8 +247,10 @@ module MailSlurpClient
|
|
239
247
|
# List Webhooks Paginated
|
240
248
|
# List webhooks in paginated form. Allows for page index, page size, and sort direction.
|
241
249
|
# @param [Hash] opts the optional parameters
|
250
|
+
# @option opts [DateTime] :before Filter by created at before the given timestamp
|
242
251
|
# @option opts [Integer] :page Optional page index in list pagination
|
243
252
|
# @option opts [String] :search_filter Optional search filter
|
253
|
+
# @option opts [DateTime] :since Filter by created at after the given timestamp
|
244
254
|
# @option opts [Integer] :size Optional page size for paginated result list.
|
245
255
|
# @option opts [String] :sort Optional createdAt sort direction ASC or DESC
|
246
256
|
# @return [Array<(PageWebhookProjection, Integer, Hash)>] PageWebhookProjection data, response status code and response headers
|
@@ -257,8 +267,10 @@ module MailSlurpClient
|
|
257
267
|
|
258
268
|
# query parameters
|
259
269
|
query_params = opts[:query_params] || {}
|
270
|
+
query_params[:'before'] = opts[:'before'] if !opts[:'before'].nil?
|
260
271
|
query_params[:'page'] = opts[:'page'] if !opts[:'page'].nil?
|
261
272
|
query_params[:'searchFilter'] = opts[:'search_filter'] if !opts[:'search_filter'].nil?
|
273
|
+
query_params[:'since'] = opts[:'since'] if !opts[:'since'].nil?
|
262
274
|
query_params[:'size'] = opts[:'size'] if !opts[:'size'].nil?
|
263
275
|
query_params[:'sort'] = opts[:'sort'] if !opts[:'sort'].nil?
|
264
276
|
|
@@ -298,8 +310,10 @@ module MailSlurpClient
|
|
298
310
|
# Get paginated webhooks for an Inbox
|
299
311
|
# @param inbox_id [String] inboxId
|
300
312
|
# @param [Hash] opts the optional parameters
|
313
|
+
# @option opts [DateTime] :before Filter by created at before the given timestamp
|
301
314
|
# @option opts [Integer] :page Optional page index in list pagination (default to 0)
|
302
315
|
# @option opts [String] :search_filter Optional search filter
|
316
|
+
# @option opts [DateTime] :since Filter by created at after the given timestamp
|
303
317
|
# @option opts [Integer] :size Optional page size in list pagination (default to 20)
|
304
318
|
# @option opts [String] :sort Optional createdAt sort direction ASC or DESC (default to 'ASC')
|
305
319
|
# @return [PageWebhookProjection]
|
@@ -311,8 +325,10 @@ module MailSlurpClient
|
|
311
325
|
# Get paginated webhooks for an Inbox
|
312
326
|
# @param inbox_id [String] inboxId
|
313
327
|
# @param [Hash] opts the optional parameters
|
328
|
+
# @option opts [DateTime] :before Filter by created at before the given timestamp
|
314
329
|
# @option opts [Integer] :page Optional page index in list pagination
|
315
330
|
# @option opts [String] :search_filter Optional search filter
|
331
|
+
# @option opts [DateTime] :since Filter by created at after the given timestamp
|
316
332
|
# @option opts [Integer] :size Optional page size in list pagination
|
317
333
|
# @option opts [String] :sort Optional createdAt sort direction ASC or DESC
|
318
334
|
# @return [Array<(PageWebhookProjection, Integer, Hash)>] PageWebhookProjection data, response status code and response headers
|
@@ -333,8 +349,10 @@ module MailSlurpClient
|
|
333
349
|
|
334
350
|
# query parameters
|
335
351
|
query_params = opts[:query_params] || {}
|
352
|
+
query_params[:'before'] = opts[:'before'] if !opts[:'before'].nil?
|
336
353
|
query_params[:'page'] = opts[:'page'] if !opts[:'page'].nil?
|
337
354
|
query_params[:'searchFilter'] = opts[:'search_filter'] if !opts[:'search_filter'].nil?
|
355
|
+
query_params[:'since'] = opts[:'since'] if !opts[:'since'].nil?
|
338
356
|
query_params[:'size'] = opts[:'size'] if !opts[:'size'].nil?
|
339
357
|
query_params[:'sort'] = opts[:'sort'] if !opts[:'sort'].nil?
|
340
358
|
|
@@ -371,6 +389,66 @@ module MailSlurpClient
|
|
371
389
|
return data, status_code, headers
|
372
390
|
end
|
373
391
|
|
392
|
+
# Get JSON Schema definition for webhook payload
|
393
|
+
# @param webhook_id [String] webhookId
|
394
|
+
# @param [Hash] opts the optional parameters
|
395
|
+
# @return [JSONSchemaDto]
|
396
|
+
def get_json_schema_for_webhook_payload(webhook_id, opts = {})
|
397
|
+
data, _status_code, _headers = get_json_schema_for_webhook_payload_with_http_info(webhook_id, opts)
|
398
|
+
data
|
399
|
+
end
|
400
|
+
|
401
|
+
# Get JSON Schema definition for webhook payload
|
402
|
+
# @param webhook_id [String] webhookId
|
403
|
+
# @param [Hash] opts the optional parameters
|
404
|
+
# @return [Array<(JSONSchemaDto, Integer, Hash)>] JSONSchemaDto data, response status code and response headers
|
405
|
+
def get_json_schema_for_webhook_payload_with_http_info(webhook_id, opts = {})
|
406
|
+
if @api_client.config.debugging
|
407
|
+
@api_client.config.logger.debug 'Calling API: WebhookControllerApi.get_json_schema_for_webhook_payload ...'
|
408
|
+
end
|
409
|
+
# verify the required parameter 'webhook_id' is set
|
410
|
+
if @api_client.config.client_side_validation && webhook_id.nil?
|
411
|
+
fail ArgumentError, "Missing the required parameter 'webhook_id' when calling WebhookControllerApi.get_json_schema_for_webhook_payload"
|
412
|
+
end
|
413
|
+
# resource path
|
414
|
+
local_var_path = '/webhooks/{webhookId}/schema'.sub('{' + 'webhookId' + '}', CGI.escape(webhook_id.to_s))
|
415
|
+
|
416
|
+
# query parameters
|
417
|
+
query_params = opts[:query_params] || {}
|
418
|
+
|
419
|
+
# header parameters
|
420
|
+
header_params = opts[:header_params] || {}
|
421
|
+
# HTTP header 'Accept' (if needed)
|
422
|
+
header_params['Accept'] = @api_client.select_header_accept(['application/json'])
|
423
|
+
|
424
|
+
# form parameters
|
425
|
+
form_params = opts[:form_params] || {}
|
426
|
+
|
427
|
+
# http body (model)
|
428
|
+
post_body = opts[:body]
|
429
|
+
|
430
|
+
# return_type
|
431
|
+
return_type = opts[:return_type] || 'JSONSchemaDto'
|
432
|
+
|
433
|
+
# auth_names
|
434
|
+
auth_names = opts[:auth_names] || ['API_KEY']
|
435
|
+
|
436
|
+
new_options = opts.merge(
|
437
|
+
:header_params => header_params,
|
438
|
+
:query_params => query_params,
|
439
|
+
:form_params => form_params,
|
440
|
+
:body => post_body,
|
441
|
+
:auth_names => auth_names,
|
442
|
+
:return_type => return_type
|
443
|
+
)
|
444
|
+
|
445
|
+
data, status_code, headers = @api_client.call_api(:POST, local_var_path, new_options)
|
446
|
+
if @api_client.config.debugging
|
447
|
+
@api_client.config.logger.debug "API called: WebhookControllerApi#get_json_schema_for_webhook_payload\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
448
|
+
end
|
449
|
+
return data, status_code, headers
|
450
|
+
end
|
451
|
+
|
374
452
|
# Get test webhook payload example. Response content depends on eventName passed. Uses `EMAIL_RECEIVED` as default.
|
375
453
|
# @param [Hash] opts the optional parameters
|
376
454
|
# @option opts [String] :event_name eventName
|
@@ -540,6 +618,66 @@ module MailSlurpClient
|
|
540
618
|
return data, status_code, headers
|
541
619
|
end
|
542
620
|
|
621
|
+
# Get example payload for webhook
|
622
|
+
# @param webhook_id [String] webhookId
|
623
|
+
# @param [Hash] opts the optional parameters
|
624
|
+
# @return [AbstractWebhookPayload]
|
625
|
+
def get_test_webhook_payload_for_webhook(webhook_id, opts = {})
|
626
|
+
data, _status_code, _headers = get_test_webhook_payload_for_webhook_with_http_info(webhook_id, opts)
|
627
|
+
data
|
628
|
+
end
|
629
|
+
|
630
|
+
# Get example payload for webhook
|
631
|
+
# @param webhook_id [String] webhookId
|
632
|
+
# @param [Hash] opts the optional parameters
|
633
|
+
# @return [Array<(AbstractWebhookPayload, Integer, Hash)>] AbstractWebhookPayload data, response status code and response headers
|
634
|
+
def get_test_webhook_payload_for_webhook_with_http_info(webhook_id, opts = {})
|
635
|
+
if @api_client.config.debugging
|
636
|
+
@api_client.config.logger.debug 'Calling API: WebhookControllerApi.get_test_webhook_payload_for_webhook ...'
|
637
|
+
end
|
638
|
+
# verify the required parameter 'webhook_id' is set
|
639
|
+
if @api_client.config.client_side_validation && webhook_id.nil?
|
640
|
+
fail ArgumentError, "Missing the required parameter 'webhook_id' when calling WebhookControllerApi.get_test_webhook_payload_for_webhook"
|
641
|
+
end
|
642
|
+
# resource path
|
643
|
+
local_var_path = '/webhooks/{webhookId}/example'.sub('{' + 'webhookId' + '}', CGI.escape(webhook_id.to_s))
|
644
|
+
|
645
|
+
# query parameters
|
646
|
+
query_params = opts[:query_params] || {}
|
647
|
+
|
648
|
+
# header parameters
|
649
|
+
header_params = opts[:header_params] || {}
|
650
|
+
# HTTP header 'Accept' (if needed)
|
651
|
+
header_params['Accept'] = @api_client.select_header_accept(['application/json'])
|
652
|
+
|
653
|
+
# form parameters
|
654
|
+
form_params = opts[:form_params] || {}
|
655
|
+
|
656
|
+
# http body (model)
|
657
|
+
post_body = opts[:body]
|
658
|
+
|
659
|
+
# return_type
|
660
|
+
return_type = opts[:return_type] || 'AbstractWebhookPayload'
|
661
|
+
|
662
|
+
# auth_names
|
663
|
+
auth_names = opts[:auth_names] || ['API_KEY']
|
664
|
+
|
665
|
+
new_options = opts.merge(
|
666
|
+
:header_params => header_params,
|
667
|
+
:query_params => query_params,
|
668
|
+
:form_params => form_params,
|
669
|
+
:body => post_body,
|
670
|
+
:auth_names => auth_names,
|
671
|
+
:return_type => return_type
|
672
|
+
)
|
673
|
+
|
674
|
+
data, status_code, headers = @api_client.call_api(:POST, local_var_path, new_options)
|
675
|
+
if @api_client.config.debugging
|
676
|
+
@api_client.config.logger.debug "API called: WebhookControllerApi#get_test_webhook_payload_for_webhook\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
677
|
+
end
|
678
|
+
return data, status_code, headers
|
679
|
+
end
|
680
|
+
|
543
681
|
# Get webhook test payload for new attachment event
|
544
682
|
# @param [Hash] opts the optional parameters
|
545
683
|
# @return [WebhookNewAttachmentPayload]
|
@@ -825,8 +963,10 @@ module MailSlurpClient
|
|
825
963
|
# Get a webhook results for a webhook
|
826
964
|
# @param webhook_id [String] ID of webhook to get results for
|
827
965
|
# @param [Hash] opts the optional parameters
|
966
|
+
# @option opts [DateTime] :before Filter by created at before the given timestamp
|
828
967
|
# @option opts [Integer] :page Optional page index in list pagination (default to 0)
|
829
968
|
# @option opts [String] :search_filter Optional search filter
|
969
|
+
# @option opts [DateTime] :since Filter by created at after the given timestamp
|
830
970
|
# @option opts [Integer] :size Optional page size in list pagination (default to 20)
|
831
971
|
# @option opts [String] :sort Optional createdAt sort direction ASC or DESC (default to 'ASC')
|
832
972
|
# @return [PageWebhookResult]
|
@@ -838,8 +978,10 @@ module MailSlurpClient
|
|
838
978
|
# Get a webhook results for a webhook
|
839
979
|
# @param webhook_id [String] ID of webhook to get results for
|
840
980
|
# @param [Hash] opts the optional parameters
|
981
|
+
# @option opts [DateTime] :before Filter by created at before the given timestamp
|
841
982
|
# @option opts [Integer] :page Optional page index in list pagination
|
842
983
|
# @option opts [String] :search_filter Optional search filter
|
984
|
+
# @option opts [DateTime] :since Filter by created at after the given timestamp
|
843
985
|
# @option opts [Integer] :size Optional page size in list pagination
|
844
986
|
# @option opts [String] :sort Optional createdAt sort direction ASC or DESC
|
845
987
|
# @return [Array<(PageWebhookResult, Integer, Hash)>] PageWebhookResult data, response status code and response headers
|
@@ -860,8 +1002,10 @@ module MailSlurpClient
|
|
860
1002
|
|
861
1003
|
# query parameters
|
862
1004
|
query_params = opts[:query_params] || {}
|
1005
|
+
query_params[:'before'] = opts[:'before'] if !opts[:'before'].nil?
|
863
1006
|
query_params[:'page'] = opts[:'page'] if !opts[:'page'].nil?
|
864
1007
|
query_params[:'searchFilter'] = opts[:'search_filter'] if !opts[:'search_filter'].nil?
|
1008
|
+
query_params[:'since'] = opts[:'since'] if !opts[:'since'].nil?
|
865
1009
|
query_params[:'size'] = opts[:'size'] if !opts[:'size'].nil?
|
866
1010
|
query_params[:'sort'] = opts[:'sort'] if !opts[:'sort'].nil?
|
867
1011
|
|
@@ -15,7 +15,7 @@ require 'date'
|
|
15
15
|
module MailSlurpClient
|
16
16
|
# Options for creating an inbox. An inbox has a real email address that can send and receive emails. Inboxes can be permanent or expire at a given time. Inboxes are either `SMTP` or `HTTP` mailboxes. Use `SMTP` for public facing mailboxes and `HTTP` for test email accounts. `SMTP` inboxes are processed by a mail server running at `mx.mailslurp.com` while `HTTP` inboxes are processed by AWS SES. Inboxes can use a custom email address (by verifying your own domain) or a randomly assigned email ending in either `mailslurp.com` or (if `useDomainPool` is enabled) ending in a similar domain such as `mailslurp.xyz` (selected at random).
|
17
17
|
class CreateInboxDto
|
18
|
-
# Grant team access to this inbox and the emails that belong to it for team members of your organization.
|
18
|
+
# DEPRECATED (team access is always true). Grant team access to this inbox and the emails that belong to it for team members of your organization.
|
19
19
|
attr_accessor :allow_team_access
|
20
20
|
|
21
21
|
# Optional description of the inbox for labelling purposes. Is shown in the dashboard and can be used with
|
@@ -0,0 +1,211 @@
|
|
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
|
+
class JSONSchemaDto
|
17
|
+
attr_accessor :value
|
18
|
+
|
19
|
+
# Attribute mapping from ruby-style variable name to JSON key.
|
20
|
+
def self.attribute_map
|
21
|
+
{
|
22
|
+
:'value' => :'value'
|
23
|
+
}
|
24
|
+
end
|
25
|
+
|
26
|
+
# Attribute type mapping.
|
27
|
+
def self.openapi_types
|
28
|
+
{
|
29
|
+
:'value' => :'String'
|
30
|
+
}
|
31
|
+
end
|
32
|
+
|
33
|
+
# List of attributes with nullable: true
|
34
|
+
def self.openapi_nullable
|
35
|
+
Set.new([
|
36
|
+
])
|
37
|
+
end
|
38
|
+
|
39
|
+
# Initializes the object
|
40
|
+
# @param [Hash] attributes Model attributes in the form of hash
|
41
|
+
def initialize(attributes = {})
|
42
|
+
if (!attributes.is_a?(Hash))
|
43
|
+
fail ArgumentError, "The input argument (attributes) must be a hash in `MailSlurpClient::JSONSchemaDto` initialize method"
|
44
|
+
end
|
45
|
+
|
46
|
+
# check to see if the attribute exists and convert string to symbol for hash key
|
47
|
+
attributes = attributes.each_with_object({}) { |(k, v), h|
|
48
|
+
if (!self.class.attribute_map.key?(k.to_sym))
|
49
|
+
fail ArgumentError, "`#{k}` is not a valid attribute in `MailSlurpClient::JSONSchemaDto`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect
|
50
|
+
end
|
51
|
+
h[k.to_sym] = v
|
52
|
+
}
|
53
|
+
|
54
|
+
if attributes.key?(:'value')
|
55
|
+
self.value = attributes[:'value']
|
56
|
+
end
|
57
|
+
end
|
58
|
+
|
59
|
+
# Show invalid properties with the reasons. Usually used together with valid?
|
60
|
+
# @return Array for valid properties with the reasons
|
61
|
+
def list_invalid_properties
|
62
|
+
invalid_properties = Array.new
|
63
|
+
if @value.nil?
|
64
|
+
invalid_properties.push('invalid value for "value", value cannot be nil.')
|
65
|
+
end
|
66
|
+
|
67
|
+
invalid_properties
|
68
|
+
end
|
69
|
+
|
70
|
+
# Check to see if the all the properties in the model are valid
|
71
|
+
# @return true if the model is valid
|
72
|
+
def valid?
|
73
|
+
return false if @value.nil?
|
74
|
+
true
|
75
|
+
end
|
76
|
+
|
77
|
+
# Checks equality by comparing each attribute.
|
78
|
+
# @param [Object] Object to be compared
|
79
|
+
def ==(o)
|
80
|
+
return true if self.equal?(o)
|
81
|
+
self.class == o.class &&
|
82
|
+
value == o.value
|
83
|
+
end
|
84
|
+
|
85
|
+
# @see the `==` method
|
86
|
+
# @param [Object] Object to be compared
|
87
|
+
def eql?(o)
|
88
|
+
self == o
|
89
|
+
end
|
90
|
+
|
91
|
+
# Calculates hash code according to all attributes.
|
92
|
+
# @return [Integer] Hash code
|
93
|
+
def hash
|
94
|
+
[value].hash
|
95
|
+
end
|
96
|
+
|
97
|
+
# Builds the object from hash
|
98
|
+
# @param [Hash] attributes Model attributes in the form of hash
|
99
|
+
# @return [Object] Returns the model itself
|
100
|
+
def self.build_from_hash(attributes)
|
101
|
+
new.build_from_hash(attributes)
|
102
|
+
end
|
103
|
+
|
104
|
+
# Builds the object from hash
|
105
|
+
# @param [Hash] attributes Model attributes in the form of hash
|
106
|
+
# @return [Object] Returns the model itself
|
107
|
+
def build_from_hash(attributes)
|
108
|
+
return nil unless attributes.is_a?(Hash)
|
109
|
+
self.class.openapi_types.each_pair do |key, type|
|
110
|
+
if type =~ /\AArray<(.*)>/i
|
111
|
+
# check to ensure the input is an array given that the attribute
|
112
|
+
# is documented as an array but the input is not
|
113
|
+
if attributes[self.class.attribute_map[key]].is_a?(Array)
|
114
|
+
self.send("#{key}=", attributes[self.class.attribute_map[key]].map { |v| _deserialize($1, v) })
|
115
|
+
end
|
116
|
+
elsif !attributes[self.class.attribute_map[key]].nil?
|
117
|
+
self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]]))
|
118
|
+
end # or else data not found in attributes(hash), not an issue as the data can be optional
|
119
|
+
end
|
120
|
+
|
121
|
+
self
|
122
|
+
end
|
123
|
+
|
124
|
+
# Deserializes the data based on type
|
125
|
+
# @param string type Data type
|
126
|
+
# @param string value Value to be deserialized
|
127
|
+
# @return [Object] Deserialized data
|
128
|
+
def _deserialize(type, value)
|
129
|
+
case type.to_sym
|
130
|
+
when :DateTime
|
131
|
+
DateTime.parse(value)
|
132
|
+
when :Date
|
133
|
+
Date.parse(value)
|
134
|
+
when :String
|
135
|
+
value.to_s
|
136
|
+
when :Integer
|
137
|
+
value.to_i
|
138
|
+
when :Float
|
139
|
+
value.to_f
|
140
|
+
when :Boolean
|
141
|
+
if value.to_s =~ /\A(true|t|yes|y|1)\z/i
|
142
|
+
true
|
143
|
+
else
|
144
|
+
false
|
145
|
+
end
|
146
|
+
when :Object
|
147
|
+
# generic object (usually a Hash), return directly
|
148
|
+
value
|
149
|
+
when /\AArray<(?<inner_type>.+)>\z/
|
150
|
+
inner_type = Regexp.last_match[:inner_type]
|
151
|
+
value.map { |v| _deserialize(inner_type, v) }
|
152
|
+
when /\AHash<(?<k_type>.+?), (?<v_type>.+)>\z/
|
153
|
+
k_type = Regexp.last_match[:k_type]
|
154
|
+
v_type = Regexp.last_match[:v_type]
|
155
|
+
{}.tap do |hash|
|
156
|
+
value.each do |k, v|
|
157
|
+
hash[_deserialize(k_type, k)] = _deserialize(v_type, v)
|
158
|
+
end
|
159
|
+
end
|
160
|
+
else # model
|
161
|
+
MailSlurpClient.const_get(type).build_from_hash(value)
|
162
|
+
end
|
163
|
+
end
|
164
|
+
|
165
|
+
# Returns the string representation of the object
|
166
|
+
# @return [String] String presentation of the object
|
167
|
+
def to_s
|
168
|
+
to_hash.to_s
|
169
|
+
end
|
170
|
+
|
171
|
+
# to_body is an alias to to_hash (backward compatibility)
|
172
|
+
# @return [Hash] Returns the object in the form of hash
|
173
|
+
def to_body
|
174
|
+
to_hash
|
175
|
+
end
|
176
|
+
|
177
|
+
# Returns the object in the form of hash
|
178
|
+
# @return [Hash] Returns the object in the form of hash
|
179
|
+
def to_hash
|
180
|
+
hash = {}
|
181
|
+
self.class.attribute_map.each_pair do |attr, param|
|
182
|
+
value = self.send(attr)
|
183
|
+
if value.nil?
|
184
|
+
is_nullable = self.class.openapi_nullable.include?(attr)
|
185
|
+
next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}"))
|
186
|
+
end
|
187
|
+
|
188
|
+
hash[param] = _to_hash(value)
|
189
|
+
end
|
190
|
+
hash
|
191
|
+
end
|
192
|
+
|
193
|
+
# Outputs non-array value in the form of hash
|
194
|
+
# For object, use to_hash. Otherwise, just return the value
|
195
|
+
# @param [Object] value Any valid value
|
196
|
+
# @return [Hash] Returns the value in the form of hash
|
197
|
+
def _to_hash(value)
|
198
|
+
if value.is_a?(Array)
|
199
|
+
value.compact.map { |v| _to_hash(v) }
|
200
|
+
elsif value.is_a?(Hash)
|
201
|
+
{}.tap do |hash|
|
202
|
+
value.each { |k, v| hash[k] = _to_hash(v) }
|
203
|
+
end
|
204
|
+
elsif value.respond_to? :to_hash
|
205
|
+
value.to_hash
|
206
|
+
else
|
207
|
+
value
|
208
|
+
end
|
209
|
+
end
|
210
|
+
end
|
211
|
+
end
|