mailslurp_client 13.1.0 → 14.0.3
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 +110 -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 +262 -0
- data/lib/mailslurp_client/models/create_inbox_dto.rb +1 -1
- data/lib/mailslurp_client/models/create_inbox_forwarder_options.rb +17 -28
- data/lib/mailslurp_client/models/expiration_defaults.rb +18 -4
- data/lib/mailslurp_client/models/flush_expired_inboxes_result.rb +227 -0
- data/lib/mailslurp_client/models/{inbox_projection.rb → inbox_preview.rb} +22 -24
- data/lib/mailslurp_client/models/json_schema_dto.rb +211 -0
- data/lib/mailslurp_client/models/page_inbox_projection.rb +1 -1
- data/lib/mailslurp_client/models/unseen_error_count_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/models/webhook_result_dto.rb +10 -1
- data/lib/mailslurp_client/version.rb +1 -1
- data/lib/mailslurp_client.rb +4 -1
- metadata +6 -3
@@ -89,6 +89,58 @@ module MailSlurpClient
|
|
89
89
|
return data, status_code, headers
|
90
90
|
end
|
91
91
|
|
92
|
+
# Delete all webhooks
|
93
|
+
# @param [Hash] opts the optional parameters
|
94
|
+
# @return [nil]
|
95
|
+
def delete_all_webhooks(opts = {})
|
96
|
+
delete_all_webhooks_with_http_info(opts)
|
97
|
+
nil
|
98
|
+
end
|
99
|
+
|
100
|
+
# Delete all webhooks
|
101
|
+
# @param [Hash] opts the optional parameters
|
102
|
+
# @return [Array<(nil, Integer, Hash)>] nil, response status code and response headers
|
103
|
+
def delete_all_webhooks_with_http_info(opts = {})
|
104
|
+
if @api_client.config.debugging
|
105
|
+
@api_client.config.logger.debug 'Calling API: WebhookControllerApi.delete_all_webhooks ...'
|
106
|
+
end
|
107
|
+
# resource path
|
108
|
+
local_var_path = '/webhooks'
|
109
|
+
|
110
|
+
# query parameters
|
111
|
+
query_params = opts[:query_params] || {}
|
112
|
+
|
113
|
+
# header parameters
|
114
|
+
header_params = opts[:header_params] || {}
|
115
|
+
|
116
|
+
# form parameters
|
117
|
+
form_params = opts[:form_params] || {}
|
118
|
+
|
119
|
+
# http body (model)
|
120
|
+
post_body = opts[:body]
|
121
|
+
|
122
|
+
# return_type
|
123
|
+
return_type = opts[:return_type]
|
124
|
+
|
125
|
+
# auth_names
|
126
|
+
auth_names = opts[:auth_names] || ['API_KEY']
|
127
|
+
|
128
|
+
new_options = opts.merge(
|
129
|
+
:header_params => header_params,
|
130
|
+
:query_params => query_params,
|
131
|
+
:form_params => form_params,
|
132
|
+
:body => post_body,
|
133
|
+
:auth_names => auth_names,
|
134
|
+
:return_type => return_type
|
135
|
+
)
|
136
|
+
|
137
|
+
data, status_code, headers = @api_client.call_api(:DELETE, local_var_path, new_options)
|
138
|
+
if @api_client.config.debugging
|
139
|
+
@api_client.config.logger.debug "API called: WebhookControllerApi#delete_all_webhooks\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
140
|
+
end
|
141
|
+
return data, status_code, headers
|
142
|
+
end
|
143
|
+
|
92
144
|
# Delete and disable a Webhook for an Inbox
|
93
145
|
# @param inbox_id [String] inboxId
|
94
146
|
# @param webhook_id [String] webhookId
|
@@ -155,10 +207,13 @@ module MailSlurpClient
|
|
155
207
|
|
156
208
|
# Get results for all webhooks
|
157
209
|
# @param [Hash] opts the optional parameters
|
210
|
+
# @option opts [DateTime] :before Filter by created at before the given timestamp
|
158
211
|
# @option opts [Integer] :page Optional page index in list pagination (default to 0)
|
159
212
|
# @option opts [String] :search_filter Optional search filter
|
213
|
+
# @option opts [DateTime] :since Filter by created at after the given timestamp
|
160
214
|
# @option opts [Integer] :size Optional page size in list pagination (default to 20)
|
161
215
|
# @option opts [String] :sort Optional createdAt sort direction ASC or DESC (default to 'ASC')
|
216
|
+
# @option opts [Boolean] :unseen_only Filter for unseen exceptions only
|
162
217
|
# @return [PageWebhookResult]
|
163
218
|
def get_all_webhook_results(opts = {})
|
164
219
|
data, _status_code, _headers = get_all_webhook_results_with_http_info(opts)
|
@@ -167,10 +222,13 @@ module MailSlurpClient
|
|
167
222
|
|
168
223
|
# Get results for all webhooks
|
169
224
|
# @param [Hash] opts the optional parameters
|
225
|
+
# @option opts [DateTime] :before Filter by created at before the given timestamp
|
170
226
|
# @option opts [Integer] :page Optional page index in list pagination
|
171
227
|
# @option opts [String] :search_filter Optional search filter
|
228
|
+
# @option opts [DateTime] :since Filter by created at after the given timestamp
|
172
229
|
# @option opts [Integer] :size Optional page size in list pagination
|
173
230
|
# @option opts [String] :sort Optional createdAt sort direction ASC or DESC
|
231
|
+
# @option opts [Boolean] :unseen_only Filter for unseen exceptions only
|
174
232
|
# @return [Array<(PageWebhookResult, Integer, Hash)>] PageWebhookResult data, response status code and response headers
|
175
233
|
def get_all_webhook_results_with_http_info(opts = {})
|
176
234
|
if @api_client.config.debugging
|
@@ -185,10 +243,13 @@ module MailSlurpClient
|
|
185
243
|
|
186
244
|
# query parameters
|
187
245
|
query_params = opts[:query_params] || {}
|
246
|
+
query_params[:'before'] = opts[:'before'] if !opts[:'before'].nil?
|
188
247
|
query_params[:'page'] = opts[:'page'] if !opts[:'page'].nil?
|
189
248
|
query_params[:'searchFilter'] = opts[:'search_filter'] if !opts[:'search_filter'].nil?
|
249
|
+
query_params[:'since'] = opts[:'since'] if !opts[:'since'].nil?
|
190
250
|
query_params[:'size'] = opts[:'size'] if !opts[:'size'].nil?
|
191
251
|
query_params[:'sort'] = opts[:'sort'] if !opts[:'sort'].nil?
|
252
|
+
query_params[:'unseenOnly'] = opts[:'unseen_only'] if !opts[:'unseen_only'].nil?
|
192
253
|
|
193
254
|
# header parameters
|
194
255
|
header_params = opts[:header_params] || {}
|
@@ -226,8 +287,10 @@ module MailSlurpClient
|
|
226
287
|
# List Webhooks Paginated
|
227
288
|
# List webhooks in paginated form. Allows for page index, page size, and sort direction.
|
228
289
|
# @param [Hash] opts the optional parameters
|
290
|
+
# @option opts [DateTime] :before Filter by created at before the given timestamp
|
229
291
|
# @option opts [Integer] :page Optional page index in list pagination (default to 0)
|
230
292
|
# @option opts [String] :search_filter Optional search filter
|
293
|
+
# @option opts [DateTime] :since Filter by created at after the given timestamp
|
231
294
|
# @option opts [Integer] :size Optional page size for paginated result list. (default to 20)
|
232
295
|
# @option opts [String] :sort Optional createdAt sort direction ASC or DESC (default to 'DESC')
|
233
296
|
# @return [PageWebhookProjection]
|
@@ -239,8 +302,10 @@ module MailSlurpClient
|
|
239
302
|
# List Webhooks Paginated
|
240
303
|
# List webhooks in paginated form. Allows for page index, page size, and sort direction.
|
241
304
|
# @param [Hash] opts the optional parameters
|
305
|
+
# @option opts [DateTime] :before Filter by created at before the given timestamp
|
242
306
|
# @option opts [Integer] :page Optional page index in list pagination
|
243
307
|
# @option opts [String] :search_filter Optional search filter
|
308
|
+
# @option opts [DateTime] :since Filter by created at after the given timestamp
|
244
309
|
# @option opts [Integer] :size Optional page size for paginated result list.
|
245
310
|
# @option opts [String] :sort Optional createdAt sort direction ASC or DESC
|
246
311
|
# @return [Array<(PageWebhookProjection, Integer, Hash)>] PageWebhookProjection data, response status code and response headers
|
@@ -257,8 +322,10 @@ module MailSlurpClient
|
|
257
322
|
|
258
323
|
# query parameters
|
259
324
|
query_params = opts[:query_params] || {}
|
325
|
+
query_params[:'before'] = opts[:'before'] if !opts[:'before'].nil?
|
260
326
|
query_params[:'page'] = opts[:'page'] if !opts[:'page'].nil?
|
261
327
|
query_params[:'searchFilter'] = opts[:'search_filter'] if !opts[:'search_filter'].nil?
|
328
|
+
query_params[:'since'] = opts[:'since'] if !opts[:'since'].nil?
|
262
329
|
query_params[:'size'] = opts[:'size'] if !opts[:'size'].nil?
|
263
330
|
query_params[:'sort'] = opts[:'sort'] if !opts[:'sort'].nil?
|
264
331
|
|
@@ -298,8 +365,10 @@ module MailSlurpClient
|
|
298
365
|
# Get paginated webhooks for an Inbox
|
299
366
|
# @param inbox_id [String] inboxId
|
300
367
|
# @param [Hash] opts the optional parameters
|
368
|
+
# @option opts [DateTime] :before Filter by created at before the given timestamp
|
301
369
|
# @option opts [Integer] :page Optional page index in list pagination (default to 0)
|
302
370
|
# @option opts [String] :search_filter Optional search filter
|
371
|
+
# @option opts [DateTime] :since Filter by created at after the given timestamp
|
303
372
|
# @option opts [Integer] :size Optional page size in list pagination (default to 20)
|
304
373
|
# @option opts [String] :sort Optional createdAt sort direction ASC or DESC (default to 'ASC')
|
305
374
|
# @return [PageWebhookProjection]
|
@@ -311,8 +380,10 @@ module MailSlurpClient
|
|
311
380
|
# Get paginated webhooks for an Inbox
|
312
381
|
# @param inbox_id [String] inboxId
|
313
382
|
# @param [Hash] opts the optional parameters
|
383
|
+
# @option opts [DateTime] :before Filter by created at before the given timestamp
|
314
384
|
# @option opts [Integer] :page Optional page index in list pagination
|
315
385
|
# @option opts [String] :search_filter Optional search filter
|
386
|
+
# @option opts [DateTime] :since Filter by created at after the given timestamp
|
316
387
|
# @option opts [Integer] :size Optional page size in list pagination
|
317
388
|
# @option opts [String] :sort Optional createdAt sort direction ASC or DESC
|
318
389
|
# @return [Array<(PageWebhookProjection, Integer, Hash)>] PageWebhookProjection data, response status code and response headers
|
@@ -333,8 +404,10 @@ module MailSlurpClient
|
|
333
404
|
|
334
405
|
# query parameters
|
335
406
|
query_params = opts[:query_params] || {}
|
407
|
+
query_params[:'before'] = opts[:'before'] if !opts[:'before'].nil?
|
336
408
|
query_params[:'page'] = opts[:'page'] if !opts[:'page'].nil?
|
337
409
|
query_params[:'searchFilter'] = opts[:'search_filter'] if !opts[:'search_filter'].nil?
|
410
|
+
query_params[:'since'] = opts[:'since'] if !opts[:'since'].nil?
|
338
411
|
query_params[:'size'] = opts[:'size'] if !opts[:'size'].nil?
|
339
412
|
query_params[:'sort'] = opts[:'sort'] if !opts[:'sort'].nil?
|
340
413
|
|
@@ -371,6 +444,66 @@ module MailSlurpClient
|
|
371
444
|
return data, status_code, headers
|
372
445
|
end
|
373
446
|
|
447
|
+
# Get JSON Schema definition for webhook payload
|
448
|
+
# @param webhook_id [String] webhookId
|
449
|
+
# @param [Hash] opts the optional parameters
|
450
|
+
# @return [JSONSchemaDto]
|
451
|
+
def get_json_schema_for_webhook_payload(webhook_id, opts = {})
|
452
|
+
data, _status_code, _headers = get_json_schema_for_webhook_payload_with_http_info(webhook_id, opts)
|
453
|
+
data
|
454
|
+
end
|
455
|
+
|
456
|
+
# Get JSON Schema definition for webhook payload
|
457
|
+
# @param webhook_id [String] webhookId
|
458
|
+
# @param [Hash] opts the optional parameters
|
459
|
+
# @return [Array<(JSONSchemaDto, Integer, Hash)>] JSONSchemaDto data, response status code and response headers
|
460
|
+
def get_json_schema_for_webhook_payload_with_http_info(webhook_id, opts = {})
|
461
|
+
if @api_client.config.debugging
|
462
|
+
@api_client.config.logger.debug 'Calling API: WebhookControllerApi.get_json_schema_for_webhook_payload ...'
|
463
|
+
end
|
464
|
+
# verify the required parameter 'webhook_id' is set
|
465
|
+
if @api_client.config.client_side_validation && webhook_id.nil?
|
466
|
+
fail ArgumentError, "Missing the required parameter 'webhook_id' when calling WebhookControllerApi.get_json_schema_for_webhook_payload"
|
467
|
+
end
|
468
|
+
# resource path
|
469
|
+
local_var_path = '/webhooks/{webhookId}/schema'.sub('{' + 'webhookId' + '}', CGI.escape(webhook_id.to_s))
|
470
|
+
|
471
|
+
# query parameters
|
472
|
+
query_params = opts[:query_params] || {}
|
473
|
+
|
474
|
+
# header parameters
|
475
|
+
header_params = opts[:header_params] || {}
|
476
|
+
# HTTP header 'Accept' (if needed)
|
477
|
+
header_params['Accept'] = @api_client.select_header_accept(['application/json'])
|
478
|
+
|
479
|
+
# form parameters
|
480
|
+
form_params = opts[:form_params] || {}
|
481
|
+
|
482
|
+
# http body (model)
|
483
|
+
post_body = opts[:body]
|
484
|
+
|
485
|
+
# return_type
|
486
|
+
return_type = opts[:return_type] || 'JSONSchemaDto'
|
487
|
+
|
488
|
+
# auth_names
|
489
|
+
auth_names = opts[:auth_names] || ['API_KEY']
|
490
|
+
|
491
|
+
new_options = opts.merge(
|
492
|
+
:header_params => header_params,
|
493
|
+
:query_params => query_params,
|
494
|
+
:form_params => form_params,
|
495
|
+
:body => post_body,
|
496
|
+
:auth_names => auth_names,
|
497
|
+
:return_type => return_type
|
498
|
+
)
|
499
|
+
|
500
|
+
data, status_code, headers = @api_client.call_api(:POST, local_var_path, new_options)
|
501
|
+
if @api_client.config.debugging
|
502
|
+
@api_client.config.logger.debug "API called: WebhookControllerApi#get_json_schema_for_webhook_payload\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
503
|
+
end
|
504
|
+
return data, status_code, headers
|
505
|
+
end
|
506
|
+
|
374
507
|
# Get test webhook payload example. Response content depends on eventName passed. Uses `EMAIL_RECEIVED` as default.
|
375
508
|
# @param [Hash] opts the optional parameters
|
376
509
|
# @option opts [String] :event_name eventName
|
@@ -540,6 +673,66 @@ module MailSlurpClient
|
|
540
673
|
return data, status_code, headers
|
541
674
|
end
|
542
675
|
|
676
|
+
# Get example payload for webhook
|
677
|
+
# @param webhook_id [String] webhookId
|
678
|
+
# @param [Hash] opts the optional parameters
|
679
|
+
# @return [AbstractWebhookPayload]
|
680
|
+
def get_test_webhook_payload_for_webhook(webhook_id, opts = {})
|
681
|
+
data, _status_code, _headers = get_test_webhook_payload_for_webhook_with_http_info(webhook_id, opts)
|
682
|
+
data
|
683
|
+
end
|
684
|
+
|
685
|
+
# Get example payload for webhook
|
686
|
+
# @param webhook_id [String] webhookId
|
687
|
+
# @param [Hash] opts the optional parameters
|
688
|
+
# @return [Array<(AbstractWebhookPayload, Integer, Hash)>] AbstractWebhookPayload data, response status code and response headers
|
689
|
+
def get_test_webhook_payload_for_webhook_with_http_info(webhook_id, opts = {})
|
690
|
+
if @api_client.config.debugging
|
691
|
+
@api_client.config.logger.debug 'Calling API: WebhookControllerApi.get_test_webhook_payload_for_webhook ...'
|
692
|
+
end
|
693
|
+
# verify the required parameter 'webhook_id' is set
|
694
|
+
if @api_client.config.client_side_validation && webhook_id.nil?
|
695
|
+
fail ArgumentError, "Missing the required parameter 'webhook_id' when calling WebhookControllerApi.get_test_webhook_payload_for_webhook"
|
696
|
+
end
|
697
|
+
# resource path
|
698
|
+
local_var_path = '/webhooks/{webhookId}/example'.sub('{' + 'webhookId' + '}', CGI.escape(webhook_id.to_s))
|
699
|
+
|
700
|
+
# query parameters
|
701
|
+
query_params = opts[:query_params] || {}
|
702
|
+
|
703
|
+
# header parameters
|
704
|
+
header_params = opts[:header_params] || {}
|
705
|
+
# HTTP header 'Accept' (if needed)
|
706
|
+
header_params['Accept'] = @api_client.select_header_accept(['application/json'])
|
707
|
+
|
708
|
+
# form parameters
|
709
|
+
form_params = opts[:form_params] || {}
|
710
|
+
|
711
|
+
# http body (model)
|
712
|
+
post_body = opts[:body]
|
713
|
+
|
714
|
+
# return_type
|
715
|
+
return_type = opts[:return_type] || 'AbstractWebhookPayload'
|
716
|
+
|
717
|
+
# auth_names
|
718
|
+
auth_names = opts[:auth_names] || ['API_KEY']
|
719
|
+
|
720
|
+
new_options = opts.merge(
|
721
|
+
:header_params => header_params,
|
722
|
+
:query_params => query_params,
|
723
|
+
:form_params => form_params,
|
724
|
+
:body => post_body,
|
725
|
+
:auth_names => auth_names,
|
726
|
+
:return_type => return_type
|
727
|
+
)
|
728
|
+
|
729
|
+
data, status_code, headers = @api_client.call_api(:POST, local_var_path, new_options)
|
730
|
+
if @api_client.config.debugging
|
731
|
+
@api_client.config.logger.debug "API called: WebhookControllerApi#get_test_webhook_payload_for_webhook\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
732
|
+
end
|
733
|
+
return data, status_code, headers
|
734
|
+
end
|
735
|
+
|
543
736
|
# Get webhook test payload for new attachment event
|
544
737
|
# @param [Hash] opts the optional parameters
|
545
738
|
# @return [WebhookNewAttachmentPayload]
|
@@ -825,10 +1018,13 @@ module MailSlurpClient
|
|
825
1018
|
# Get a webhook results for a webhook
|
826
1019
|
# @param webhook_id [String] ID of webhook to get results for
|
827
1020
|
# @param [Hash] opts the optional parameters
|
1021
|
+
# @option opts [DateTime] :before Filter by created at before the given timestamp
|
828
1022
|
# @option opts [Integer] :page Optional page index in list pagination (default to 0)
|
829
1023
|
# @option opts [String] :search_filter Optional search filter
|
1024
|
+
# @option opts [DateTime] :since Filter by created at after the given timestamp
|
830
1025
|
# @option opts [Integer] :size Optional page size in list pagination (default to 20)
|
831
1026
|
# @option opts [String] :sort Optional createdAt sort direction ASC or DESC (default to 'ASC')
|
1027
|
+
# @option opts [Boolean] :unseen_only Filter for unseen exceptions only
|
832
1028
|
# @return [PageWebhookResult]
|
833
1029
|
def get_webhook_results(webhook_id, opts = {})
|
834
1030
|
data, _status_code, _headers = get_webhook_results_with_http_info(webhook_id, opts)
|
@@ -838,10 +1034,13 @@ module MailSlurpClient
|
|
838
1034
|
# Get a webhook results for a webhook
|
839
1035
|
# @param webhook_id [String] ID of webhook to get results for
|
840
1036
|
# @param [Hash] opts the optional parameters
|
1037
|
+
# @option opts [DateTime] :before Filter by created at before the given timestamp
|
841
1038
|
# @option opts [Integer] :page Optional page index in list pagination
|
842
1039
|
# @option opts [String] :search_filter Optional search filter
|
1040
|
+
# @option opts [DateTime] :since Filter by created at after the given timestamp
|
843
1041
|
# @option opts [Integer] :size Optional page size in list pagination
|
844
1042
|
# @option opts [String] :sort Optional createdAt sort direction ASC or DESC
|
1043
|
+
# @option opts [Boolean] :unseen_only Filter for unseen exceptions only
|
845
1044
|
# @return [Array<(PageWebhookResult, Integer, Hash)>] PageWebhookResult data, response status code and response headers
|
846
1045
|
def get_webhook_results_with_http_info(webhook_id, opts = {})
|
847
1046
|
if @api_client.config.debugging
|
@@ -860,10 +1059,13 @@ module MailSlurpClient
|
|
860
1059
|
|
861
1060
|
# query parameters
|
862
1061
|
query_params = opts[:query_params] || {}
|
1062
|
+
query_params[:'before'] = opts[:'before'] if !opts[:'before'].nil?
|
863
1063
|
query_params[:'page'] = opts[:'page'] if !opts[:'page'].nil?
|
864
1064
|
query_params[:'searchFilter'] = opts[:'search_filter'] if !opts[:'search_filter'].nil?
|
1065
|
+
query_params[:'since'] = opts[:'since'] if !opts[:'since'].nil?
|
865
1066
|
query_params[:'size'] = opts[:'size'] if !opts[:'size'].nil?
|
866
1067
|
query_params[:'sort'] = opts[:'sort'] if !opts[:'sort'].nil?
|
1068
|
+
query_params[:'unseenOnly'] = opts[:'unseen_only'] if !opts[:'unseen_only'].nil?
|
867
1069
|
|
868
1070
|
# header parameters
|
869
1071
|
header_params = opts[:header_params] || {}
|
@@ -898,6 +1100,66 @@ module MailSlurpClient
|
|
898
1100
|
return data, status_code, headers
|
899
1101
|
end
|
900
1102
|
|
1103
|
+
# Get count of unseen webhook results with error status
|
1104
|
+
# @param inbox_id [String] inboxId
|
1105
|
+
# @param [Hash] opts the optional parameters
|
1106
|
+
# @return [UnseenErrorCountDto]
|
1107
|
+
def get_webhook_results_unseen_error_count(inbox_id, opts = {})
|
1108
|
+
data, _status_code, _headers = get_webhook_results_unseen_error_count_with_http_info(inbox_id, opts)
|
1109
|
+
data
|
1110
|
+
end
|
1111
|
+
|
1112
|
+
# Get count of unseen webhook results with error status
|
1113
|
+
# @param inbox_id [String] inboxId
|
1114
|
+
# @param [Hash] opts the optional parameters
|
1115
|
+
# @return [Array<(UnseenErrorCountDto, Integer, Hash)>] UnseenErrorCountDto data, response status code and response headers
|
1116
|
+
def get_webhook_results_unseen_error_count_with_http_info(inbox_id, opts = {})
|
1117
|
+
if @api_client.config.debugging
|
1118
|
+
@api_client.config.logger.debug 'Calling API: WebhookControllerApi.get_webhook_results_unseen_error_count ...'
|
1119
|
+
end
|
1120
|
+
# verify the required parameter 'inbox_id' is set
|
1121
|
+
if @api_client.config.client_side_validation && inbox_id.nil?
|
1122
|
+
fail ArgumentError, "Missing the required parameter 'inbox_id' when calling WebhookControllerApi.get_webhook_results_unseen_error_count"
|
1123
|
+
end
|
1124
|
+
# resource path
|
1125
|
+
local_var_path = '/webhooks/results/unseen-count'.sub('{' + 'inboxId' + '}', CGI.escape(inbox_id.to_s))
|
1126
|
+
|
1127
|
+
# query parameters
|
1128
|
+
query_params = opts[:query_params] || {}
|
1129
|
+
|
1130
|
+
# header parameters
|
1131
|
+
header_params = opts[:header_params] || {}
|
1132
|
+
# HTTP header 'Accept' (if needed)
|
1133
|
+
header_params['Accept'] = @api_client.select_header_accept(['application/json'])
|
1134
|
+
|
1135
|
+
# form parameters
|
1136
|
+
form_params = opts[:form_params] || {}
|
1137
|
+
|
1138
|
+
# http body (model)
|
1139
|
+
post_body = opts[:body]
|
1140
|
+
|
1141
|
+
# return_type
|
1142
|
+
return_type = opts[:return_type] || 'UnseenErrorCountDto'
|
1143
|
+
|
1144
|
+
# auth_names
|
1145
|
+
auth_names = opts[:auth_names] || ['API_KEY']
|
1146
|
+
|
1147
|
+
new_options = opts.merge(
|
1148
|
+
:header_params => header_params,
|
1149
|
+
:query_params => query_params,
|
1150
|
+
:form_params => form_params,
|
1151
|
+
:body => post_body,
|
1152
|
+
:auth_names => auth_names,
|
1153
|
+
:return_type => return_type
|
1154
|
+
)
|
1155
|
+
|
1156
|
+
data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options)
|
1157
|
+
if @api_client.config.debugging
|
1158
|
+
@api_client.config.logger.debug "API called: WebhookControllerApi#get_webhook_results_unseen_error_count\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
1159
|
+
end
|
1160
|
+
return data, status_code, headers
|
1161
|
+
end
|
1162
|
+
|
901
1163
|
# Get all webhooks for an Inbox
|
902
1164
|
# @param inbox_id [String] inboxId
|
903
1165
|
# @param [Hash] opts the optional parameters
|
@@ -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
|
@@ -13,13 +13,17 @@ OpenAPI Generator version: 4.3.1
|
|
13
13
|
require 'date'
|
14
14
|
|
15
15
|
module MailSlurpClient
|
16
|
+
# Options for creating an inbox forwarder
|
16
17
|
class CreateInboxForwarderOptions
|
18
|
+
# Field to match against to trigger inbox forwarding for inbound email
|
17
19
|
attr_accessor :field
|
18
20
|
|
19
|
-
|
20
|
-
|
21
|
+
# Email addresses to forward an email to if it matches the field and match criteria of the forwarder
|
21
22
|
attr_accessor :forward_to_recipients
|
22
23
|
|
24
|
+
# String or wildcard style match for field specified when evaluating forwarding rules
|
25
|
+
attr_accessor :match
|
26
|
+
|
23
27
|
class EnumAttributeValidator
|
24
28
|
attr_reader :datatype
|
25
29
|
attr_reader :allowable_values
|
@@ -46,8 +50,8 @@ module MailSlurpClient
|
|
46
50
|
def self.attribute_map
|
47
51
|
{
|
48
52
|
:'field' => :'field',
|
49
|
-
:'
|
50
|
-
:'
|
53
|
+
:'forward_to_recipients' => :'forwardToRecipients',
|
54
|
+
:'match' => :'match'
|
51
55
|
}
|
52
56
|
end
|
53
57
|
|
@@ -55,8 +59,8 @@ module MailSlurpClient
|
|
55
59
|
def self.openapi_types
|
56
60
|
{
|
57
61
|
:'field' => :'String',
|
58
|
-
:'
|
59
|
-
:'
|
62
|
+
:'forward_to_recipients' => :'Array<String>',
|
63
|
+
:'match' => :'String'
|
60
64
|
}
|
61
65
|
end
|
62
66
|
|
@@ -85,44 +89,29 @@ module MailSlurpClient
|
|
85
89
|
self.field = attributes[:'field']
|
86
90
|
end
|
87
91
|
|
88
|
-
if attributes.key?(:'match')
|
89
|
-
self.match = attributes[:'match']
|
90
|
-
end
|
91
|
-
|
92
92
|
if attributes.key?(:'forward_to_recipients')
|
93
93
|
if (value = attributes[:'forward_to_recipients']).is_a?(Array)
|
94
94
|
self.forward_to_recipients = value
|
95
95
|
end
|
96
96
|
end
|
97
|
+
|
98
|
+
if attributes.key?(:'match')
|
99
|
+
self.match = attributes[:'match']
|
100
|
+
end
|
97
101
|
end
|
98
102
|
|
99
103
|
# Show invalid properties with the reasons. Usually used together with valid?
|
100
104
|
# @return Array for valid properties with the reasons
|
101
105
|
def list_invalid_properties
|
102
106
|
invalid_properties = Array.new
|
103
|
-
if @field.nil?
|
104
|
-
invalid_properties.push('invalid value for "field", field cannot be nil.')
|
105
|
-
end
|
106
|
-
|
107
|
-
if @match.nil?
|
108
|
-
invalid_properties.push('invalid value for "match", match cannot be nil.')
|
109
|
-
end
|
110
|
-
|
111
|
-
if @forward_to_recipients.nil?
|
112
|
-
invalid_properties.push('invalid value for "forward_to_recipients", forward_to_recipients cannot be nil.')
|
113
|
-
end
|
114
|
-
|
115
107
|
invalid_properties
|
116
108
|
end
|
117
109
|
|
118
110
|
# Check to see if the all the properties in the model are valid
|
119
111
|
# @return true if the model is valid
|
120
112
|
def valid?
|
121
|
-
return false if @field.nil?
|
122
113
|
field_validator = EnumAttributeValidator.new('String', ["RECIPIENTS", "SENDER", "SUBJECT", "ATTACHMENTS"])
|
123
114
|
return false unless field_validator.valid?(@field)
|
124
|
-
return false if @match.nil?
|
125
|
-
return false if @forward_to_recipients.nil?
|
126
115
|
true
|
127
116
|
end
|
128
117
|
|
@@ -142,8 +131,8 @@ module MailSlurpClient
|
|
142
131
|
return true if self.equal?(o)
|
143
132
|
self.class == o.class &&
|
144
133
|
field == o.field &&
|
145
|
-
|
146
|
-
|
134
|
+
forward_to_recipients == o.forward_to_recipients &&
|
135
|
+
match == o.match
|
147
136
|
end
|
148
137
|
|
149
138
|
# @see the `==` method
|
@@ -155,7 +144,7 @@ module MailSlurpClient
|
|
155
144
|
# Calculates hash code according to all attributes.
|
156
145
|
# @return [Integer] Hash code
|
157
146
|
def hash
|
158
|
-
[field,
|
147
|
+
[field, forward_to_recipients, match].hash
|
159
148
|
end
|
160
149
|
|
161
150
|
# Builds the object from hash
|
@@ -23,13 +23,16 @@ module MailSlurpClient
|
|
23
23
|
|
24
24
|
attr_accessor :max_expiration_millis
|
25
25
|
|
26
|
+
attr_accessor :next_inbox_allows_permanent
|
27
|
+
|
26
28
|
# Attribute mapping from ruby-style variable name to JSON key.
|
27
29
|
def self.attribute_map
|
28
30
|
{
|
29
31
|
:'can_permanent_inbox' => :'canPermanentInbox',
|
30
32
|
:'default_expiration_millis' => :'defaultExpirationMillis',
|
31
33
|
:'default_expires_at' => :'defaultExpiresAt',
|
32
|
-
:'max_expiration_millis' => :'maxExpirationMillis'
|
34
|
+
:'max_expiration_millis' => :'maxExpirationMillis',
|
35
|
+
:'next_inbox_allows_permanent' => :'nextInboxAllowsPermanent'
|
33
36
|
}
|
34
37
|
end
|
35
38
|
|
@@ -39,7 +42,8 @@ module MailSlurpClient
|
|
39
42
|
:'can_permanent_inbox' => :'Boolean',
|
40
43
|
:'default_expiration_millis' => :'Integer',
|
41
44
|
:'default_expires_at' => :'DateTime',
|
42
|
-
:'max_expiration_millis' => :'Integer'
|
45
|
+
:'max_expiration_millis' => :'Integer',
|
46
|
+
:'next_inbox_allows_permanent' => :'Boolean'
|
43
47
|
}
|
44
48
|
end
|
45
49
|
|
@@ -79,6 +83,10 @@ module MailSlurpClient
|
|
79
83
|
if attributes.key?(:'max_expiration_millis')
|
80
84
|
self.max_expiration_millis = attributes[:'max_expiration_millis']
|
81
85
|
end
|
86
|
+
|
87
|
+
if attributes.key?(:'next_inbox_allows_permanent')
|
88
|
+
self.next_inbox_allows_permanent = attributes[:'next_inbox_allows_permanent']
|
89
|
+
end
|
82
90
|
end
|
83
91
|
|
84
92
|
# Show invalid properties with the reasons. Usually used together with valid?
|
@@ -89,6 +97,10 @@ module MailSlurpClient
|
|
89
97
|
invalid_properties.push('invalid value for "can_permanent_inbox", can_permanent_inbox cannot be nil.')
|
90
98
|
end
|
91
99
|
|
100
|
+
if @next_inbox_allows_permanent.nil?
|
101
|
+
invalid_properties.push('invalid value for "next_inbox_allows_permanent", next_inbox_allows_permanent cannot be nil.')
|
102
|
+
end
|
103
|
+
|
92
104
|
invalid_properties
|
93
105
|
end
|
94
106
|
|
@@ -96,6 +108,7 @@ module MailSlurpClient
|
|
96
108
|
# @return true if the model is valid
|
97
109
|
def valid?
|
98
110
|
return false if @can_permanent_inbox.nil?
|
111
|
+
return false if @next_inbox_allows_permanent.nil?
|
99
112
|
true
|
100
113
|
end
|
101
114
|
|
@@ -107,7 +120,8 @@ module MailSlurpClient
|
|
107
120
|
can_permanent_inbox == o.can_permanent_inbox &&
|
108
121
|
default_expiration_millis == o.default_expiration_millis &&
|
109
122
|
default_expires_at == o.default_expires_at &&
|
110
|
-
max_expiration_millis == o.max_expiration_millis
|
123
|
+
max_expiration_millis == o.max_expiration_millis &&
|
124
|
+
next_inbox_allows_permanent == o.next_inbox_allows_permanent
|
111
125
|
end
|
112
126
|
|
113
127
|
# @see the `==` method
|
@@ -119,7 +133,7 @@ module MailSlurpClient
|
|
119
133
|
# Calculates hash code according to all attributes.
|
120
134
|
# @return [Integer] Hash code
|
121
135
|
def hash
|
122
|
-
[can_permanent_inbox, default_expiration_millis, default_expires_at, max_expiration_millis].hash
|
136
|
+
[can_permanent_inbox, default_expiration_millis, default_expires_at, max_expiration_millis, next_inbox_allows_permanent].hash
|
123
137
|
end
|
124
138
|
|
125
139
|
# Builds the object from hash
|