Class: MailSlurpClient::WebhookControllerApi

Inherits:
Object
  • Object
show all
Defined in:
lib/mailslurp_client/api/webhook_controller_api.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(api_client = ApiClient.default) ⇒ WebhookControllerApi

Returns a new instance of WebhookControllerApi.



19
20
21
# File 'lib/mailslurp_client/api/webhook_controller_api.rb', line 19

def initialize(api_client = ApiClient.default)
  @api_client = api_client
end

Instance Attribute Details

#api_clientObject

Returns the value of attribute api_client.



17
18
19
# File 'lib/mailslurp_client/api/webhook_controller_api.rb', line 17

def api_client
  @api_client
end

Instance Method Details

#create_account_webhook(create_webhook_options, opts = {}) ⇒ WebhookDto

Attach a WebHook URL to an inbox Get notified of account level events such as bounce and bounce recipient.

Parameters:

  • create_webhook_options (CreateWebhookOptions)
  • opts (Hash) (defaults to: {})

    the optional parameters

Returns:



27
28
29
30
# File 'lib/mailslurp_client/api/webhook_controller_api.rb', line 27

def (create_webhook_options, opts = {})
  data, _status_code, _headers = (create_webhook_options, opts)
  data
end

#create_account_webhook_with_http_info(create_webhook_options, opts = {}) ⇒ Array<(WebhookDto, Integer, Hash)>

Attach a WebHook URL to an inbox Get notified of account level events such as bounce and bounce recipient.

Parameters:

  • create_webhook_options (CreateWebhookOptions)
  • opts (Hash) (defaults to: {})

    the optional parameters

Returns:

  • (Array<(WebhookDto, Integer, Hash)>)

    WebhookDto data, response status code and response headers



37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
# File 'lib/mailslurp_client/api/webhook_controller_api.rb', line 37

def (create_webhook_options, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug 'Calling API: WebhookControllerApi.create_account_webhook ...'
  end
  # verify the required parameter 'create_webhook_options' is set
  if @api_client.config.client_side_validation && create_webhook_options.nil?
    fail ArgumentError, "Missing the required parameter 'create_webhook_options' when calling WebhookControllerApi.create_account_webhook"
  end
  # resource path
  local_var_path = '/webhooks'

  # query parameters
  query_params = opts[:query_params] || {}

  # header parameters
  header_params = opts[:header_params] || {}
  # HTTP header 'Accept' (if needed)
  header_params['Accept'] = @api_client.select_header_accept(['*/*'])
  # HTTP header 'Content-Type'
  header_params['Content-Type'] = @api_client.select_header_content_type(['application/json'])

  # form parameters
  form_params = opts[:form_params] || {}

  # http body (model)
  post_body = opts[:body] || @api_client.object_to_http_body(create_webhook_options) 

  # return_type
  return_type = opts[:return_type] || 'WebhookDto' 

  # auth_names
  auth_names = opts[:auth_names] || ['API_KEY']

  new_options = opts.merge(
    :header_params => header_params,
    :query_params => query_params,
    :form_params => form_params,
    :body => post_body,
    :auth_names => auth_names,
    :return_type => return_type
  )

  data, status_code, headers = @api_client.call_api(:POST, local_var_path, new_options)
  if @api_client.config.debugging
    @api_client.config.logger.debug "API called: WebhookControllerApi#create_account_webhook\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end

#create_webhook(inbox_id, create_webhook_options, opts = {}) ⇒ WebhookDto

Attach a WebHook URL to an inbox Get notified whenever an inbox receives an email via a WebHook URL. An emailID will be posted to this URL every time an email is received for this inbox. The URL must be publicly reachable by the MailSlurp server. You can provide basicAuth values if you wish to secure this endpoint.

Parameters:

  • inbox_id (String)
  • create_webhook_options (CreateWebhookOptions)
  • opts (Hash) (defaults to: {})

    the optional parameters

Returns:



92
93
94
95
# File 'lib/mailslurp_client/api/webhook_controller_api.rb', line 92

def create_webhook(inbox_id, create_webhook_options, opts = {})
  data, _status_code, _headers = create_webhook_with_http_info(inbox_id, create_webhook_options, opts)
  data
end

#create_webhook_for_ai_transformer(transformer_id, create_webhook_options, opts = {}) ⇒ WebhookDto

Attach a WebHook URL to an AI transformer Get notified whenever AI transformation pipeline converts and email or SMS into structured data via a WebHook URL.

Parameters:

  • transformer_id (String)
  • create_webhook_options (CreateWebhookOptions)
  • opts (Hash) (defaults to: {})

    the optional parameters

Returns:



162
163
164
165
# File 'lib/mailslurp_client/api/webhook_controller_api.rb', line 162

def create_webhook_for_ai_transformer(transformer_id, create_webhook_options, opts = {})
  data, _status_code, _headers = create_webhook_for_ai_transformer_with_http_info(transformer_id, create_webhook_options, opts)
  data
end

#create_webhook_for_ai_transformer_with_http_info(transformer_id, create_webhook_options, opts = {}) ⇒ Array<(WebhookDto, Integer, Hash)>

Attach a WebHook URL to an AI transformer Get notified whenever AI transformation pipeline converts and email or SMS into structured data via a WebHook URL.

Parameters:

  • transformer_id (String)
  • create_webhook_options (CreateWebhookOptions)
  • opts (Hash) (defaults to: {})

    the optional parameters

Returns:

  • (Array<(WebhookDto, Integer, Hash)>)

    WebhookDto data, response status code and response headers



173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
# File 'lib/mailslurp_client/api/webhook_controller_api.rb', line 173

def create_webhook_for_ai_transformer_with_http_info(transformer_id, create_webhook_options, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug 'Calling API: WebhookControllerApi.create_webhook_for_ai_transformer ...'
  end
  # verify the required parameter 'transformer_id' is set
  if @api_client.config.client_side_validation && transformer_id.nil?
    fail ArgumentError, "Missing the required parameter 'transformer_id' when calling WebhookControllerApi.create_webhook_for_ai_transformer"
  end
  # verify the required parameter 'create_webhook_options' is set
  if @api_client.config.client_side_validation && create_webhook_options.nil?
    fail ArgumentError, "Missing the required parameter 'create_webhook_options' when calling WebhookControllerApi.create_webhook_for_ai_transformer"
  end
  # resource path
  local_var_path = '/ai-transformers/{transformerId}/webhooks'.sub('{' + 'transformerId' + '}', CGI.escape(transformer_id.to_s))

  # query parameters
  query_params = opts[:query_params] || {}

  # header parameters
  header_params = opts[:header_params] || {}
  # HTTP header 'Accept' (if needed)
  header_params['Accept'] = @api_client.select_header_accept(['*/*'])
  # HTTP header 'Content-Type'
  header_params['Content-Type'] = @api_client.select_header_content_type(['application/json'])

  # form parameters
  form_params = opts[:form_params] || {}

  # http body (model)
  post_body = opts[:body] || @api_client.object_to_http_body(create_webhook_options) 

  # return_type
  return_type = opts[:return_type] || 'WebhookDto' 

  # auth_names
  auth_names = opts[:auth_names] || ['API_KEY']

  new_options = opts.merge(
    :header_params => header_params,
    :query_params => query_params,
    :form_params => form_params,
    :body => post_body,
    :auth_names => auth_names,
    :return_type => return_type
  )

  data, status_code, headers = @api_client.call_api(:POST, local_var_path, new_options)
  if @api_client.config.debugging
    @api_client.config.logger.debug "API called: WebhookControllerApi#create_webhook_for_ai_transformer\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end

#create_webhook_for_phone_number(phone_number_id, create_webhook_options, opts = {}) ⇒ WebhookDto

Attach a WebHook URL to a phone number Get notified whenever a phone number receives an SMS via a WebHook URL.

Parameters:

  • phone_number_id (String)
  • create_webhook_options (CreateWebhookOptions)
  • opts (Hash) (defaults to: {})

    the optional parameters

Returns:



232
233
234
235
# File 'lib/mailslurp_client/api/webhook_controller_api.rb', line 232

def create_webhook_for_phone_number(phone_number_id, create_webhook_options, opts = {})
  data, _status_code, _headers = create_webhook_for_phone_number_with_http_info(phone_number_id, create_webhook_options, opts)
  data
end

#create_webhook_for_phone_number_with_http_info(phone_number_id, create_webhook_options, opts = {}) ⇒ Array<(WebhookDto, Integer, Hash)>

Attach a WebHook URL to a phone number Get notified whenever a phone number receives an SMS via a WebHook URL.

Parameters:

  • phone_number_id (String)
  • create_webhook_options (CreateWebhookOptions)
  • opts (Hash) (defaults to: {})

    the optional parameters

Returns:

  • (Array<(WebhookDto, Integer, Hash)>)

    WebhookDto data, response status code and response headers



243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
# File 'lib/mailslurp_client/api/webhook_controller_api.rb', line 243

def create_webhook_for_phone_number_with_http_info(phone_number_id, create_webhook_options, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug 'Calling API: WebhookControllerApi.create_webhook_for_phone_number ...'
  end
  # verify the required parameter 'phone_number_id' is set
  if @api_client.config.client_side_validation && phone_number_id.nil?
    fail ArgumentError, "Missing the required parameter 'phone_number_id' when calling WebhookControllerApi.create_webhook_for_phone_number"
  end
  # verify the required parameter 'create_webhook_options' is set
  if @api_client.config.client_side_validation && create_webhook_options.nil?
    fail ArgumentError, "Missing the required parameter 'create_webhook_options' when calling WebhookControllerApi.create_webhook_for_phone_number"
  end
  # resource path
  local_var_path = '/phone/numbers/{phoneNumberId}/webhooks'.sub('{' + 'phoneNumberId' + '}', CGI.escape(phone_number_id.to_s))

  # query parameters
  query_params = opts[:query_params] || {}

  # header parameters
  header_params = opts[:header_params] || {}
  # HTTP header 'Accept' (if needed)
  header_params['Accept'] = @api_client.select_header_accept(['*/*'])
  # HTTP header 'Content-Type'
  header_params['Content-Type'] = @api_client.select_header_content_type(['application/json'])

  # form parameters
  form_params = opts[:form_params] || {}

  # http body (model)
  post_body = opts[:body] || @api_client.object_to_http_body(create_webhook_options) 

  # return_type
  return_type = opts[:return_type] || 'WebhookDto' 

  # auth_names
  auth_names = opts[:auth_names] || ['API_KEY']

  new_options = opts.merge(
    :header_params => header_params,
    :query_params => query_params,
    :form_params => form_params,
    :body => post_body,
    :auth_names => auth_names,
    :return_type => return_type
  )

  data, status_code, headers = @api_client.call_api(:POST, local_var_path, new_options)
  if @api_client.config.debugging
    @api_client.config.logger.debug "API called: WebhookControllerApi#create_webhook_for_phone_number\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end

#create_webhook_with_http_info(inbox_id, create_webhook_options, opts = {}) ⇒ Array<(WebhookDto, Integer, Hash)>

Attach a WebHook URL to an inbox Get notified whenever an inbox receives an email via a WebHook URL. An emailID will be posted to this URL every time an email is received for this inbox. The URL must be publicly reachable by the MailSlurp server. You can provide basicAuth values if you wish to secure this endpoint.

Parameters:

  • inbox_id (String)
  • create_webhook_options (CreateWebhookOptions)
  • opts (Hash) (defaults to: {})

    the optional parameters

Returns:

  • (Array<(WebhookDto, Integer, Hash)>)

    WebhookDto data, response status code and response headers



103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
# File 'lib/mailslurp_client/api/webhook_controller_api.rb', line 103

def create_webhook_with_http_info(inbox_id, create_webhook_options, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug 'Calling API: WebhookControllerApi.create_webhook ...'
  end
  # verify the required parameter 'inbox_id' is set
  if @api_client.config.client_side_validation && inbox_id.nil?
    fail ArgumentError, "Missing the required parameter 'inbox_id' when calling WebhookControllerApi.create_webhook"
  end
  # verify the required parameter 'create_webhook_options' is set
  if @api_client.config.client_side_validation && create_webhook_options.nil?
    fail ArgumentError, "Missing the required parameter 'create_webhook_options' when calling WebhookControllerApi.create_webhook"
  end
  # resource path
  local_var_path = '/inboxes/{inboxId}/webhooks'.sub('{' + 'inboxId' + '}', CGI.escape(inbox_id.to_s))

  # query parameters
  query_params = opts[:query_params] || {}

  # header parameters
  header_params = opts[:header_params] || {}
  # HTTP header 'Accept' (if needed)
  header_params['Accept'] = @api_client.select_header_accept(['*/*'])
  # HTTP header 'Content-Type'
  header_params['Content-Type'] = @api_client.select_header_content_type(['application/json'])

  # form parameters
  form_params = opts[:form_params] || {}

  # http body (model)
  post_body = opts[:body] || @api_client.object_to_http_body(create_webhook_options) 

  # return_type
  return_type = opts[:return_type] || 'WebhookDto' 

  # auth_names
  auth_names = opts[:auth_names] || ['API_KEY']

  new_options = opts.merge(
    :header_params => header_params,
    :query_params => query_params,
    :form_params => form_params,
    :body => post_body,
    :auth_names => auth_names,
    :return_type => return_type
  )

  data, status_code, headers = @api_client.call_api(:POST, local_var_path, new_options)
  if @api_client.config.debugging
    @api_client.config.logger.debug "API called: WebhookControllerApi#create_webhook\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end

#delete_all_webhooks(opts = {}) ⇒ nil

Delete all webhooks

Parameters:

  • opts (Hash) (defaults to: {})

    the optional parameters

Options Hash (opts):

  • :before (DateTime)

    before

Returns:

  • (nil)


300
301
302
303
# File 'lib/mailslurp_client/api/webhook_controller_api.rb', line 300

def delete_all_webhooks(opts = {})
  delete_all_webhooks_with_http_info(opts)
  nil
end

#delete_all_webhooks_with_http_info(opts = {}) ⇒ Array<(nil, Integer, Hash)>

Delete all webhooks

Parameters:

  • opts (Hash) (defaults to: {})

    the optional parameters

Options Hash (opts):

  • :before (DateTime)

    before

Returns:

  • (Array<(nil, Integer, Hash)>)

    nil, response status code and response headers



309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
# File 'lib/mailslurp_client/api/webhook_controller_api.rb', line 309

def delete_all_webhooks_with_http_info(opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug 'Calling API: WebhookControllerApi.delete_all_webhooks ...'
  end
  # resource path
  local_var_path = '/webhooks'

  # query parameters
  query_params = opts[:query_params] || {}
  query_params[:'before'] = opts[:'before'] if !opts[:'before'].nil?

  # header parameters
  header_params = opts[:header_params] || {}

  # form parameters
  form_params = opts[:form_params] || {}

  # http body (model)
  post_body = opts[:body] 

  # return_type
  return_type = opts[:return_type] 

  # auth_names
  auth_names = opts[:auth_names] || ['API_KEY']

  new_options = opts.merge(
    :header_params => header_params,
    :query_params => query_params,
    :form_params => form_params,
    :body => post_body,
    :auth_names => auth_names,
    :return_type => return_type
  )

  data, status_code, headers = @api_client.call_api(:DELETE, local_var_path, new_options)
  if @api_client.config.debugging
    @api_client.config.logger.debug "API called: WebhookControllerApi#delete_all_webhooks\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end

#delete_webhook(inbox_id, webhook_id, opts = {}) ⇒ nil

Delete and disable a Webhook for an Inbox

Parameters:

  • inbox_id (String)
  • webhook_id (String)
  • opts (Hash) (defaults to: {})

    the optional parameters

Returns:

  • (nil)


356
357
358
359
# File 'lib/mailslurp_client/api/webhook_controller_api.rb', line 356

def delete_webhook(inbox_id, webhook_id, opts = {})
  delete_webhook_with_http_info(inbox_id, webhook_id, opts)
  nil
end

#delete_webhook_by_id(webhook_id, opts = {}) ⇒ nil

Delete a webhook

Parameters:

  • webhook_id (String)
  • opts (Hash) (defaults to: {})

    the optional parameters

Returns:

  • (nil)


419
420
421
422
# File 'lib/mailslurp_client/api/webhook_controller_api.rb', line 419

def delete_webhook_by_id(webhook_id, opts = {})
  delete_webhook_by_id_with_http_info(webhook_id, opts)
  nil
end

#delete_webhook_by_id_with_http_info(webhook_id, opts = {}) ⇒ Array<(nil, Integer, Hash)>

Delete a webhook

Parameters:

  • webhook_id (String)
  • opts (Hash) (defaults to: {})

    the optional parameters

Returns:

  • (Array<(nil, Integer, Hash)>)

    nil, response status code and response headers



428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
# File 'lib/mailslurp_client/api/webhook_controller_api.rb', line 428

def delete_webhook_by_id_with_http_info(webhook_id, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug 'Calling API: WebhookControllerApi.delete_webhook_by_id ...'
  end
  # verify the required parameter 'webhook_id' is set
  if @api_client.config.client_side_validation && webhook_id.nil?
    fail ArgumentError, "Missing the required parameter 'webhook_id' when calling WebhookControllerApi.delete_webhook_by_id"
  end
  # resource path
  local_var_path = '/webhooks/{webhookId}'.sub('{' + 'webhookId' + '}', CGI.escape(webhook_id.to_s))

  # query parameters
  query_params = opts[:query_params] || {}

  # header parameters
  header_params = opts[:header_params] || {}

  # form parameters
  form_params = opts[:form_params] || {}

  # http body (model)
  post_body = opts[:body] 

  # return_type
  return_type = opts[:return_type] 

  # auth_names
  auth_names = opts[:auth_names] || ['API_KEY']

  new_options = opts.merge(
    :header_params => header_params,
    :query_params => query_params,
    :form_params => form_params,
    :body => post_body,
    :auth_names => auth_names,
    :return_type => return_type
  )

  data, status_code, headers = @api_client.call_api(:DELETE, local_var_path, new_options)
  if @api_client.config.debugging
    @api_client.config.logger.debug "API called: WebhookControllerApi#delete_webhook_by_id\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end

#delete_webhook_with_http_info(inbox_id, webhook_id, opts = {}) ⇒ Array<(nil, Integer, Hash)>

Delete and disable a Webhook for an Inbox

Parameters:

  • inbox_id (String)
  • webhook_id (String)
  • opts (Hash) (defaults to: {})

    the optional parameters

Returns:

  • (Array<(nil, Integer, Hash)>)

    nil, response status code and response headers



366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
# File 'lib/mailslurp_client/api/webhook_controller_api.rb', line 366

def delete_webhook_with_http_info(inbox_id, webhook_id, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug 'Calling API: WebhookControllerApi.delete_webhook ...'
  end
  # verify the required parameter 'inbox_id' is set
  if @api_client.config.client_side_validation && inbox_id.nil?
    fail ArgumentError, "Missing the required parameter 'inbox_id' when calling WebhookControllerApi.delete_webhook"
  end
  # verify the required parameter 'webhook_id' is set
  if @api_client.config.client_side_validation && webhook_id.nil?
    fail ArgumentError, "Missing the required parameter 'webhook_id' when calling WebhookControllerApi.delete_webhook"
  end
  # resource path
  local_var_path = '/inboxes/{inboxId}/webhooks/{webhookId}'.sub('{' + 'inboxId' + '}', CGI.escape(inbox_id.to_s)).sub('{' + 'webhookId' + '}', CGI.escape(webhook_id.to_s))

  # query parameters
  query_params = opts[:query_params] || {}

  # header parameters
  header_params = opts[:header_params] || {}

  # form parameters
  form_params = opts[:form_params] || {}

  # http body (model)
  post_body = opts[:body] 

  # return_type
  return_type = opts[:return_type] 

  # auth_names
  auth_names = opts[:auth_names] || ['API_KEY']

  new_options = opts.merge(
    :header_params => header_params,
    :query_params => query_params,
    :form_params => form_params,
    :body => post_body,
    :auth_names => auth_names,
    :return_type => return_type
  )

  data, status_code, headers = @api_client.call_api(:DELETE, local_var_path, new_options)
  if @api_client.config.debugging
    @api_client.config.logger.debug "API called: WebhookControllerApi#delete_webhook\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end

#get_all_account_webhooks(opts = {}) ⇒ PageWebhookProjection

List account webhooks Paginated List account webhooks in paginated form. Allows for page index, page size, and sort direction.

Parameters:

  • opts (Hash) (defaults to: {})

    the optional parameters

Options Hash (opts):

  • :page (Integer)

    Optional page index in list pagination (default to 0)

  • :size (Integer)

    Optional page size for paginated result list. (default to 20)

  • :sort (String)

    Optional createdAt sort direction ASC or DESC (default to ‘DESC’)

  • :since (DateTime)

    Filter by created at after the given timestamp

  • :before (DateTime)

    Filter by created at before the given timestamp

  • :event_type (String)

    Optional event type

  • :health (String)

    Filter by webhook health

  • :search_filter (String)

    Optional search filter

Returns:



485
486
487
488
# File 'lib/mailslurp_client/api/webhook_controller_api.rb', line 485

def (opts = {})
  data, _status_code, _headers = (opts)
  data
end

#get_all_account_webhooks_with_http_info(opts = {}) ⇒ Array<(PageWebhookProjection, Integer, Hash)>

List account webhooks Paginated List account webhooks in paginated form. Allows for page index, page size, and sort direction.

Parameters:

  • opts (Hash) (defaults to: {})

    the optional parameters

Options Hash (opts):

  • :page (Integer)

    Optional page index in list pagination

  • :size (Integer)

    Optional page size for paginated result list.

  • :sort (String)

    Optional createdAt sort direction ASC or DESC

  • :since (DateTime)

    Filter by created at after the given timestamp

  • :before (DateTime)

    Filter by created at before the given timestamp

  • :event_type (String)

    Optional event type

  • :health (String)

    Filter by webhook health

  • :search_filter (String)

    Optional search filter

Returns:

  • (Array<(PageWebhookProjection, Integer, Hash)>)

    PageWebhookProjection data, response status code and response headers



502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
# File 'lib/mailslurp_client/api/webhook_controller_api.rb', line 502

def (opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug 'Calling API: WebhookControllerApi.get_all_account_webhooks ...'
  end
  if @api_client.config.client_side_validation && !opts[:'page'].nil? && opts[:'page'] > 9223372036854775807
    fail ArgumentError, 'invalid value for "opts[:"page"]" when calling WebhookControllerApi.get_all_account_webhooks, must be smaller than or equal to 9223372036854775807.'
  end

  if @api_client.config.client_side_validation && !opts[:'page'].nil? && opts[:'page'] < 0
    fail ArgumentError, 'invalid value for "opts[:"page"]" when calling WebhookControllerApi.get_all_account_webhooks, must be greater than or equal to 0.'
  end

  if @api_client.config.client_side_validation && !opts[:'size'].nil? && opts[:'size'] > 100
    fail ArgumentError, 'invalid value for "opts[:"size"]" when calling WebhookControllerApi.get_all_account_webhooks, must be smaller than or equal to 100.'
  end

  if @api_client.config.client_side_validation && !opts[:'size'].nil? && opts[:'size'] < 1
    fail ArgumentError, 'invalid value for "opts[:"size"]" when calling WebhookControllerApi.get_all_account_webhooks, must be greater than or equal to 1.'
  end

  allowable_values = ["ASC", "DESC"]
  if @api_client.config.client_side_validation && opts[:'sort'] && !allowable_values.include?(opts[:'sort'])
    fail ArgumentError, "invalid value for \"sort\", must be one of #{allowable_values}"
  end
  allowable_values = ["EMAIL_RECEIVED", "NEW_AI_TRANSFORM_RESULT", "NEW_EMAIL", "NEW_CONTACT", "NEW_ATTACHMENT", "EMAIL_OPENED", "EMAIL_READ", "DELIVERY_STATUS", "BOUNCE", "BOUNCE_RECIPIENT", "NEW_SMS", "NEW_GUEST_USER"]
  if @api_client.config.client_side_validation && opts[:'event_type'] && !allowable_values.include?(opts[:'event_type'])
    fail ArgumentError, "invalid value for \"event_type\", must be one of #{allowable_values}"
  end
  allowable_values = ["HEALTHY", "UNHEALTHY"]
  if @api_client.config.client_side_validation && opts[:'health'] && !allowable_values.include?(opts[:'health'])
    fail ArgumentError, "invalid value for \"health\", must be one of #{allowable_values}"
  end
  # resource path
  local_var_path = '/webhooks/account/paginated'

  # query parameters
  query_params = opts[:query_params] || {}
  query_params[:'page'] = opts[:'page'] if !opts[:'page'].nil?
  query_params[:'size'] = opts[:'size'] if !opts[:'size'].nil?
  query_params[:'sort'] = opts[:'sort'] if !opts[:'sort'].nil?
  query_params[:'since'] = opts[:'since'] if !opts[:'since'].nil?
  query_params[:'before'] = opts[:'before'] if !opts[:'before'].nil?
  query_params[:'eventType'] = opts[:'event_type'] if !opts[:'event_type'].nil?
  query_params[:'health'] = opts[:'health'] if !opts[:'health'].nil?
  query_params[:'searchFilter'] = opts[:'search_filter'] if !opts[:'search_filter'].nil?

  # header parameters
  header_params = opts[:header_params] || {}
  # HTTP header 'Accept' (if needed)
  header_params['Accept'] = @api_client.select_header_accept(['*/*'])

  # form parameters
  form_params = opts[:form_params] || {}

  # http body (model)
  post_body = opts[:body] 

  # return_type
  return_type = opts[:return_type] || 'PageWebhookProjection' 

  # auth_names
  auth_names = opts[:auth_names] || ['API_KEY']

  new_options = opts.merge(
    :header_params => header_params,
    :query_params => query_params,
    :form_params => form_params,
    :body => post_body,
    :auth_names => auth_names,
    :return_type => return_type
  )

  data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options)
  if @api_client.config.debugging
    @api_client.config.logger.debug "API called: WebhookControllerApi#get_all_account_webhooks\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end

#get_all_webhook_endpoints(opts = {}) ⇒ PageWebhookEndpointProjection

List Webhooks endpoints Paginated List webhooks URL in paginated form. Allows for page index, page size, and sort direction.

Parameters:

  • opts (Hash) (defaults to: {})

    the optional parameters

Options Hash (opts):

  • :page (Integer)

    Optional page index in list pagination (default to 0)

  • :size (Integer)

    Optional page size for paginated result list. (default to 20)

  • :sort (String)

    Optional createdAt sort direction ASC or DESC (default to ‘DESC’)

  • :search_filter (String)

    Optional search filter

  • :since (DateTime)

    Filter by created at after the given timestamp

  • :inbox_id (String)

    Filter by inboxId

  • :phone_id (String)

    Filter by phoneId

  • :before (DateTime)

    Filter by created at before the given timestamp

  • :health (String)

    Filter by webhook health

  • :event_type (String)

    Optional event type

Returns:



595
596
597
598
# File 'lib/mailslurp_client/api/webhook_controller_api.rb', line 595

def get_all_webhook_endpoints(opts = {})
  data, _status_code, _headers = get_all_webhook_endpoints_with_http_info(opts)
  data
end

#get_all_webhook_endpoints_with_http_info(opts = {}) ⇒ Array<(PageWebhookEndpointProjection, Integer, Hash)>

List Webhooks endpoints Paginated List webhooks URL in paginated form. Allows for page index, page size, and sort direction.

Parameters:

  • opts (Hash) (defaults to: {})

    the optional parameters

Options Hash (opts):

  • :page (Integer)

    Optional page index in list pagination

  • :size (Integer)

    Optional page size for paginated result list.

  • :sort (String)

    Optional createdAt sort direction ASC or DESC

  • :search_filter (String)

    Optional search filter

  • :since (DateTime)

    Filter by created at after the given timestamp

  • :inbox_id (String)

    Filter by inboxId

  • :phone_id (String)

    Filter by phoneId

  • :before (DateTime)

    Filter by created at before the given timestamp

  • :health (String)

    Filter by webhook health

  • :event_type (String)

    Optional event type

Returns:



614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
# File 'lib/mailslurp_client/api/webhook_controller_api.rb', line 614

def get_all_webhook_endpoints_with_http_info(opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug 'Calling API: WebhookControllerApi.get_all_webhook_endpoints ...'
  end
  if @api_client.config.client_side_validation && !opts[:'page'].nil? && opts[:'page'] > 9223372036854775807
    fail ArgumentError, 'invalid value for "opts[:"page"]" when calling WebhookControllerApi.get_all_webhook_endpoints, must be smaller than or equal to 9223372036854775807.'
  end

  if @api_client.config.client_side_validation && !opts[:'page'].nil? && opts[:'page'] < 0
    fail ArgumentError, 'invalid value for "opts[:"page"]" when calling WebhookControllerApi.get_all_webhook_endpoints, must be greater than or equal to 0.'
  end

  if @api_client.config.client_side_validation && !opts[:'size'].nil? && opts[:'size'] > 100
    fail ArgumentError, 'invalid value for "opts[:"size"]" when calling WebhookControllerApi.get_all_webhook_endpoints, must be smaller than or equal to 100.'
  end

  if @api_client.config.client_side_validation && !opts[:'size'].nil? && opts[:'size'] < 1
    fail ArgumentError, 'invalid value for "opts[:"size"]" when calling WebhookControllerApi.get_all_webhook_endpoints, must be greater than or equal to 1.'
  end

  allowable_values = ["ASC", "DESC"]
  if @api_client.config.client_side_validation && opts[:'sort'] && !allowable_values.include?(opts[:'sort'])
    fail ArgumentError, "invalid value for \"sort\", must be one of #{allowable_values}"
  end
  allowable_values = ["HEALTHY", "UNHEALTHY"]
  if @api_client.config.client_side_validation && opts[:'health'] && !allowable_values.include?(opts[:'health'])
    fail ArgumentError, "invalid value for \"health\", must be one of #{allowable_values}"
  end
  allowable_values = ["EMAIL_RECEIVED", "NEW_AI_TRANSFORM_RESULT", "NEW_EMAIL", "NEW_CONTACT", "NEW_ATTACHMENT", "EMAIL_OPENED", "EMAIL_READ", "DELIVERY_STATUS", "BOUNCE", "BOUNCE_RECIPIENT", "NEW_SMS", "NEW_GUEST_USER"]
  if @api_client.config.client_side_validation && opts[:'event_type'] && !allowable_values.include?(opts[:'event_type'])
    fail ArgumentError, "invalid value for \"event_type\", must be one of #{allowable_values}"
  end
  # resource path
  local_var_path = '/webhooks/endpoints'

  # query parameters
  query_params = opts[:query_params] || {}
  query_params[:'page'] = opts[:'page'] if !opts[:'page'].nil?
  query_params[:'size'] = opts[:'size'] if !opts[:'size'].nil?
  query_params[:'sort'] = opts[:'sort'] if !opts[:'sort'].nil?
  query_params[:'searchFilter'] = opts[:'search_filter'] if !opts[:'search_filter'].nil?
  query_params[:'since'] = opts[:'since'] if !opts[:'since'].nil?
  query_params[:'inboxId'] = opts[:'inbox_id'] if !opts[:'inbox_id'].nil?
  query_params[:'phoneId'] = opts[:'phone_id'] if !opts[:'phone_id'].nil?
  query_params[:'before'] = opts[:'before'] if !opts[:'before'].nil?
  query_params[:'health'] = opts[:'health'] if !opts[:'health'].nil?
  query_params[:'eventType'] = opts[:'event_type'] if !opts[:'event_type'].nil?

  # header parameters
  header_params = opts[:header_params] || {}
  # HTTP header 'Accept' (if needed)
  header_params['Accept'] = @api_client.select_header_accept(['*/*'])

  # form parameters
  form_params = opts[:form_params] || {}

  # http body (model)
  post_body = opts[:body] 

  # return_type
  return_type = opts[:return_type] || 'PageWebhookEndpointProjection' 

  # auth_names
  auth_names = opts[:auth_names] || ['API_KEY']

  new_options = opts.merge(
    :header_params => header_params,
    :query_params => query_params,
    :form_params => form_params,
    :body => post_body,
    :auth_names => auth_names,
    :return_type => return_type
  )

  data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options)
  if @api_client.config.debugging
    @api_client.config.logger.debug "API called: WebhookControllerApi#get_all_webhook_endpoints\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end

#get_all_webhook_results(opts = {}) ⇒ PageWebhookResult

Get results for all webhooks

Parameters:

  • opts (Hash) (defaults to: {})

    the optional parameters

Options Hash (opts):

  • :page (Integer)

    Optional page index in list pagination (default to 0)

  • :size (Integer)

    Optional page size in list pagination (default to 20)

  • :sort (String)

    Optional createdAt sort direction ASC or DESC (default to ‘ASC’)

  • :search_filter (String)

    Optional search filter

  • :since (DateTime)

    Filter by created at after the given timestamp

  • :before (DateTime)

    Filter by created at before the given timestamp

  • :unseen_only (Boolean)

    Filter for unseen exceptions only

  • :result_type (String)

    Filter by result type

  • :event_name (String)

    Filter by event name

  • :min_status_code (Integer)

    Minimum response status

  • :max_status_code (Integer)

    Maximum response status

  • :inbox_id (String)

    Inbox ID

  • :sms_id (String)

    Sms ID

  • :attachment_id (String)

    Attachment ID

  • :email_id (String)

    Email ID

  • :phone_id (String)

    Phone ID

  • :ai_transformer_id (String)

    AI Transformer ID

Returns:



715
716
717
718
# File 'lib/mailslurp_client/api/webhook_controller_api.rb', line 715

def get_all_webhook_results(opts = {})
  data, _status_code, _headers = get_all_webhook_results_with_http_info(opts)
  data
end

#get_all_webhook_results_with_http_info(opts = {}) ⇒ Array<(PageWebhookResult, Integer, Hash)>

Get results for all webhooks

Parameters:

  • opts (Hash) (defaults to: {})

    the optional parameters

Options Hash (opts):

  • :page (Integer)

    Optional page index in list pagination

  • :size (Integer)

    Optional page size in list pagination

  • :sort (String)

    Optional createdAt sort direction ASC or DESC

  • :search_filter (String)

    Optional search filter

  • :since (DateTime)

    Filter by created at after the given timestamp

  • :before (DateTime)

    Filter by created at before the given timestamp

  • :unseen_only (Boolean)

    Filter for unseen exceptions only

  • :result_type (String)

    Filter by result type

  • :event_name (String)

    Filter by event name

  • :min_status_code (Integer)

    Minimum response status

  • :max_status_code (Integer)

    Maximum response status

  • :inbox_id (String)

    Inbox ID

  • :sms_id (String)

    Sms ID

  • :attachment_id (String)

    Attachment ID

  • :email_id (String)

    Email ID

  • :phone_id (String)

    Phone ID

  • :ai_transformer_id (String)

    AI Transformer ID

Returns:

  • (Array<(PageWebhookResult, Integer, Hash)>)

    PageWebhookResult data, response status code and response headers



740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
# File 'lib/mailslurp_client/api/webhook_controller_api.rb', line 740

def get_all_webhook_results_with_http_info(opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug 'Calling API: WebhookControllerApi.get_all_webhook_results ...'
  end
  allowable_values = ["ASC", "DESC"]
  if @api_client.config.client_side_validation && opts[:'sort'] && !allowable_values.include?(opts[:'sort'])
    fail ArgumentError, "invalid value for \"sort\", must be one of #{allowable_values}"
  end
  allowable_values = ["BAD_RESPONSE", "EXCEPTION", "SUCCESS", "REDRIVEN"]
  if @api_client.config.client_side_validation && opts[:'result_type'] && !allowable_values.include?(opts[:'result_type'])
    fail ArgumentError, "invalid value for \"result_type\", must be one of #{allowable_values}"
  end
  allowable_values = ["EMAIL_RECEIVED", "NEW_AI_TRANSFORM_RESULT", "NEW_EMAIL", "NEW_CONTACT", "NEW_ATTACHMENT", "EMAIL_OPENED", "EMAIL_READ", "DELIVERY_STATUS", "BOUNCE", "BOUNCE_RECIPIENT", "NEW_SMS", "NEW_GUEST_USER"]
  if @api_client.config.client_side_validation && opts[:'event_name'] && !allowable_values.include?(opts[:'event_name'])
    fail ArgumentError, "invalid value for \"event_name\", must be one of #{allowable_values}"
  end
  # resource path
  local_var_path = '/webhooks/results'

  # query parameters
  query_params = opts[:query_params] || {}
  query_params[:'page'] = opts[:'page'] if !opts[:'page'].nil?
  query_params[:'size'] = opts[:'size'] if !opts[:'size'].nil?
  query_params[:'sort'] = opts[:'sort'] if !opts[:'sort'].nil?
  query_params[:'searchFilter'] = opts[:'search_filter'] if !opts[:'search_filter'].nil?
  query_params[:'since'] = opts[:'since'] if !opts[:'since'].nil?
  query_params[:'before'] = opts[:'before'] if !opts[:'before'].nil?
  query_params[:'unseenOnly'] = opts[:'unseen_only'] if !opts[:'unseen_only'].nil?
  query_params[:'resultType'] = opts[:'result_type'] if !opts[:'result_type'].nil?
  query_params[:'eventName'] = opts[:'event_name'] if !opts[:'event_name'].nil?
  query_params[:'minStatusCode'] = opts[:'min_status_code'] if !opts[:'min_status_code'].nil?
  query_params[:'maxStatusCode'] = opts[:'max_status_code'] if !opts[:'max_status_code'].nil?
  query_params[:'inboxId'] = opts[:'inbox_id'] if !opts[:'inbox_id'].nil?
  query_params[:'smsId'] = opts[:'sms_id'] if !opts[:'sms_id'].nil?
  query_params[:'attachmentId'] = opts[:'attachment_id'] if !opts[:'attachment_id'].nil?
  query_params[:'emailId'] = opts[:'email_id'] if !opts[:'email_id'].nil?
  query_params[:'phoneId'] = opts[:'phone_id'] if !opts[:'phone_id'].nil?
  query_params[:'aiTransformerId'] = opts[:'ai_transformer_id'] if !opts[:'ai_transformer_id'].nil?

  # header parameters
  header_params = opts[:header_params] || {}
  # HTTP header 'Accept' (if needed)
  header_params['Accept'] = @api_client.select_header_accept(['*/*'])

  # form parameters
  form_params = opts[:form_params] || {}

  # http body (model)
  post_body = opts[:body] 

  # return_type
  return_type = opts[:return_type] || 'PageWebhookResult' 

  # auth_names
  auth_names = opts[:auth_names] || ['API_KEY']

  new_options = opts.merge(
    :header_params => header_params,
    :query_params => query_params,
    :form_params => form_params,
    :body => post_body,
    :auth_names => auth_names,
    :return_type => return_type
  )

  data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options)
  if @api_client.config.debugging
    @api_client.config.logger.debug "API called: WebhookControllerApi#get_all_webhook_results\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end

#get_all_webhooks(opts = {}) ⇒ PageWebhookProjection

List Webhooks Paginated List webhooks in paginated form. Allows for page index, page size, and sort direction.

Parameters:

  • opts (Hash) (defaults to: {})

    the optional parameters

Options Hash (opts):

  • :page (Integer)

    Optional page index in list pagination (default to 0)

  • :size (Integer)

    Optional page size for paginated result list. (default to 20)

  • :sort (String)

    Optional createdAt sort direction ASC or DESC (default to ‘DESC’)

  • :search_filter (String)

    Optional search filter

  • :since (DateTime)

    Filter by created at after the given timestamp

  • :inbox_id (String)

    Filter by inboxId

  • :ai_transformer_id (String)

    Filter by aiTransformerId

  • :phone_id (String)

    Filter by phoneId

  • :before (DateTime)

    Filter by created at before the given timestamp

  • :health (String)

    Filter by webhook health

  • :event_type (String)

    Optional event type

  • :url (String)

    Optional url endpoint filter

Returns:



828
829
830
831
# File 'lib/mailslurp_client/api/webhook_controller_api.rb', line 828

def get_all_webhooks(opts = {})
  data, _status_code, _headers = get_all_webhooks_with_http_info(opts)
  data
end

#get_all_webhooks_with_http_info(opts = {}) ⇒ Array<(PageWebhookProjection, Integer, Hash)>

List Webhooks Paginated List webhooks in paginated form. Allows for page index, page size, and sort direction.

Parameters:

  • opts (Hash) (defaults to: {})

    the optional parameters

Options Hash (opts):

  • :page (Integer)

    Optional page index in list pagination

  • :size (Integer)

    Optional page size for paginated result list.

  • :sort (String)

    Optional createdAt sort direction ASC or DESC

  • :search_filter (String)

    Optional search filter

  • :since (DateTime)

    Filter by created at after the given timestamp

  • :inbox_id (String)

    Filter by inboxId

  • :ai_transformer_id (String)

    Filter by aiTransformerId

  • :phone_id (String)

    Filter by phoneId

  • :before (DateTime)

    Filter by created at before the given timestamp

  • :health (String)

    Filter by webhook health

  • :event_type (String)

    Optional event type

  • :url (String)

    Optional url endpoint filter

Returns:

  • (Array<(PageWebhookProjection, Integer, Hash)>)

    PageWebhookProjection data, response status code and response headers



849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
867
868
869
870
871
872
873
874
875
876
877
878
879
880
881
882
883
884
885
886
887
888
889
890
891
892
893
894
895
896
897
898
899
900
901
902
903
904
905
906
907
908
909
910
911
912
913
914
915
916
917
918
919
920
921
922
923
924
925
926
927
928
929
930
# File 'lib/mailslurp_client/api/webhook_controller_api.rb', line 849

def get_all_webhooks_with_http_info(opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug 'Calling API: WebhookControllerApi.get_all_webhooks ...'
  end
  if @api_client.config.client_side_validation && !opts[:'page'].nil? && opts[:'page'] > 9223372036854775807
    fail ArgumentError, 'invalid value for "opts[:"page"]" when calling WebhookControllerApi.get_all_webhooks, must be smaller than or equal to 9223372036854775807.'
  end

  if @api_client.config.client_side_validation && !opts[:'page'].nil? && opts[:'page'] < 0
    fail ArgumentError, 'invalid value for "opts[:"page"]" when calling WebhookControllerApi.get_all_webhooks, must be greater than or equal to 0.'
  end

  if @api_client.config.client_side_validation && !opts[:'size'].nil? && opts[:'size'] > 100
    fail ArgumentError, 'invalid value for "opts[:"size"]" when calling WebhookControllerApi.get_all_webhooks, must be smaller than or equal to 100.'
  end

  if @api_client.config.client_side_validation && !opts[:'size'].nil? && opts[:'size'] < 1
    fail ArgumentError, 'invalid value for "opts[:"size"]" when calling WebhookControllerApi.get_all_webhooks, must be greater than or equal to 1.'
  end

  allowable_values = ["ASC", "DESC"]
  if @api_client.config.client_side_validation && opts[:'sort'] && !allowable_values.include?(opts[:'sort'])
    fail ArgumentError, "invalid value for \"sort\", must be one of #{allowable_values}"
  end
  allowable_values = ["HEALTHY", "UNHEALTHY"]
  if @api_client.config.client_side_validation && opts[:'health'] && !allowable_values.include?(opts[:'health'])
    fail ArgumentError, "invalid value for \"health\", must be one of #{allowable_values}"
  end
  allowable_values = ["EMAIL_RECEIVED", "NEW_AI_TRANSFORM_RESULT", "NEW_EMAIL", "NEW_CONTACT", "NEW_ATTACHMENT", "EMAIL_OPENED", "EMAIL_READ", "DELIVERY_STATUS", "BOUNCE", "BOUNCE_RECIPIENT", "NEW_SMS", "NEW_GUEST_USER"]
  if @api_client.config.client_side_validation && opts[:'event_type'] && !allowable_values.include?(opts[:'event_type'])
    fail ArgumentError, "invalid value for \"event_type\", must be one of #{allowable_values}"
  end
  # resource path
  local_var_path = '/webhooks/paginated'

  # query parameters
  query_params = opts[:query_params] || {}
  query_params[:'page'] = opts[:'page'] if !opts[:'page'].nil?
  query_params[:'size'] = opts[:'size'] if !opts[:'size'].nil?
  query_params[:'sort'] = opts[:'sort'] if !opts[:'sort'].nil?
  query_params[:'searchFilter'] = opts[:'search_filter'] if !opts[:'search_filter'].nil?
  query_params[:'since'] = opts[:'since'] if !opts[:'since'].nil?
  query_params[:'inboxId'] = opts[:'inbox_id'] if !opts[:'inbox_id'].nil?
  query_params[:'aiTransformerId'] = opts[:'ai_transformer_id'] if !opts[:'ai_transformer_id'].nil?
  query_params[:'phoneId'] = opts[:'phone_id'] if !opts[:'phone_id'].nil?
  query_params[:'before'] = opts[:'before'] if !opts[:'before'].nil?
  query_params[:'health'] = opts[:'health'] if !opts[:'health'].nil?
  query_params[:'eventType'] = opts[:'event_type'] if !opts[:'event_type'].nil?
  query_params[:'url'] = opts[:'url'] if !opts[:'url'].nil?

  # header parameters
  header_params = opts[:header_params] || {}
  # HTTP header 'Accept' (if needed)
  header_params['Accept'] = @api_client.select_header_accept(['*/*'])

  # form parameters
  form_params = opts[:form_params] || {}

  # http body (model)
  post_body = opts[:body] 

  # return_type
  return_type = opts[:return_type] || 'PageWebhookProjection' 

  # auth_names
  auth_names = opts[:auth_names] || ['API_KEY']

  new_options = opts.merge(
    :header_params => header_params,
    :query_params => query_params,
    :form_params => form_params,
    :body => post_body,
    :auth_names => auth_names,
    :return_type => return_type
  )

  data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options)
  if @api_client.config.debugging
    @api_client.config.logger.debug "API called: WebhookControllerApi#get_all_webhooks\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end

#get_inbox_webhooks_paginated(inbox_id, opts = {}) ⇒ PageWebhookProjection

Get paginated webhooks for an Inbox

Parameters:

  • inbox_id (String)
  • opts (Hash) (defaults to: {})

    the optional parameters

Options Hash (opts):

  • :page (Integer)

    Optional page index in list pagination (default to 0)

  • :size (Integer)

    Optional page size in list pagination (default to 20)

  • :sort (String)

    Optional createdAt sort direction ASC or DESC (default to ‘ASC’)

  • :search_filter (String)

    Optional search filter

  • :since (DateTime)

    Filter by created at after the given timestamp

  • :before (DateTime)

    Filter by created at before the given timestamp

  • :health (String)

    Filter by webhook health

  • :event_type (String)

    Optional event type

Returns:



944
945
946
947
# File 'lib/mailslurp_client/api/webhook_controller_api.rb', line 944

def get_inbox_webhooks_paginated(inbox_id, opts = {})
  data, _status_code, _headers = get_inbox_webhooks_paginated_with_http_info(inbox_id, opts)
  data
end

#get_inbox_webhooks_paginated_with_http_info(inbox_id, opts = {}) ⇒ Array<(PageWebhookProjection, Integer, Hash)>

Get paginated webhooks for an Inbox

Parameters:

  • inbox_id (String)
  • opts (Hash) (defaults to: {})

    the optional parameters

Options Hash (opts):

  • :page (Integer)

    Optional page index in list pagination

  • :size (Integer)

    Optional page size in list pagination

  • :sort (String)

    Optional createdAt sort direction ASC or DESC

  • :search_filter (String)

    Optional search filter

  • :since (DateTime)

    Filter by created at after the given timestamp

  • :before (DateTime)

    Filter by created at before the given timestamp

  • :health (String)

    Filter by webhook health

  • :event_type (String)

    Optional event type

Returns:

  • (Array<(PageWebhookProjection, Integer, Hash)>)

    PageWebhookProjection data, response status code and response headers



961
962
963
964
965
966
967
968
969
970
971
972
973
974
975
976
977
978
979
980
981
982
983
984
985
986
987
988
989
990
991
992
993
994
995
996
997
998
999
1000
1001
1002
1003
1004
1005
1006
1007
1008
1009
1010
1011
1012
1013
1014
1015
1016
1017
1018
1019
1020
1021
1022
1023
1024
1025
1026
# File 'lib/mailslurp_client/api/webhook_controller_api.rb', line 961

def get_inbox_webhooks_paginated_with_http_info(inbox_id, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug 'Calling API: WebhookControllerApi.get_inbox_webhooks_paginated ...'
  end
  # verify the required parameter 'inbox_id' is set
  if @api_client.config.client_side_validation && inbox_id.nil?
    fail ArgumentError, "Missing the required parameter 'inbox_id' when calling WebhookControllerApi.get_inbox_webhooks_paginated"
  end
  allowable_values = ["ASC", "DESC"]
  if @api_client.config.client_side_validation && opts[:'sort'] && !allowable_values.include?(opts[:'sort'])
    fail ArgumentError, "invalid value for \"sort\", must be one of #{allowable_values}"
  end
  allowable_values = ["HEALTHY", "UNHEALTHY"]
  if @api_client.config.client_side_validation && opts[:'health'] && !allowable_values.include?(opts[:'health'])
    fail ArgumentError, "invalid value for \"health\", must be one of #{allowable_values}"
  end
  allowable_values = ["EMAIL_RECEIVED", "NEW_AI_TRANSFORM_RESULT", "NEW_EMAIL", "NEW_CONTACT", "NEW_ATTACHMENT", "EMAIL_OPENED", "EMAIL_READ", "DELIVERY_STATUS", "BOUNCE", "BOUNCE_RECIPIENT", "NEW_SMS", "NEW_GUEST_USER"]
  if @api_client.config.client_side_validation && opts[:'event_type'] && !allowable_values.include?(opts[:'event_type'])
    fail ArgumentError, "invalid value for \"event_type\", must be one of #{allowable_values}"
  end
  # resource path
  local_var_path = '/inboxes/{inboxId}/webhooks/paginated'.sub('{' + 'inboxId' + '}', CGI.escape(inbox_id.to_s))

  # query parameters
  query_params = opts[:query_params] || {}
  query_params[:'page'] = opts[:'page'] if !opts[:'page'].nil?
  query_params[:'size'] = opts[:'size'] if !opts[:'size'].nil?
  query_params[:'sort'] = opts[:'sort'] if !opts[:'sort'].nil?
  query_params[:'searchFilter'] = opts[:'search_filter'] if !opts[:'search_filter'].nil?
  query_params[:'since'] = opts[:'since'] if !opts[:'since'].nil?
  query_params[:'before'] = opts[:'before'] if !opts[:'before'].nil?
  query_params[:'health'] = opts[:'health'] if !opts[:'health'].nil?
  query_params[:'eventType'] = opts[:'event_type'] if !opts[:'event_type'].nil?

  # header parameters
  header_params = opts[:header_params] || {}
  # HTTP header 'Accept' (if needed)
  header_params['Accept'] = @api_client.select_header_accept(['*/*'])

  # form parameters
  form_params = opts[:form_params] || {}

  # http body (model)
  post_body = opts[:body] 

  # return_type
  return_type = opts[:return_type] || 'PageWebhookProjection' 

  # auth_names
  auth_names = opts[:auth_names] || ['API_KEY']

  new_options = opts.merge(
    :header_params => header_params,
    :query_params => query_params,
    :form_params => form_params,
    :body => post_body,
    :auth_names => auth_names,
    :return_type => return_type
  )

  data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options)
  if @api_client.config.debugging
    @api_client.config.logger.debug "API called: WebhookControllerApi#get_inbox_webhooks_paginated\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end

#get_json_schema_for_webhook_event(event, opts = {}) ⇒ JSONSchemaDto

Get JSON Schema definition for webhook payload by event

Parameters:

  • event (String)
  • opts (Hash) (defaults to: {})

    the optional parameters

Returns:



1032
1033
1034
1035
# File 'lib/mailslurp_client/api/webhook_controller_api.rb', line 1032

def get_json_schema_for_webhook_event(event, opts = {})
  data, _status_code, _headers = get_json_schema_for_webhook_event_with_http_info(event, opts)
  data
end

#get_json_schema_for_webhook_event_with_http_info(event, opts = {}) ⇒ Array<(JSONSchemaDto, Integer, Hash)>

Get JSON Schema definition for webhook payload by event

Parameters:

  • event (String)
  • opts (Hash) (defaults to: {})

    the optional parameters

Returns:

  • (Array<(JSONSchemaDto, Integer, Hash)>)

    JSONSchemaDto data, response status code and response headers



1041
1042
1043
1044
1045
1046
1047
1048
1049
1050
1051
1052
1053
1054
1055
1056
1057
1058
1059
1060
1061
1062
1063
1064
1065
1066
1067
1068
1069
1070
1071
1072
1073
1074
1075
1076
1077
1078
1079
1080
1081
1082
1083
1084
1085
1086
1087
1088
1089
1090
1091
1092
# File 'lib/mailslurp_client/api/webhook_controller_api.rb', line 1041

def get_json_schema_for_webhook_event_with_http_info(event, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug 'Calling API: WebhookControllerApi.get_json_schema_for_webhook_event ...'
  end
  # verify the required parameter 'event' is set
  if @api_client.config.client_side_validation && event.nil?
    fail ArgumentError, "Missing the required parameter 'event' when calling WebhookControllerApi.get_json_schema_for_webhook_event"
  end
  # verify enum value
  allowable_values = ["EMAIL_RECEIVED", "NEW_AI_TRANSFORM_RESULT", "NEW_EMAIL", "NEW_CONTACT", "NEW_ATTACHMENT", "EMAIL_OPENED", "EMAIL_READ", "DELIVERY_STATUS", "BOUNCE", "BOUNCE_RECIPIENT", "NEW_SMS", "NEW_GUEST_USER"]
  if @api_client.config.client_side_validation && !allowable_values.include?(event)
    fail ArgumentError, "invalid value for \"event\", must be one of #{allowable_values}"
  end
  # resource path
  local_var_path = '/webhooks/schema'

  # query parameters
  query_params = opts[:query_params] || {}
  query_params[:'event'] = event

  # header parameters
  header_params = opts[:header_params] || {}
  # HTTP header 'Accept' (if needed)
  header_params['Accept'] = @api_client.select_header_accept(['*/*'])

  # form parameters
  form_params = opts[:form_params] || {}

  # http body (model)
  post_body = opts[:body] 

  # return_type
  return_type = opts[:return_type] || 'JSONSchemaDto' 

  # auth_names
  auth_names = opts[:auth_names] || ['API_KEY']

  new_options = opts.merge(
    :header_params => header_params,
    :query_params => query_params,
    :form_params => form_params,
    :body => post_body,
    :auth_names => auth_names,
    :return_type => return_type
  )

  data, status_code, headers = @api_client.call_api(:POST, local_var_path, new_options)
  if @api_client.config.debugging
    @api_client.config.logger.debug "API called: WebhookControllerApi#get_json_schema_for_webhook_event\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end

#get_json_schema_for_webhook_payload(webhook_id, opts = {}) ⇒ JSONSchemaDto

Get JSON Schema definition for webhook payload

Parameters:

  • webhook_id (String)
  • opts (Hash) (defaults to: {})

    the optional parameters

Returns:



1098
1099
1100
1101
# File 'lib/mailslurp_client/api/webhook_controller_api.rb', line 1098

def get_json_schema_for_webhook_payload(webhook_id, opts = {})
  data, _status_code, _headers = get_json_schema_for_webhook_payload_with_http_info(webhook_id, opts)
  data
end

#get_json_schema_for_webhook_payload_with_http_info(webhook_id, opts = {}) ⇒ Array<(JSONSchemaDto, Integer, Hash)>

Get JSON Schema definition for webhook payload

Parameters:

  • webhook_id (String)
  • opts (Hash) (defaults to: {})

    the optional parameters

Returns:

  • (Array<(JSONSchemaDto, Integer, Hash)>)

    JSONSchemaDto data, response status code and response headers



1107
1108
1109
1110
1111
1112
1113
1114
1115
1116
1117
1118
1119
1120
1121
1122
1123
1124
1125
1126
1127
1128
1129
1130
1131
1132
1133
1134
1135
1136
1137
1138
1139
1140
1141
1142
1143
1144
1145
1146
1147
1148
1149
1150
1151
1152
# File 'lib/mailslurp_client/api/webhook_controller_api.rb', line 1107

def get_json_schema_for_webhook_payload_with_http_info(webhook_id, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug 'Calling API: WebhookControllerApi.get_json_schema_for_webhook_payload ...'
  end
  # verify the required parameter 'webhook_id' is set
  if @api_client.config.client_side_validation && webhook_id.nil?
    fail ArgumentError, "Missing the required parameter 'webhook_id' when calling WebhookControllerApi.get_json_schema_for_webhook_payload"
  end
  # resource path
  local_var_path = '/webhooks/{webhookId}/schema'.sub('{' + 'webhookId' + '}', CGI.escape(webhook_id.to_s))

  # query parameters
  query_params = opts[:query_params] || {}

  # header parameters
  header_params = opts[:header_params] || {}
  # HTTP header 'Accept' (if needed)
  header_params['Accept'] = @api_client.select_header_accept(['*/*'])

  # form parameters
  form_params = opts[:form_params] || {}

  # http body (model)
  post_body = opts[:body] 

  # return_type
  return_type = opts[:return_type] || 'JSONSchemaDto' 

  # auth_names
  auth_names = opts[:auth_names] || ['API_KEY']

  new_options = opts.merge(
    :header_params => header_params,
    :query_params => query_params,
    :form_params => form_params,
    :body => post_body,
    :auth_names => auth_names,
    :return_type => return_type
  )

  data, status_code, headers = @api_client.call_api(:POST, local_var_path, new_options)
  if @api_client.config.debugging
    @api_client.config.logger.debug "API called: WebhookControllerApi#get_json_schema_for_webhook_payload\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end

#get_phone_number_webhooks_paginated(phone_id, opts = {}) ⇒ PageWebhookProjection

Get paginated webhooks for a phone number

Parameters:

  • phone_id (String)
  • opts (Hash) (defaults to: {})

    the optional parameters

Options Hash (opts):

  • :page (Integer)

    Optional page index in list pagination (default to 0)

  • :size (Integer)

    Optional page size in list pagination (default to 20)

  • :sort (String)

    Optional createdAt sort direction ASC or DESC (default to ‘ASC’)

  • :since (DateTime)

    Filter by created at after the given timestamp

  • :before (DateTime)

    Filter by created at before the given timestamp

  • :event_type (String)

    Optional event type

  • :search_filter (String)

    Optional search filter

  • :health (String)

    Filter by webhook health

Returns:



1166
1167
1168
1169
# File 'lib/mailslurp_client/api/webhook_controller_api.rb', line 1166

def get_phone_number_webhooks_paginated(phone_id, opts = {})
  data, _status_code, _headers = get_phone_number_webhooks_paginated_with_http_info(phone_id, opts)
  data
end

#get_phone_number_webhooks_paginated_with_http_info(phone_id, opts = {}) ⇒ Array<(PageWebhookProjection, Integer, Hash)>

Get paginated webhooks for a phone number

Parameters:

  • phone_id (String)
  • opts (Hash) (defaults to: {})

    the optional parameters

Options Hash (opts):

  • :page (Integer)

    Optional page index in list pagination

  • :size (Integer)

    Optional page size in list pagination

  • :sort (String)

    Optional createdAt sort direction ASC or DESC

  • :since (DateTime)

    Filter by created at after the given timestamp

  • :before (DateTime)

    Filter by created at before the given timestamp

  • :event_type (String)

    Optional event type

  • :search_filter (String)

    Optional search filter

  • :health (String)

    Filter by webhook health

Returns:

  • (Array<(PageWebhookProjection, Integer, Hash)>)

    PageWebhookProjection data, response status code and response headers



1183
1184
1185
1186
1187
1188
1189
1190
1191
1192
1193
1194
1195
1196
1197
1198
1199
1200
1201
1202
1203
1204
1205
1206
1207
1208
1209
1210
1211
1212
1213
1214
1215
1216
1217
1218
1219
1220
1221
1222
1223
1224
1225
1226
1227
1228
1229
1230
1231
1232
1233
1234
1235
1236
1237
1238
1239
1240
1241
1242
1243
1244
1245
1246
1247
1248
# File 'lib/mailslurp_client/api/webhook_controller_api.rb', line 1183

def get_phone_number_webhooks_paginated_with_http_info(phone_id, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug 'Calling API: WebhookControllerApi.get_phone_number_webhooks_paginated ...'
  end
  # verify the required parameter 'phone_id' is set
  if @api_client.config.client_side_validation && phone_id.nil?
    fail ArgumentError, "Missing the required parameter 'phone_id' when calling WebhookControllerApi.get_phone_number_webhooks_paginated"
  end
  allowable_values = ["ASC", "DESC"]
  if @api_client.config.client_side_validation && opts[:'sort'] && !allowable_values.include?(opts[:'sort'])
    fail ArgumentError, "invalid value for \"sort\", must be one of #{allowable_values}"
  end
  allowable_values = ["EMAIL_RECEIVED", "NEW_AI_TRANSFORM_RESULT", "NEW_EMAIL", "NEW_CONTACT", "NEW_ATTACHMENT", "EMAIL_OPENED", "EMAIL_READ", "DELIVERY_STATUS", "BOUNCE", "BOUNCE_RECIPIENT", "NEW_SMS", "NEW_GUEST_USER"]
  if @api_client.config.client_side_validation && opts[:'event_type'] && !allowable_values.include?(opts[:'event_type'])
    fail ArgumentError, "invalid value for \"event_type\", must be one of #{allowable_values}"
  end
  allowable_values = ["HEALTHY", "UNHEALTHY"]
  if @api_client.config.client_side_validation && opts[:'health'] && !allowable_values.include?(opts[:'health'])
    fail ArgumentError, "invalid value for \"health\", must be one of #{allowable_values}"
  end
  # resource path
  local_var_path = '/phone/numbers/{phoneId}/webhooks/paginated'.sub('{' + 'phoneId' + '}', CGI.escape(phone_id.to_s))

  # query parameters
  query_params = opts[:query_params] || {}
  query_params[:'page'] = opts[:'page'] if !opts[:'page'].nil?
  query_params[:'size'] = opts[:'size'] if !opts[:'size'].nil?
  query_params[:'sort'] = opts[:'sort'] if !opts[:'sort'].nil?
  query_params[:'since'] = opts[:'since'] if !opts[:'since'].nil?
  query_params[:'before'] = opts[:'before'] if !opts[:'before'].nil?
  query_params[:'eventType'] = opts[:'event_type'] if !opts[:'event_type'].nil?
  query_params[:'searchFilter'] = opts[:'search_filter'] if !opts[:'search_filter'].nil?
  query_params[:'health'] = opts[:'health'] if !opts[:'health'].nil?

  # header parameters
  header_params = opts[:header_params] || {}
  # HTTP header 'Accept' (if needed)
  header_params['Accept'] = @api_client.select_header_accept(['*/*'])

  # form parameters
  form_params = opts[:form_params] || {}

  # http body (model)
  post_body = opts[:body] 

  # return_type
  return_type = opts[:return_type] || 'PageWebhookProjection' 

  # auth_names
  auth_names = opts[:auth_names] || ['API_KEY']

  new_options = opts.merge(
    :header_params => header_params,
    :query_params => query_params,
    :form_params => form_params,
    :body => post_body,
    :auth_names => auth_names,
    :return_type => return_type
  )

  data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options)
  if @api_client.config.debugging
    @api_client.config.logger.debug "API called: WebhookControllerApi#get_phone_number_webhooks_paginated\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end

#get_test_webhook_payload(opts = {}) ⇒ AbstractWebhookPayload

Get test webhook payload example. Response content depends on eventName passed. Uses ‘EMAIL_RECEIVED` as default.

Parameters:

  • opts (Hash) (defaults to: {})

    the optional parameters

Options Hash (opts):

  • :event_name (String)

Returns:



1254
1255
1256
1257
# File 'lib/mailslurp_client/api/webhook_controller_api.rb', line 1254

def get_test_webhook_payload(opts = {})
  data, _status_code, _headers = get_test_webhook_payload_with_http_info(opts)
  data
end

#get_test_webhook_payload_bounce(opts = {}) ⇒ WebhookBouncePayload

Get webhook test payload for bounce

Parameters:

  • opts (Hash) (defaults to: {})

    the optional parameters

Returns:



1314
1315
1316
1317
# File 'lib/mailslurp_client/api/webhook_controller_api.rb', line 1314

def get_test_webhook_payload_bounce(opts = {})
  data, _status_code, _headers = get_test_webhook_payload_bounce_with_http_info(opts)
  data
end

#get_test_webhook_payload_bounce_recipient(opts = {}) ⇒ WebhookBounceRecipientPayload

Get webhook test payload for bounce recipient

Parameters:

  • opts (Hash) (defaults to: {})

    the optional parameters

Returns:



1368
1369
1370
1371
# File 'lib/mailslurp_client/api/webhook_controller_api.rb', line 1368

def get_test_webhook_payload_bounce_recipient(opts = {})
  data, _status_code, _headers = get_test_webhook_payload_bounce_recipient_with_http_info(opts)
  data
end

#get_test_webhook_payload_bounce_recipient_with_http_info(opts = {}) ⇒ Array<(WebhookBounceRecipientPayload, Integer, Hash)>

Get webhook test payload for bounce recipient

Parameters:

  • opts (Hash) (defaults to: {})

    the optional parameters

Returns:



1376
1377
1378
1379
1380
1381
1382
1383
1384
1385
1386
1387
1388
1389
1390
1391
1392
1393
1394
1395
1396
1397
1398
1399
1400
1401
1402
1403
1404
1405
1406
1407
1408
1409
1410
1411
1412
1413
1414
1415
1416
1417
# File 'lib/mailslurp_client/api/webhook_controller_api.rb', line 1376

def get_test_webhook_payload_bounce_recipient_with_http_info(opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug 'Calling API: WebhookControllerApi.get_test_webhook_payload_bounce_recipient ...'
  end
  # resource path
  local_var_path = '/webhooks/test/email-bounce-recipient-payload'

  # query parameters
  query_params = opts[:query_params] || {}

  # header parameters
  header_params = opts[:header_params] || {}
  # HTTP header 'Accept' (if needed)
  header_params['Accept'] = @api_client.select_header_accept(['*/*'])

  # form parameters
  form_params = opts[:form_params] || {}

  # http body (model)
  post_body = opts[:body] 

  # return_type
  return_type = opts[:return_type] || 'WebhookBounceRecipientPayload' 

  # auth_names
  auth_names = opts[:auth_names] || ['API_KEY']

  new_options = opts.merge(
    :header_params => header_params,
    :query_params => query_params,
    :form_params => form_params,
    :body => post_body,
    :auth_names => auth_names,
    :return_type => return_type
  )

  data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options)
  if @api_client.config.debugging
    @api_client.config.logger.debug "API called: WebhookControllerApi#get_test_webhook_payload_bounce_recipient\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end

#get_test_webhook_payload_bounce_with_http_info(opts = {}) ⇒ Array<(WebhookBouncePayload, Integer, Hash)>

Get webhook test payload for bounce

Parameters:

  • opts (Hash) (defaults to: {})

    the optional parameters

Returns:

  • (Array<(WebhookBouncePayload, Integer, Hash)>)

    WebhookBouncePayload data, response status code and response headers



1322
1323
1324
1325
1326
1327
1328
1329
1330
1331
1332
1333
1334
1335
1336
1337
1338
1339
1340
1341
1342
1343
1344
1345
1346
1347
1348
1349
1350
1351
1352
1353
1354
1355
1356
1357
1358
1359
1360
1361
1362
1363
# File 'lib/mailslurp_client/api/webhook_controller_api.rb', line 1322

def get_test_webhook_payload_bounce_with_http_info(opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug 'Calling API: WebhookControllerApi.get_test_webhook_payload_bounce ...'
  end
  # resource path
  local_var_path = '/webhooks/test/email-bounce-payload'

  # query parameters
  query_params = opts[:query_params] || {}

  # header parameters
  header_params = opts[:header_params] || {}
  # HTTP header 'Accept' (if needed)
  header_params['Accept'] = @api_client.select_header_accept(['*/*'])

  # form parameters
  form_params = opts[:form_params] || {}

  # http body (model)
  post_body = opts[:body] 

  # return_type
  return_type = opts[:return_type] || 'WebhookBouncePayload' 

  # auth_names
  auth_names = opts[:auth_names] || ['API_KEY']

  new_options = opts.merge(
    :header_params => header_params,
    :query_params => query_params,
    :form_params => form_params,
    :body => post_body,
    :auth_names => auth_names,
    :return_type => return_type
  )

  data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options)
  if @api_client.config.debugging
    @api_client.config.logger.debug "API called: WebhookControllerApi#get_test_webhook_payload_bounce\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end

#get_test_webhook_payload_delivery_status(opts = {}) ⇒ WebhookDeliveryStatusPayload

Get webhook test payload for delivery status event

Parameters:

  • opts (Hash) (defaults to: {})

    the optional parameters

Returns:



1422
1423
1424
1425
# File 'lib/mailslurp_client/api/webhook_controller_api.rb', line 1422

def get_test_webhook_payload_delivery_status(opts = {})
  data, _status_code, _headers = get_test_webhook_payload_delivery_status_with_http_info(opts)
  data
end

#get_test_webhook_payload_delivery_status_with_http_info(opts = {}) ⇒ Array<(WebhookDeliveryStatusPayload, Integer, Hash)>

Get webhook test payload for delivery status event

Parameters:

  • opts (Hash) (defaults to: {})

    the optional parameters

Returns:



1430
1431
1432
1433
1434
1435
1436
1437
1438
1439
1440
1441
1442
1443
1444
1445
1446
1447
1448
1449
1450
1451
1452
1453
1454
1455
1456
1457
1458
1459
1460
1461
1462
1463
1464
1465
1466
1467
1468
1469
1470
1471
# File 'lib/mailslurp_client/api/webhook_controller_api.rb', line 1430

def get_test_webhook_payload_delivery_status_with_http_info(opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug 'Calling API: WebhookControllerApi.get_test_webhook_payload_delivery_status ...'
  end
  # resource path
  local_var_path = '/webhooks/test/delivery-status-payload'

  # query parameters
  query_params = opts[:query_params] || {}

  # header parameters
  header_params = opts[:header_params] || {}
  # HTTP header 'Accept' (if needed)
  header_params['Accept'] = @api_client.select_header_accept(['*/*'])

  # form parameters
  form_params = opts[:form_params] || {}

  # http body (model)
  post_body = opts[:body] 

  # return_type
  return_type = opts[:return_type] || 'WebhookDeliveryStatusPayload' 

  # auth_names
  auth_names = opts[:auth_names] || ['API_KEY']

  new_options = opts.merge(
    :header_params => header_params,
    :query_params => query_params,
    :form_params => form_params,
    :body => post_body,
    :auth_names => auth_names,
    :return_type => return_type
  )

  data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options)
  if @api_client.config.debugging
    @api_client.config.logger.debug "API called: WebhookControllerApi#get_test_webhook_payload_delivery_status\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end

#get_test_webhook_payload_email_opened(opts = {}) ⇒ WebhookEmailOpenedPayload

Get webhook test payload for email opened event

Parameters:

  • opts (Hash) (defaults to: {})

    the optional parameters

Returns:



1476
1477
1478
1479
# File 'lib/mailslurp_client/api/webhook_controller_api.rb', line 1476

def get_test_webhook_payload_email_opened(opts = {})
  data, _status_code, _headers = get_test_webhook_payload_email_opened_with_http_info(opts)
  data
end

#get_test_webhook_payload_email_opened_with_http_info(opts = {}) ⇒ Array<(WebhookEmailOpenedPayload, Integer, Hash)>

Get webhook test payload for email opened event

Parameters:

  • opts (Hash) (defaults to: {})

    the optional parameters

Returns:

  • (Array<(WebhookEmailOpenedPayload, Integer, Hash)>)

    WebhookEmailOpenedPayload data, response status code and response headers



1484
1485
1486
1487
1488
1489
1490
1491
1492
1493
1494
1495
1496
1497
1498
1499
1500
1501
1502
1503
1504
1505
1506
1507
1508
1509
1510
1511
1512
1513
1514
1515
1516
1517
1518
1519
1520
1521
1522
1523
1524
1525
# File 'lib/mailslurp_client/api/webhook_controller_api.rb', line 1484

def get_test_webhook_payload_email_opened_with_http_info(opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug 'Calling API: WebhookControllerApi.get_test_webhook_payload_email_opened ...'
  end
  # resource path
  local_var_path = '/webhooks/test/email-opened-payload'

  # query parameters
  query_params = opts[:query_params] || {}

  # header parameters
  header_params = opts[:header_params] || {}
  # HTTP header 'Accept' (if needed)
  header_params['Accept'] = @api_client.select_header_accept(['*/*'])

  # form parameters
  form_params = opts[:form_params] || {}

  # http body (model)
  post_body = opts[:body] 

  # return_type
  return_type = opts[:return_type] || 'WebhookEmailOpenedPayload' 

  # auth_names
  auth_names = opts[:auth_names] || ['API_KEY']

  new_options = opts.merge(
    :header_params => header_params,
    :query_params => query_params,
    :form_params => form_params,
    :body => post_body,
    :auth_names => auth_names,
    :return_type => return_type
  )

  data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options)
  if @api_client.config.debugging
    @api_client.config.logger.debug "API called: WebhookControllerApi#get_test_webhook_payload_email_opened\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end

#get_test_webhook_payload_email_read(opts = {}) ⇒ WebhookEmailReadPayload

Get webhook test payload for email opened event

Parameters:

  • opts (Hash) (defaults to: {})

    the optional parameters

Returns:



1530
1531
1532
1533
# File 'lib/mailslurp_client/api/webhook_controller_api.rb', line 1530

def get_test_webhook_payload_email_read(opts = {})
  data, _status_code, _headers = get_test_webhook_payload_email_read_with_http_info(opts)
  data
end

#get_test_webhook_payload_email_read_with_http_info(opts = {}) ⇒ Array<(WebhookEmailReadPayload, Integer, Hash)>

Get webhook test payload for email opened event

Parameters:

  • opts (Hash) (defaults to: {})

    the optional parameters

Returns:

  • (Array<(WebhookEmailReadPayload, Integer, Hash)>)

    WebhookEmailReadPayload data, response status code and response headers



1538
1539
1540
1541
1542
1543
1544
1545
1546
1547
1548
1549
1550
1551
1552
1553
1554
1555
1556
1557
1558
1559
1560
1561
1562
1563
1564
1565
1566
1567
1568
1569
1570
1571
1572
1573
1574
1575
1576
1577
1578
1579
# File 'lib/mailslurp_client/api/webhook_controller_api.rb', line 1538

def get_test_webhook_payload_email_read_with_http_info(opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug 'Calling API: WebhookControllerApi.get_test_webhook_payload_email_read ...'
  end
  # resource path
  local_var_path = '/webhooks/test/email-read-payload'

  # query parameters
  query_params = opts[:query_params] || {}

  # header parameters
  header_params = opts[:header_params] || {}
  # HTTP header 'Accept' (if needed)
  header_params['Accept'] = @api_client.select_header_accept(['*/*'])

  # form parameters
  form_params = opts[:form_params] || {}

  # http body (model)
  post_body = opts[:body] 

  # return_type
  return_type = opts[:return_type] || 'WebhookEmailReadPayload' 

  # auth_names
  auth_names = opts[:auth_names] || ['API_KEY']

  new_options = opts.merge(
    :header_params => header_params,
    :query_params => query_params,
    :form_params => form_params,
    :body => post_body,
    :auth_names => auth_names,
    :return_type => return_type
  )

  data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options)
  if @api_client.config.debugging
    @api_client.config.logger.debug "API called: WebhookControllerApi#get_test_webhook_payload_email_read\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end

#get_test_webhook_payload_for_webhook(webhook_id, opts = {}) ⇒ AbstractWebhookPayload

Get example payload for webhook

Parameters:

  • webhook_id (String)
  • opts (Hash) (defaults to: {})

    the optional parameters

Returns:



1585
1586
1587
1588
# File 'lib/mailslurp_client/api/webhook_controller_api.rb', line 1585

def get_test_webhook_payload_for_webhook(webhook_id, opts = {})
  data, _status_code, _headers = get_test_webhook_payload_for_webhook_with_http_info(webhook_id, opts)
  data
end

#get_test_webhook_payload_for_webhook_with_http_info(webhook_id, opts = {}) ⇒ Array<(AbstractWebhookPayload, Integer, Hash)>

Get example payload for webhook

Parameters:

  • webhook_id (String)
  • opts (Hash) (defaults to: {})

    the optional parameters

Returns:

  • (Array<(AbstractWebhookPayload, Integer, Hash)>)

    AbstractWebhookPayload data, response status code and response headers



1594
1595
1596
1597
1598
1599
1600
1601
1602
1603
1604
1605
1606
1607
1608
1609
1610
1611
1612
1613
1614
1615
1616
1617
1618
1619
1620
1621
1622
1623
1624
1625
1626
1627
1628
1629
1630
1631
1632
1633
1634
1635
1636
1637
1638
1639
# File 'lib/mailslurp_client/api/webhook_controller_api.rb', line 1594

def get_test_webhook_payload_for_webhook_with_http_info(webhook_id, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug 'Calling API: WebhookControllerApi.get_test_webhook_payload_for_webhook ...'
  end
  # verify the required parameter 'webhook_id' is set
  if @api_client.config.client_side_validation && webhook_id.nil?
    fail ArgumentError, "Missing the required parameter 'webhook_id' when calling WebhookControllerApi.get_test_webhook_payload_for_webhook"
  end
  # resource path
  local_var_path = '/webhooks/{webhookId}/example'.sub('{' + 'webhookId' + '}', CGI.escape(webhook_id.to_s))

  # query parameters
  query_params = opts[:query_params] || {}

  # header parameters
  header_params = opts[:header_params] || {}
  # HTTP header 'Accept' (if needed)
  header_params['Accept'] = @api_client.select_header_accept(['*/*'])

  # form parameters
  form_params = opts[:form_params] || {}

  # http body (model)
  post_body = opts[:body] 

  # return_type
  return_type = opts[:return_type] || 'AbstractWebhookPayload' 

  # auth_names
  auth_names = opts[:auth_names] || ['API_KEY']

  new_options = opts.merge(
    :header_params => header_params,
    :query_params => query_params,
    :form_params => form_params,
    :body => post_body,
    :auth_names => auth_names,
    :return_type => return_type
  )

  data, status_code, headers = @api_client.call_api(:POST, local_var_path, new_options)
  if @api_client.config.debugging
    @api_client.config.logger.debug "API called: WebhookControllerApi#get_test_webhook_payload_for_webhook\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end

#get_test_webhook_payload_new_ai_transform_result(opts = {}) ⇒ WebhookNewAITransformResultPayload

Get webhook test payload for new ai transform result event

Parameters:

  • opts (Hash) (defaults to: {})

    the optional parameters

Returns:



1644
1645
1646
1647
# File 'lib/mailslurp_client/api/webhook_controller_api.rb', line 1644

def get_test_webhook_payload_new_ai_transform_result(opts = {})
  data, _status_code, _headers = get_test_webhook_payload_new_ai_transform_result_with_http_info(opts)
  data
end

#get_test_webhook_payload_new_ai_transform_result_with_http_info(opts = {}) ⇒ Array<(WebhookNewAITransformResultPayload, Integer, Hash)>

Get webhook test payload for new ai transform result event

Parameters:

  • opts (Hash) (defaults to: {})

    the optional parameters

Returns:



1652
1653
1654
1655
1656
1657
1658
1659
1660
1661
1662
1663
1664
1665
1666
1667
1668
1669
1670
1671
1672
1673
1674
1675
1676
1677
1678
1679
1680
1681
1682
1683
1684
1685
1686
1687
1688
1689
1690
1691
1692
1693
# File 'lib/mailslurp_client/api/webhook_controller_api.rb', line 1652

def get_test_webhook_payload_new_ai_transform_result_with_http_info(opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug 'Calling API: WebhookControllerApi.get_test_webhook_payload_new_ai_transform_result ...'
  end
  # resource path
  local_var_path = '/webhooks/test/new-ai-transform-result-payload'

  # query parameters
  query_params = opts[:query_params] || {}

  # header parameters
  header_params = opts[:header_params] || {}
  # HTTP header 'Accept' (if needed)
  header_params['Accept'] = @api_client.select_header_accept(['*/*'])

  # form parameters
  form_params = opts[:form_params] || {}

  # http body (model)
  post_body = opts[:body] 

  # return_type
  return_type = opts[:return_type] || 'WebhookNewAITransformResultPayload' 

  # auth_names
  auth_names = opts[:auth_names] || ['API_KEY']

  new_options = opts.merge(
    :header_params => header_params,
    :query_params => query_params,
    :form_params => form_params,
    :body => post_body,
    :auth_names => auth_names,
    :return_type => return_type
  )

  data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options)
  if @api_client.config.debugging
    @api_client.config.logger.debug "API called: WebhookControllerApi#get_test_webhook_payload_new_ai_transform_result\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end

#get_test_webhook_payload_new_attachment(opts = {}) ⇒ WebhookNewAttachmentPayload

Get webhook test payload for new attachment event

Parameters:

  • opts (Hash) (defaults to: {})

    the optional parameters

Returns:



1698
1699
1700
1701
# File 'lib/mailslurp_client/api/webhook_controller_api.rb', line 1698

def get_test_webhook_payload_new_attachment(opts = {})
  data, _status_code, _headers = get_test_webhook_payload_new_attachment_with_http_info(opts)
  data
end

#get_test_webhook_payload_new_attachment_with_http_info(opts = {}) ⇒ Array<(WebhookNewAttachmentPayload, Integer, Hash)>

Get webhook test payload for new attachment event

Parameters:

  • opts (Hash) (defaults to: {})

    the optional parameters

Returns:

  • (Array<(WebhookNewAttachmentPayload, Integer, Hash)>)

    WebhookNewAttachmentPayload data, response status code and response headers



1706
1707
1708
1709
1710
1711
1712
1713
1714
1715
1716
1717
1718
1719
1720
1721
1722
1723
1724
1725
1726
1727
1728
1729
1730
1731
1732
1733
1734
1735
1736
1737
1738
1739
1740
1741
1742
1743
1744
1745
1746
1747
# File 'lib/mailslurp_client/api/webhook_controller_api.rb', line 1706

def get_test_webhook_payload_new_attachment_with_http_info(opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug 'Calling API: WebhookControllerApi.get_test_webhook_payload_new_attachment ...'
  end
  # resource path
  local_var_path = '/webhooks/test/new-attachment-payload'

  # query parameters
  query_params = opts[:query_params] || {}

  # header parameters
  header_params = opts[:header_params] || {}
  # HTTP header 'Accept' (if needed)
  header_params['Accept'] = @api_client.select_header_accept(['*/*'])

  # form parameters
  form_params = opts[:form_params] || {}

  # http body (model)
  post_body = opts[:body] 

  # return_type
  return_type = opts[:return_type] || 'WebhookNewAttachmentPayload' 

  # auth_names
  auth_names = opts[:auth_names] || ['API_KEY']

  new_options = opts.merge(
    :header_params => header_params,
    :query_params => query_params,
    :form_params => form_params,
    :body => post_body,
    :auth_names => auth_names,
    :return_type => return_type
  )

  data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options)
  if @api_client.config.debugging
    @api_client.config.logger.debug "API called: WebhookControllerApi#get_test_webhook_payload_new_attachment\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end

#get_test_webhook_payload_new_contact(opts = {}) ⇒ WebhookNewContactPayload

Get webhook test payload for new contact event

Parameters:

  • opts (Hash) (defaults to: {})

    the optional parameters

Returns:



1752
1753
1754
1755
# File 'lib/mailslurp_client/api/webhook_controller_api.rb', line 1752

def get_test_webhook_payload_new_contact(opts = {})
  data, _status_code, _headers = get_test_webhook_payload_new_contact_with_http_info(opts)
  data
end

#get_test_webhook_payload_new_contact_with_http_info(opts = {}) ⇒ Array<(WebhookNewContactPayload, Integer, Hash)>

Get webhook test payload for new contact event

Parameters:

  • opts (Hash) (defaults to: {})

    the optional parameters

Returns:

  • (Array<(WebhookNewContactPayload, Integer, Hash)>)

    WebhookNewContactPayload data, response status code and response headers



1760
1761
1762
1763
1764
1765
1766
1767
1768
1769
1770
1771
1772
1773
1774
1775
1776
1777
1778
1779
1780
1781
1782
1783
1784
1785
1786
1787
1788
1789
1790
1791
1792
1793
1794
1795
1796
1797
1798
1799
1800
1801
# File 'lib/mailslurp_client/api/webhook_controller_api.rb', line 1760

def get_test_webhook_payload_new_contact_with_http_info(opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug 'Calling API: WebhookControllerApi.get_test_webhook_payload_new_contact ...'
  end
  # resource path
  local_var_path = '/webhooks/test/new-contact-payload'

  # query parameters
  query_params = opts[:query_params] || {}

  # header parameters
  header_params = opts[:header_params] || {}
  # HTTP header 'Accept' (if needed)
  header_params['Accept'] = @api_client.select_header_accept(['*/*'])

  # form parameters
  form_params = opts[:form_params] || {}

  # http body (model)
  post_body = opts[:body] 

  # return_type
  return_type = opts[:return_type] || 'WebhookNewContactPayload' 

  # auth_names
  auth_names = opts[:auth_names] || ['API_KEY']

  new_options = opts.merge(
    :header_params => header_params,
    :query_params => query_params,
    :form_params => form_params,
    :body => post_body,
    :auth_names => auth_names,
    :return_type => return_type
  )

  data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options)
  if @api_client.config.debugging
    @api_client.config.logger.debug "API called: WebhookControllerApi#get_test_webhook_payload_new_contact\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end

#get_test_webhook_payload_new_email(opts = {}) ⇒ WebhookNewEmailPayload

Get webhook test payload for new email event

Parameters:

  • opts (Hash) (defaults to: {})

    the optional parameters

Returns:



1806
1807
1808
1809
# File 'lib/mailslurp_client/api/webhook_controller_api.rb', line 1806

def get_test_webhook_payload_new_email(opts = {})
  data, _status_code, _headers = get_test_webhook_payload_new_email_with_http_info(opts)
  data
end

#get_test_webhook_payload_new_email_with_http_info(opts = {}) ⇒ Array<(WebhookNewEmailPayload, Integer, Hash)>

Get webhook test payload for new email event

Parameters:

  • opts (Hash) (defaults to: {})

    the optional parameters

Returns:

  • (Array<(WebhookNewEmailPayload, Integer, Hash)>)

    WebhookNewEmailPayload data, response status code and response headers



1814
1815
1816
1817
1818
1819
1820
1821
1822
1823
1824
1825
1826
1827
1828
1829
1830
1831
1832
1833
1834
1835
1836
1837
1838
1839
1840
1841
1842
1843
1844
1845
1846
1847
1848
1849
1850
1851
1852
1853
1854
1855
# File 'lib/mailslurp_client/api/webhook_controller_api.rb', line 1814

def get_test_webhook_payload_new_email_with_http_info(opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug 'Calling API: WebhookControllerApi.get_test_webhook_payload_new_email ...'
  end
  # resource path
  local_var_path = '/webhooks/test/new-email-payload'

  # query parameters
  query_params = opts[:query_params] || {}

  # header parameters
  header_params = opts[:header_params] || {}
  # HTTP header 'Accept' (if needed)
  header_params['Accept'] = @api_client.select_header_accept(['*/*'])

  # form parameters
  form_params = opts[:form_params] || {}

  # http body (model)
  post_body = opts[:body] 

  # return_type
  return_type = opts[:return_type] || 'WebhookNewEmailPayload' 

  # auth_names
  auth_names = opts[:auth_names] || ['API_KEY']

  new_options = opts.merge(
    :header_params => header_params,
    :query_params => query_params,
    :form_params => form_params,
    :body => post_body,
    :auth_names => auth_names,
    :return_type => return_type
  )

  data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options)
  if @api_client.config.debugging
    @api_client.config.logger.debug "API called: WebhookControllerApi#get_test_webhook_payload_new_email\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end

#get_test_webhook_payload_new_sms(opts = {}) ⇒ WebhookNewSmsPayload

Get webhook test payload for new sms event

Parameters:

  • opts (Hash) (defaults to: {})

    the optional parameters

Returns:



1860
1861
1862
1863
# File 'lib/mailslurp_client/api/webhook_controller_api.rb', line 1860

def get_test_webhook_payload_new_sms(opts = {})
  data, _status_code, _headers = get_test_webhook_payload_new_sms_with_http_info(opts)
  data
end

#get_test_webhook_payload_new_sms_with_http_info(opts = {}) ⇒ Array<(WebhookNewSmsPayload, Integer, Hash)>

Get webhook test payload for new sms event

Parameters:

  • opts (Hash) (defaults to: {})

    the optional parameters

Returns:

  • (Array<(WebhookNewSmsPayload, Integer, Hash)>)

    WebhookNewSmsPayload data, response status code and response headers



1868
1869
1870
1871
1872
1873
1874
1875
1876
1877
1878
1879
1880
1881
1882
1883
1884
1885
1886
1887
1888
1889
1890
1891
1892
1893
1894
1895
1896
1897
1898
1899
1900
1901
1902
1903
1904
1905
1906
1907
1908
1909
# File 'lib/mailslurp_client/api/webhook_controller_api.rb', line 1868

def get_test_webhook_payload_new_sms_with_http_info(opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug 'Calling API: WebhookControllerApi.get_test_webhook_payload_new_sms ...'
  end
  # resource path
  local_var_path = '/webhooks/test/new-sms-payload'

  # query parameters
  query_params = opts[:query_params] || {}

  # header parameters
  header_params = opts[:header_params] || {}
  # HTTP header 'Accept' (if needed)
  header_params['Accept'] = @api_client.select_header_accept(['*/*'])

  # form parameters
  form_params = opts[:form_params] || {}

  # http body (model)
  post_body = opts[:body] 

  # return_type
  return_type = opts[:return_type] || 'WebhookNewSmsPayload' 

  # auth_names
  auth_names = opts[:auth_names] || ['API_KEY']

  new_options = opts.merge(
    :header_params => header_params,
    :query_params => query_params,
    :form_params => form_params,
    :body => post_body,
    :auth_names => auth_names,
    :return_type => return_type
  )

  data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options)
  if @api_client.config.debugging
    @api_client.config.logger.debug "API called: WebhookControllerApi#get_test_webhook_payload_new_sms\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end

#get_test_webhook_payload_with_http_info(opts = {}) ⇒ Array<(AbstractWebhookPayload, Integer, Hash)>

Get test webhook payload example. Response content depends on eventName passed. Uses &#x60;EMAIL_RECEIVED&#x60; as default.

Parameters:

  • opts (Hash) (defaults to: {})

    the optional parameters

Options Hash (opts):

  • :event_name (String)

Returns:

  • (Array<(AbstractWebhookPayload, Integer, Hash)>)

    AbstractWebhookPayload data, response status code and response headers



1263
1264
1265
1266
1267
1268
1269
1270
1271
1272
1273
1274
1275
1276
1277
1278
1279
1280
1281
1282
1283
1284
1285
1286
1287
1288
1289
1290
1291
1292
1293
1294
1295
1296
1297
1298
1299
1300
1301
1302
1303
1304
1305
1306
1307
1308
1309
# File 'lib/mailslurp_client/api/webhook_controller_api.rb', line 1263

def get_test_webhook_payload_with_http_info(opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug 'Calling API: WebhookControllerApi.get_test_webhook_payload ...'
  end
  allowable_values = ["EMAIL_RECEIVED", "NEW_AI_TRANSFORM_RESULT", "NEW_EMAIL", "NEW_CONTACT", "NEW_ATTACHMENT", "EMAIL_OPENED", "EMAIL_READ", "DELIVERY_STATUS", "BOUNCE", "BOUNCE_RECIPIENT", "NEW_SMS", "NEW_GUEST_USER"]
  if @api_client.config.client_side_validation && opts[:'event_name'] && !allowable_values.include?(opts[:'event_name'])
    fail ArgumentError, "invalid value for \"event_name\", must be one of #{allowable_values}"
  end
  # resource path
  local_var_path = '/webhooks/test'

  # query parameters
  query_params = opts[:query_params] || {}
  query_params[:'eventName'] = opts[:'event_name'] if !opts[:'event_name'].nil?

  # header parameters
  header_params = opts[:header_params] || {}
  # HTTP header 'Accept' (if needed)
  header_params['Accept'] = @api_client.select_header_accept(['*/*'])

  # form parameters
  form_params = opts[:form_params] || {}

  # http body (model)
  post_body = opts[:body] 

  # return_type
  return_type = opts[:return_type] || 'AbstractWebhookPayload' 

  # auth_names
  auth_names = opts[:auth_names] || ['API_KEY']

  new_options = opts.merge(
    :header_params => header_params,
    :query_params => query_params,
    :form_params => form_params,
    :body => post_body,
    :auth_names => auth_names,
    :return_type => return_type
  )

  data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options)
  if @api_client.config.debugging
    @api_client.config.logger.debug "API called: WebhookControllerApi#get_test_webhook_payload\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end

#get_webhook(webhook_id, opts = {}) ⇒ WebhookDto

Get a webhook

Parameters:

  • webhook_id (String)
  • opts (Hash) (defaults to: {})

    the optional parameters

Returns:



1915
1916
1917
1918
# File 'lib/mailslurp_client/api/webhook_controller_api.rb', line 1915

def get_webhook(webhook_id, opts = {})
  data, _status_code, _headers = get_webhook_with_http_info(webhook_id, opts)
  data
end

#get_webhook_result(webhook_result_id, opts = {}) ⇒ WebhookResultDto

Get a webhook result for a webhook

Parameters:

  • webhook_result_id (String)

    Webhook Result ID

  • opts (Hash) (defaults to: {})

    the optional parameters

Returns:



1975
1976
1977
1978
# File 'lib/mailslurp_client/api/webhook_controller_api.rb', line 1975

def get_webhook_result(webhook_result_id, opts = {})
  data, _status_code, _headers = get_webhook_result_with_http_info(webhook_result_id, opts)
  data
end

#get_webhook_result_with_http_info(webhook_result_id, opts = {}) ⇒ Array<(WebhookResultDto, Integer, Hash)>

Get a webhook result for a webhook

Parameters:

  • webhook_result_id (String)

    Webhook Result ID

  • opts (Hash) (defaults to: {})

    the optional parameters

Returns:

  • (Array<(WebhookResultDto, Integer, Hash)>)

    WebhookResultDto data, response status code and response headers



1984
1985
1986
1987
1988
1989
1990
1991
1992
1993
1994
1995
1996
1997
1998
1999
2000
2001
2002
2003
2004
2005
2006
2007
2008
2009
2010
2011
2012
2013
2014
2015
2016
2017
2018
2019
2020
2021
2022
2023
2024
2025
2026
2027
2028
2029
# File 'lib/mailslurp_client/api/webhook_controller_api.rb', line 1984

def get_webhook_result_with_http_info(webhook_result_id, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug 'Calling API: WebhookControllerApi.get_webhook_result ...'
  end
  # verify the required parameter 'webhook_result_id' is set
  if @api_client.config.client_side_validation && webhook_result_id.nil?
    fail ArgumentError, "Missing the required parameter 'webhook_result_id' when calling WebhookControllerApi.get_webhook_result"
  end
  # resource path
  local_var_path = '/webhooks/results/{webhookResultId}'.sub('{' + 'webhookResultId' + '}', CGI.escape(webhook_result_id.to_s))

  # query parameters
  query_params = opts[:query_params] || {}

  # header parameters
  header_params = opts[:header_params] || {}
  # HTTP header 'Accept' (if needed)
  header_params['Accept'] = @api_client.select_header_accept(['*/*'])

  # form parameters
  form_params = opts[:form_params] || {}

  # http body (model)
  post_body = opts[:body] 

  # return_type
  return_type = opts[:return_type] || 'WebhookResultDto' 

  # auth_names
  auth_names = opts[:auth_names] || ['API_KEY']

  new_options = opts.merge(
    :header_params => header_params,
    :query_params => query_params,
    :form_params => form_params,
    :body => post_body,
    :auth_names => auth_names,
    :return_type => return_type
  )

  data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options)
  if @api_client.config.debugging
    @api_client.config.logger.debug "API called: WebhookControllerApi#get_webhook_result\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end

#get_webhook_results(webhook_id, opts = {}) ⇒ PageWebhookResult

Get a webhook results for a webhook

Parameters:

  • webhook_id (String)

    ID of webhook to get results for

  • opts (Hash) (defaults to: {})

    the optional parameters

Options Hash (opts):

  • :page (Integer)

    Optional page index in list pagination (default to 0)

  • :size (Integer)

    Optional page size in list pagination (default to 20)

  • :sort (String)

    Optional createdAt sort direction ASC or DESC (default to ‘ASC’)

  • :search_filter (String)

    Optional search filter

  • :since (DateTime)

    Filter by created at after the given timestamp

  • :before (DateTime)

    Filter by created at before the given timestamp

  • :unseen_only (Boolean)

    Filter for unseen exceptions only

  • :result_type (String)

    Filter by result type

  • :event_name (String)

    Filter by event name

  • :min_status_code (Integer)

    Minimum response status

  • :max_status_code (Integer)

    Maximum response status

  • :inbox_id (String)

    Inbox ID

  • :sms_id (String)

    Sms ID

  • :attachment_id (String)

    Attachment ID

  • :email_id (String)

    Email ID

  • :phone_id (String)

    Phone ID

  • :ai_transformer_id (String)

    AI Transformer ID

Returns:



2052
2053
2054
2055
# File 'lib/mailslurp_client/api/webhook_controller_api.rb', line 2052

def get_webhook_results(webhook_id, opts = {})
  data, _status_code, _headers = get_webhook_results_with_http_info(webhook_id, opts)
  data
end

#get_webhook_results_count(webhook_id, opts = {}) ⇒ CountDto

Get a webhook results count for a webhook

Parameters:

  • webhook_id (String)

    ID of webhook to get results for

  • opts (Hash) (defaults to: {})

    the optional parameters

Returns:



2158
2159
2160
2161
# File 'lib/mailslurp_client/api/webhook_controller_api.rb', line 2158

def get_webhook_results_count(webhook_id, opts = {})
  data, _status_code, _headers = get_webhook_results_count_with_http_info(webhook_id, opts)
  data
end

#get_webhook_results_count_with_http_info(webhook_id, opts = {}) ⇒ Array<(CountDto, Integer, Hash)>

Get a webhook results count for a webhook

Parameters:

  • webhook_id (String)

    ID of webhook to get results for

  • opts (Hash) (defaults to: {})

    the optional parameters

Returns:

  • (Array<(CountDto, Integer, Hash)>)

    CountDto data, response status code and response headers



2167
2168
2169
2170
2171
2172
2173
2174
2175
2176
2177
2178
2179
2180
2181
2182
2183
2184
2185
2186
2187
2188
2189
2190
2191
2192
2193
2194
2195
2196
2197
2198
2199
2200
2201
2202
2203
2204
2205
2206
2207
2208
2209
2210
2211
2212
# File 'lib/mailslurp_client/api/webhook_controller_api.rb', line 2167

def get_webhook_results_count_with_http_info(webhook_id, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug 'Calling API: WebhookControllerApi.get_webhook_results_count ...'
  end
  # verify the required parameter 'webhook_id' is set
  if @api_client.config.client_side_validation && webhook_id.nil?
    fail ArgumentError, "Missing the required parameter 'webhook_id' when calling WebhookControllerApi.get_webhook_results_count"
  end
  # resource path
  local_var_path = '/webhooks/{webhookId}/results/count'.sub('{' + 'webhookId' + '}', CGI.escape(webhook_id.to_s))

  # query parameters
  query_params = opts[:query_params] || {}

  # header parameters
  header_params = opts[:header_params] || {}
  # HTTP header 'Accept' (if needed)
  header_params['Accept'] = @api_client.select_header_accept(['*/*'])

  # form parameters
  form_params = opts[:form_params] || {}

  # http body (model)
  post_body = opts[:body] 

  # return_type
  return_type = opts[:return_type] || 'CountDto' 

  # auth_names
  auth_names = opts[:auth_names] || ['API_KEY']

  new_options = opts.merge(
    :header_params => header_params,
    :query_params => query_params,
    :form_params => form_params,
    :body => post_body,
    :auth_names => auth_names,
    :return_type => return_type
  )

  data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options)
  if @api_client.config.debugging
    @api_client.config.logger.debug "API called: WebhookControllerApi#get_webhook_results_count\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end

#get_webhook_results_unseen_error_count(opts = {}) ⇒ UnseenErrorCountDto

Get count of unseen webhook results with error status

Parameters:

  • opts (Hash) (defaults to: {})

    the optional parameters

Returns:



2217
2218
2219
2220
# File 'lib/mailslurp_client/api/webhook_controller_api.rb', line 2217

def get_webhook_results_unseen_error_count(opts = {})
  data, _status_code, _headers = get_webhook_results_unseen_error_count_with_http_info(opts)
  data
end

#get_webhook_results_unseen_error_count_with_http_info(opts = {}) ⇒ Array<(UnseenErrorCountDto, Integer, Hash)>

Get count of unseen webhook results with error status

Parameters:

  • opts (Hash) (defaults to: {})

    the optional parameters

Returns:

  • (Array<(UnseenErrorCountDto, Integer, Hash)>)

    UnseenErrorCountDto data, response status code and response headers



2225
2226
2227
2228
2229
2230
2231
2232
2233
2234
2235
2236
2237
2238
2239
2240
2241
2242
2243
2244
2245
2246
2247
2248
2249
2250
2251
2252
2253
2254
2255
2256
2257
2258
2259
2260
2261
2262
2263
2264
2265
2266
# File 'lib/mailslurp_client/api/webhook_controller_api.rb', line 2225

def get_webhook_results_unseen_error_count_with_http_info(opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug 'Calling API: WebhookControllerApi.get_webhook_results_unseen_error_count ...'
  end
  # resource path
  local_var_path = '/webhooks/results/unseen-count'

  # query parameters
  query_params = opts[:query_params] || {}

  # header parameters
  header_params = opts[:header_params] || {}
  # HTTP header 'Accept' (if needed)
  header_params['Accept'] = @api_client.select_header_accept(['*/*'])

  # form parameters
  form_params = opts[:form_params] || {}

  # http body (model)
  post_body = opts[:body] 

  # return_type
  return_type = opts[:return_type] || 'UnseenErrorCountDto' 

  # auth_names
  auth_names = opts[:auth_names] || ['API_KEY']

  new_options = opts.merge(
    :header_params => header_params,
    :query_params => query_params,
    :form_params => form_params,
    :body => post_body,
    :auth_names => auth_names,
    :return_type => return_type
  )

  data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options)
  if @api_client.config.debugging
    @api_client.config.logger.debug "API called: WebhookControllerApi#get_webhook_results_unseen_error_count\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end

#get_webhook_results_with_http_info(webhook_id, opts = {}) ⇒ Array<(PageWebhookResult, Integer, Hash)>

Get a webhook results for a webhook

Parameters:

  • webhook_id (String)

    ID of webhook to get results for

  • opts (Hash) (defaults to: {})

    the optional parameters

Options Hash (opts):

  • :page (Integer)

    Optional page index in list pagination

  • :size (Integer)

    Optional page size in list pagination

  • :sort (String)

    Optional createdAt sort direction ASC or DESC

  • :search_filter (String)

    Optional search filter

  • :since (DateTime)

    Filter by created at after the given timestamp

  • :before (DateTime)

    Filter by created at before the given timestamp

  • :unseen_only (Boolean)

    Filter for unseen exceptions only

  • :result_type (String)

    Filter by result type

  • :event_name (String)

    Filter by event name

  • :min_status_code (Integer)

    Minimum response status

  • :max_status_code (Integer)

    Maximum response status

  • :inbox_id (String)

    Inbox ID

  • :sms_id (String)

    Sms ID

  • :attachment_id (String)

    Attachment ID

  • :email_id (String)

    Email ID

  • :phone_id (String)

    Phone ID

  • :ai_transformer_id (String)

    AI Transformer ID

Returns:

  • (Array<(PageWebhookResult, Integer, Hash)>)

    PageWebhookResult data, response status code and response headers



2078
2079
2080
2081
2082
2083
2084
2085
2086
2087
2088
2089
2090
2091
2092
2093
2094
2095
2096
2097
2098
2099
2100
2101
2102
2103
2104
2105
2106
2107
2108
2109
2110
2111
2112
2113
2114
2115
2116
2117
2118
2119
2120
2121
2122
2123
2124
2125
2126
2127
2128
2129
2130
2131
2132
2133
2134
2135
2136
2137
2138
2139
2140
2141
2142
2143
2144
2145
2146
2147
2148
2149
2150
2151
2152
# File 'lib/mailslurp_client/api/webhook_controller_api.rb', line 2078

def get_webhook_results_with_http_info(webhook_id, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug 'Calling API: WebhookControllerApi.get_webhook_results ...'
  end
  # verify the required parameter 'webhook_id' is set
  if @api_client.config.client_side_validation && webhook_id.nil?
    fail ArgumentError, "Missing the required parameter 'webhook_id' when calling WebhookControllerApi.get_webhook_results"
  end
  allowable_values = ["ASC", "DESC"]
  if @api_client.config.client_side_validation && opts[:'sort'] && !allowable_values.include?(opts[:'sort'])
    fail ArgumentError, "invalid value for \"sort\", must be one of #{allowable_values}"
  end
  allowable_values = ["BAD_RESPONSE", "EXCEPTION", "SUCCESS", "REDRIVEN"]
  if @api_client.config.client_side_validation && opts[:'result_type'] && !allowable_values.include?(opts[:'result_type'])
    fail ArgumentError, "invalid value for \"result_type\", must be one of #{allowable_values}"
  end
  allowable_values = ["EMAIL_RECEIVED", "NEW_AI_TRANSFORM_RESULT", "NEW_EMAIL", "NEW_CONTACT", "NEW_ATTACHMENT", "EMAIL_OPENED", "EMAIL_READ", "DELIVERY_STATUS", "BOUNCE", "BOUNCE_RECIPIENT", "NEW_SMS", "NEW_GUEST_USER"]
  if @api_client.config.client_side_validation && opts[:'event_name'] && !allowable_values.include?(opts[:'event_name'])
    fail ArgumentError, "invalid value for \"event_name\", must be one of #{allowable_values}"
  end
  # resource path
  local_var_path = '/webhooks/{webhookId}/results'.sub('{' + 'webhookId' + '}', CGI.escape(webhook_id.to_s))

  # query parameters
  query_params = opts[:query_params] || {}
  query_params[:'page'] = opts[:'page'] if !opts[:'page'].nil?
  query_params[:'size'] = opts[:'size'] if !opts[:'size'].nil?
  query_params[:'sort'] = opts[:'sort'] if !opts[:'sort'].nil?
  query_params[:'searchFilter'] = opts[:'search_filter'] if !opts[:'search_filter'].nil?
  query_params[:'since'] = opts[:'since'] if !opts[:'since'].nil?
  query_params[:'before'] = opts[:'before'] if !opts[:'before'].nil?
  query_params[:'unseenOnly'] = opts[:'unseen_only'] if !opts[:'unseen_only'].nil?
  query_params[:'resultType'] = opts[:'result_type'] if !opts[:'result_type'].nil?
  query_params[:'eventName'] = opts[:'event_name'] if !opts[:'event_name'].nil?
  query_params[:'minStatusCode'] = opts[:'min_status_code'] if !opts[:'min_status_code'].nil?
  query_params[:'maxStatusCode'] = opts[:'max_status_code'] if !opts[:'max_status_code'].nil?
  query_params[:'inboxId'] = opts[:'inbox_id'] if !opts[:'inbox_id'].nil?
  query_params[:'smsId'] = opts[:'sms_id'] if !opts[:'sms_id'].nil?
  query_params[:'attachmentId'] = opts[:'attachment_id'] if !opts[:'attachment_id'].nil?
  query_params[:'emailId'] = opts[:'email_id'] if !opts[:'email_id'].nil?
  query_params[:'phoneId'] = opts[:'phone_id'] if !opts[:'phone_id'].nil?
  query_params[:'aiTransformerId'] = opts[:'ai_transformer_id'] if !opts[:'ai_transformer_id'].nil?

  # header parameters
  header_params = opts[:header_params] || {}
  # HTTP header 'Accept' (if needed)
  header_params['Accept'] = @api_client.select_header_accept(['*/*'])

  # form parameters
  form_params = opts[:form_params] || {}

  # http body (model)
  post_body = opts[:body] 

  # return_type
  return_type = opts[:return_type] || 'PageWebhookResult' 

  # auth_names
  auth_names = opts[:auth_names] || ['API_KEY']

  new_options = opts.merge(
    :header_params => header_params,
    :query_params => query_params,
    :form_params => form_params,
    :body => post_body,
    :auth_names => auth_names,
    :return_type => return_type
  )

  data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options)
  if @api_client.config.debugging
    @api_client.config.logger.debug "API called: WebhookControllerApi#get_webhook_results\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end

#get_webhook_with_http_info(webhook_id, opts = {}) ⇒ Array<(WebhookDto, Integer, Hash)>

Get a webhook

Parameters:

  • webhook_id (String)
  • opts (Hash) (defaults to: {})

    the optional parameters

Returns:

  • (Array<(WebhookDto, Integer, Hash)>)

    WebhookDto data, response status code and response headers



1924
1925
1926
1927
1928
1929
1930
1931
1932
1933
1934
1935
1936
1937
1938
1939
1940
1941
1942
1943
1944
1945
1946
1947
1948
1949
1950
1951
1952
1953
1954
1955
1956
1957
1958
1959
1960
1961
1962
1963
1964
1965
1966
1967
1968
1969
# File 'lib/mailslurp_client/api/webhook_controller_api.rb', line 1924

def get_webhook_with_http_info(webhook_id, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug 'Calling API: WebhookControllerApi.get_webhook ...'
  end
  # verify the required parameter 'webhook_id' is set
  if @api_client.config.client_side_validation && webhook_id.nil?
    fail ArgumentError, "Missing the required parameter 'webhook_id' when calling WebhookControllerApi.get_webhook"
  end
  # resource path
  local_var_path = '/webhooks/{webhookId}'.sub('{' + 'webhookId' + '}', CGI.escape(webhook_id.to_s))

  # query parameters
  query_params = opts[:query_params] || {}

  # header parameters
  header_params = opts[:header_params] || {}
  # HTTP header 'Accept' (if needed)
  header_params['Accept'] = @api_client.select_header_accept(['*/*'])

  # form parameters
  form_params = opts[:form_params] || {}

  # http body (model)
  post_body = opts[:body] 

  # return_type
  return_type = opts[:return_type] || 'WebhookDto' 

  # auth_names
  auth_names = opts[:auth_names] || ['API_KEY']

  new_options = opts.merge(
    :header_params => header_params,
    :query_params => query_params,
    :form_params => form_params,
    :body => post_body,
    :auth_names => auth_names,
    :return_type => return_type
  )

  data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options)
  if @api_client.config.debugging
    @api_client.config.logger.debug "API called: WebhookControllerApi#get_webhook\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end

#get_webhooks(inbox_id, opts = {}) ⇒ Array<WebhookProjection>

Get all webhooks for an Inbox

Parameters:

  • inbox_id (String)
  • opts (Hash) (defaults to: {})

    the optional parameters

Options Hash (opts):

  • :page (Integer)

    Optional page index in list pagination (default to 0)

  • :size (Integer)

    Optional page size in list pagination (default to 20)

  • :sort (String)

    Optional createdAt sort direction ASC or DESC (default to ‘ASC’)

Returns:



2275
2276
2277
2278
# File 'lib/mailslurp_client/api/webhook_controller_api.rb', line 2275

def get_webhooks(inbox_id, opts = {})
  data, _status_code, _headers = get_webhooks_with_http_info(inbox_id, opts)
  data
end

#get_webhooks_with_http_info(inbox_id, opts = {}) ⇒ Array<(Array<WebhookProjection>, Integer, Hash)>

Get all webhooks for an Inbox

Parameters:

  • inbox_id (String)
  • opts (Hash) (defaults to: {})

    the optional parameters

Options Hash (opts):

  • :page (Integer)

    Optional page index in list pagination

  • :size (Integer)

    Optional page size in list pagination

  • :sort (String)

    Optional createdAt sort direction ASC or DESC

Returns:

  • (Array<(Array<WebhookProjection>, Integer, Hash)>)

    Array<WebhookProjection> data, response status code and response headers



2287
2288
2289
2290
2291
2292
2293
2294
2295
2296
2297
2298
2299
2300
2301
2302
2303
2304
2305
2306
2307
2308
2309
2310
2311
2312
2313
2314
2315
2316
2317
2318
2319
2320
2321
2322
2323
2324
2325
2326
2327
2328
2329
2330
2331
2332
2333
2334
2335
2336
2337
2338
2339
# File 'lib/mailslurp_client/api/webhook_controller_api.rb', line 2287

def get_webhooks_with_http_info(inbox_id, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug 'Calling API: WebhookControllerApi.get_webhooks ...'
  end
  # verify the required parameter 'inbox_id' is set
  if @api_client.config.client_side_validation && inbox_id.nil?
    fail ArgumentError, "Missing the required parameter 'inbox_id' when calling WebhookControllerApi.get_webhooks"
  end
  allowable_values = ["ASC", "DESC"]
  if @api_client.config.client_side_validation && opts[:'sort'] && !allowable_values.include?(opts[:'sort'])
    fail ArgumentError, "invalid value for \"sort\", must be one of #{allowable_values}"
  end
  # resource path
  local_var_path = '/inboxes/{inboxId}/webhooks'.sub('{' + 'inboxId' + '}', CGI.escape(inbox_id.to_s))

  # query parameters
  query_params = opts[:query_params] || {}
  query_params[:'page'] = opts[:'page'] if !opts[:'page'].nil?
  query_params[:'size'] = opts[:'size'] if !opts[:'size'].nil?
  query_params[:'sort'] = opts[:'sort'] if !opts[:'sort'].nil?

  # header parameters
  header_params = opts[:header_params] || {}
  # HTTP header 'Accept' (if needed)
  header_params['Accept'] = @api_client.select_header_accept(['*/*'])

  # form parameters
  form_params = opts[:form_params] || {}

  # http body (model)
  post_body = opts[:body] 

  # return_type
  return_type = opts[:return_type] || 'Array<WebhookProjection>' 

  # auth_names
  auth_names = opts[:auth_names] || ['API_KEY']

  new_options = opts.merge(
    :header_params => header_params,
    :query_params => query_params,
    :form_params => form_params,
    :body => post_body,
    :auth_names => auth_names,
    :return_type => return_type
  )

  data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options)
  if @api_client.config.debugging
    @api_client.config.logger.debug "API called: WebhookControllerApi#get_webhooks\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end

#redrive_all_webhook_results(opts = {}) ⇒ WebhookRedriveAllResult

Redrive all webhook results that have failed status Allows you to resend webhook payloads for any recorded webhook result that failed to deliver the payload.

Parameters:

  • opts (Hash) (defaults to: {})

    the optional parameters

Returns:



2345
2346
2347
2348
# File 'lib/mailslurp_client/api/webhook_controller_api.rb', line 2345

def redrive_all_webhook_results(opts = {})
  data, _status_code, _headers = redrive_all_webhook_results_with_http_info(opts)
  data
end

#redrive_all_webhook_results_with_http_info(opts = {}) ⇒ Array<(WebhookRedriveAllResult, Integer, Hash)>

Redrive all webhook results that have failed status Allows you to resend webhook payloads for any recorded webhook result that failed to deliver the payload.

Parameters:

  • opts (Hash) (defaults to: {})

    the optional parameters

Returns:

  • (Array<(WebhookRedriveAllResult, Integer, Hash)>)

    WebhookRedriveAllResult data, response status code and response headers



2354
2355
2356
2357
2358
2359
2360
2361
2362
2363
2364
2365
2366
2367
2368
2369
2370
2371
2372
2373
2374
2375
2376
2377
2378
2379
2380
2381
2382
2383
2384
2385
2386
2387
2388
2389
2390
2391
2392
2393
2394
2395
# File 'lib/mailslurp_client/api/webhook_controller_api.rb', line 2354

def redrive_all_webhook_results_with_http_info(opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug 'Calling API: WebhookControllerApi.redrive_all_webhook_results ...'
  end
  # resource path
  local_var_path = '/webhooks/results/redrive'

  # query parameters
  query_params = opts[:query_params] || {}

  # header parameters
  header_params = opts[:header_params] || {}
  # HTTP header 'Accept' (if needed)
  header_params['Accept'] = @api_client.select_header_accept(['*/*'])

  # form parameters
  form_params = opts[:form_params] || {}

  # http body (model)
  post_body = opts[:body] 

  # return_type
  return_type = opts[:return_type] || 'WebhookRedriveAllResult' 

  # auth_names
  auth_names = opts[:auth_names] || ['API_KEY']

  new_options = opts.merge(
    :header_params => header_params,
    :query_params => query_params,
    :form_params => form_params,
    :body => post_body,
    :auth_names => auth_names,
    :return_type => return_type
  )

  data, status_code, headers = @api_client.call_api(:POST, local_var_path, new_options)
  if @api_client.config.debugging
    @api_client.config.logger.debug "API called: WebhookControllerApi#redrive_all_webhook_results\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end

#redrive_webhook_result(webhook_result_id, opts = {}) ⇒ WebhookRedriveResult

Get a webhook result and try to resend the original webhook payload Allows you to resend a webhook payload that was already sent. Webhooks that fail are retried automatically for 24 hours and then put in a dead letter queue. You can retry results manually using this method.

Parameters:

  • webhook_result_id (String)

    Webhook Result ID

  • opts (Hash) (defaults to: {})

    the optional parameters

Returns:



2402
2403
2404
2405
# File 'lib/mailslurp_client/api/webhook_controller_api.rb', line 2402

def redrive_webhook_result(webhook_result_id, opts = {})
  data, _status_code, _headers = redrive_webhook_result_with_http_info(webhook_result_id, opts)
  data
end

#redrive_webhook_result_with_http_info(webhook_result_id, opts = {}) ⇒ Array<(WebhookRedriveResult, Integer, Hash)>

Get a webhook result and try to resend the original webhook payload Allows you to resend a webhook payload that was already sent. Webhooks that fail are retried automatically for 24 hours and then put in a dead letter queue. You can retry results manually using this method.

Parameters:

  • webhook_result_id (String)

    Webhook Result ID

  • opts (Hash) (defaults to: {})

    the optional parameters

Returns:

  • (Array<(WebhookRedriveResult, Integer, Hash)>)

    WebhookRedriveResult data, response status code and response headers



2412
2413
2414
2415
2416
2417
2418
2419
2420
2421
2422
2423
2424
2425
2426
2427
2428
2429
2430
2431
2432
2433
2434
2435
2436
2437
2438
2439
2440
2441
2442
2443
2444
2445
2446
2447
2448
2449
2450
2451
2452
2453
2454
2455
2456
2457
# File 'lib/mailslurp_client/api/webhook_controller_api.rb', line 2412

def redrive_webhook_result_with_http_info(webhook_result_id, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug 'Calling API: WebhookControllerApi.redrive_webhook_result ...'
  end
  # verify the required parameter 'webhook_result_id' is set
  if @api_client.config.client_side_validation && webhook_result_id.nil?
    fail ArgumentError, "Missing the required parameter 'webhook_result_id' when calling WebhookControllerApi.redrive_webhook_result"
  end
  # resource path
  local_var_path = '/webhooks/results/{webhookResultId}/redrive'.sub('{' + 'webhookResultId' + '}', CGI.escape(webhook_result_id.to_s))

  # query parameters
  query_params = opts[:query_params] || {}

  # header parameters
  header_params = opts[:header_params] || {}
  # HTTP header 'Accept' (if needed)
  header_params['Accept'] = @api_client.select_header_accept(['*/*'])

  # form parameters
  form_params = opts[:form_params] || {}

  # http body (model)
  post_body = opts[:body] 

  # return_type
  return_type = opts[:return_type] || 'WebhookRedriveResult' 

  # auth_names
  auth_names = opts[:auth_names] || ['API_KEY']

  new_options = opts.merge(
    :header_params => header_params,
    :query_params => query_params,
    :form_params => form_params,
    :body => post_body,
    :auth_names => auth_names,
    :return_type => return_type
  )

  data, status_code, headers = @api_client.call_api(:POST, local_var_path, new_options)
  if @api_client.config.debugging
    @api_client.config.logger.debug "API called: WebhookControllerApi#redrive_webhook_result\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end

#send_test_data(webhook_id, opts = {}) ⇒ WebhookTestResult

Send webhook test data

Parameters:

  • webhook_id (String)
  • opts (Hash) (defaults to: {})

    the optional parameters

Returns:



2463
2464
2465
2466
# File 'lib/mailslurp_client/api/webhook_controller_api.rb', line 2463

def send_test_data(webhook_id, opts = {})
  data, _status_code, _headers = send_test_data_with_http_info(webhook_id, opts)
  data
end

#send_test_data_with_http_info(webhook_id, opts = {}) ⇒ Array<(WebhookTestResult, Integer, Hash)>

Send webhook test data

Parameters:

  • webhook_id (String)
  • opts (Hash) (defaults to: {})

    the optional parameters

Returns:

  • (Array<(WebhookTestResult, Integer, Hash)>)

    WebhookTestResult data, response status code and response headers



2472
2473
2474
2475
2476
2477
2478
2479
2480
2481
2482
2483
2484
2485
2486
2487
2488
2489
2490
2491
2492
2493
2494
2495
2496
2497
2498
2499
2500
2501
2502
2503
2504
2505
2506
2507
2508
2509
2510
2511
2512
2513
2514
2515
2516
2517
# File 'lib/mailslurp_client/api/webhook_controller_api.rb', line 2472

def send_test_data_with_http_info(webhook_id, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug 'Calling API: WebhookControllerApi.send_test_data ...'
  end
  # verify the required parameter 'webhook_id' is set
  if @api_client.config.client_side_validation && webhook_id.nil?
    fail ArgumentError, "Missing the required parameter 'webhook_id' when calling WebhookControllerApi.send_test_data"
  end
  # resource path
  local_var_path = '/webhooks/{webhookId}/test'.sub('{' + 'webhookId' + '}', CGI.escape(webhook_id.to_s))

  # query parameters
  query_params = opts[:query_params] || {}

  # header parameters
  header_params = opts[:header_params] || {}
  # HTTP header 'Accept' (if needed)
  header_params['Accept'] = @api_client.select_header_accept(['*/*'])

  # form parameters
  form_params = opts[:form_params] || {}

  # http body (model)
  post_body = opts[:body] 

  # return_type
  return_type = opts[:return_type] || 'WebhookTestResult' 

  # auth_names
  auth_names = opts[:auth_names] || ['API_KEY']

  new_options = opts.merge(
    :header_params => header_params,
    :query_params => query_params,
    :form_params => form_params,
    :body => post_body,
    :auth_names => auth_names,
    :return_type => return_type
  )

  data, status_code, headers = @api_client.call_api(:POST, local_var_path, new_options)
  if @api_client.config.debugging
    @api_client.config.logger.debug "API called: WebhookControllerApi#send_test_data\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end

#update_webhook(webhook_id, create_webhook_options, opts = {}) ⇒ WebhookDto

Update a webhook

Parameters:

  • webhook_id (String)
  • create_webhook_options (CreateWebhookOptions)
  • opts (Hash) (defaults to: {})

    the optional parameters

Options Hash (opts):

  • :inbox_id (String)
  • :ai_transformer_id (String)
  • :phone_number_id (String)
  • :override_auth (Boolean)

Returns:



2528
2529
2530
2531
# File 'lib/mailslurp_client/api/webhook_controller_api.rb', line 2528

def update_webhook(webhook_id, create_webhook_options, opts = {})
  data, _status_code, _headers = update_webhook_with_http_info(webhook_id, create_webhook_options, opts)
  data
end

#update_webhook_headers(webhook_id, webhook_headers, opts = {}) ⇒ WebhookDto

Update a webhook request headers

Parameters:

  • webhook_id (String)
  • webhook_headers (WebhookHeaders)
  • opts (Hash) (defaults to: {})

    the optional parameters

Returns:



2604
2605
2606
2607
# File 'lib/mailslurp_client/api/webhook_controller_api.rb', line 2604

def update_webhook_headers(webhook_id, webhook_headers, opts = {})
  data, _status_code, _headers = update_webhook_headers_with_http_info(webhook_id, webhook_headers, opts)
  data
end

#update_webhook_headers_with_http_info(webhook_id, webhook_headers, opts = {}) ⇒ Array<(WebhookDto, Integer, Hash)>

Update a webhook request headers

Parameters:

  • webhook_id (String)
  • webhook_headers (WebhookHeaders)
  • opts (Hash) (defaults to: {})

    the optional parameters

Returns:

  • (Array<(WebhookDto, Integer, Hash)>)

    WebhookDto data, response status code and response headers



2614
2615
2616
2617
2618
2619
2620
2621
2622
2623
2624
2625
2626
2627
2628
2629
2630
2631
2632
2633
2634
2635
2636
2637
2638
2639
2640
2641
2642
2643
2644
2645
2646
2647
2648
2649
2650
2651
2652
2653
2654
2655
2656
2657
2658
2659
2660
2661
2662
2663
2664
2665
# File 'lib/mailslurp_client/api/webhook_controller_api.rb', line 2614

def update_webhook_headers_with_http_info(webhook_id, webhook_headers, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug 'Calling API: WebhookControllerApi.update_webhook_headers ...'
  end
  # verify the required parameter 'webhook_id' is set
  if @api_client.config.client_side_validation && webhook_id.nil?
    fail ArgumentError, "Missing the required parameter 'webhook_id' when calling WebhookControllerApi.update_webhook_headers"
  end
  # verify the required parameter 'webhook_headers' is set
  if @api_client.config.client_side_validation && webhook_headers.nil?
    fail ArgumentError, "Missing the required parameter 'webhook_headers' when calling WebhookControllerApi.update_webhook_headers"
  end
  # resource path
  local_var_path = '/webhooks/{webhookId}/headers'.sub('{' + 'webhookId' + '}', CGI.escape(webhook_id.to_s))

  # query parameters
  query_params = opts[:query_params] || {}

  # header parameters
  header_params = opts[:header_params] || {}
  # HTTP header 'Accept' (if needed)
  header_params['Accept'] = @api_client.select_header_accept(['*/*'])
  # HTTP header 'Content-Type'
  header_params['Content-Type'] = @api_client.select_header_content_type(['application/json'])

  # form parameters
  form_params = opts[:form_params] || {}

  # http body (model)
  post_body = opts[:body] || @api_client.object_to_http_body(webhook_headers) 

  # return_type
  return_type = opts[:return_type] || 'WebhookDto' 

  # auth_names
  auth_names = opts[:auth_names] || ['API_KEY']

  new_options = opts.merge(
    :header_params => header_params,
    :query_params => query_params,
    :form_params => form_params,
    :body => post_body,
    :auth_names => auth_names,
    :return_type => return_type
  )

  data, status_code, headers = @api_client.call_api(:PUT, local_var_path, new_options)
  if @api_client.config.debugging
    @api_client.config.logger.debug "API called: WebhookControllerApi#update_webhook_headers\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end

#update_webhook_with_http_info(webhook_id, create_webhook_options, opts = {}) ⇒ Array<(WebhookDto, Integer, Hash)>

Update a webhook

Parameters:

  • webhook_id (String)
  • create_webhook_options (CreateWebhookOptions)
  • opts (Hash) (defaults to: {})

    the optional parameters

Options Hash (opts):

  • :inbox_id (String)
  • :ai_transformer_id (String)
  • :phone_number_id (String)
  • :override_auth (Boolean)

Returns:

  • (Array<(WebhookDto, Integer, Hash)>)

    WebhookDto data, response status code and response headers



2542
2543
2544
2545
2546
2547
2548
2549
2550
2551
2552
2553
2554
2555
2556
2557
2558
2559
2560
2561
2562
2563
2564
2565
2566
2567
2568
2569
2570
2571
2572
2573
2574
2575
2576
2577
2578
2579
2580
2581
2582
2583
2584
2585
2586
2587
2588
2589
2590
2591
2592
2593
2594
2595
2596
2597
# File 'lib/mailslurp_client/api/webhook_controller_api.rb', line 2542

def update_webhook_with_http_info(webhook_id, create_webhook_options, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug 'Calling API: WebhookControllerApi.update_webhook ...'
  end
  # verify the required parameter 'webhook_id' is set
  if @api_client.config.client_side_validation && webhook_id.nil?
    fail ArgumentError, "Missing the required parameter 'webhook_id' when calling WebhookControllerApi.update_webhook"
  end
  # verify the required parameter 'create_webhook_options' is set
  if @api_client.config.client_side_validation && create_webhook_options.nil?
    fail ArgumentError, "Missing the required parameter 'create_webhook_options' when calling WebhookControllerApi.update_webhook"
  end
  # resource path
  local_var_path = '/webhooks/{webhookId}'.sub('{' + 'webhookId' + '}', CGI.escape(webhook_id.to_s))

  # query parameters
  query_params = opts[:query_params] || {}
  query_params[:'inboxId'] = opts[:'inbox_id'] if !opts[:'inbox_id'].nil?
  query_params[:'aiTransformerId'] = opts[:'ai_transformer_id'] if !opts[:'ai_transformer_id'].nil?
  query_params[:'phoneNumberId'] = opts[:'phone_number_id'] if !opts[:'phone_number_id'].nil?
  query_params[:'overrideAuth'] = opts[:'override_auth'] if !opts[:'override_auth'].nil?

  # header parameters
  header_params = opts[:header_params] || {}
  # HTTP header 'Accept' (if needed)
  header_params['Accept'] = @api_client.select_header_accept(['*/*'])
  # HTTP header 'Content-Type'
  header_params['Content-Type'] = @api_client.select_header_content_type(['application/json'])

  # form parameters
  form_params = opts[:form_params] || {}

  # http body (model)
  post_body = opts[:body] || @api_client.object_to_http_body(create_webhook_options) 

  # return_type
  return_type = opts[:return_type] || 'WebhookDto' 

  # auth_names
  auth_names = opts[:auth_names] || ['API_KEY']

  new_options = opts.merge(
    :header_params => header_params,
    :query_params => query_params,
    :form_params => form_params,
    :body => post_body,
    :auth_names => auth_names,
    :return_type => return_type
  )

  data, status_code, headers = @api_client.call_api(:PATCH, local_var_path, new_options)
  if @api_client.config.debugging
    @api_client.config.logger.debug "API called: WebhookControllerApi#update_webhook\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end

#verify_webhook_signature(verify_webhook_signature_options, opts = {}) ⇒ VerifyWebhookSignatureResults

Verify a webhook payload signature Verify a webhook payload using the messageId and signature. This allows you to be sure that MailSlurp sent the payload and not another server.

Parameters:

Returns:



2672
2673
2674
2675
# File 'lib/mailslurp_client/api/webhook_controller_api.rb', line 2672

def verify_webhook_signature(verify_webhook_signature_options, opts = {})
  data, _status_code, _headers = verify_webhook_signature_with_http_info(verify_webhook_signature_options, opts)
  data
end

#verify_webhook_signature_with_http_info(verify_webhook_signature_options, opts = {}) ⇒ Array<(VerifyWebhookSignatureResults, Integer, Hash)>

Verify a webhook payload signature Verify a webhook payload using the messageId and signature. This allows you to be sure that MailSlurp sent the payload and not another server.

Parameters:

Returns:



2682
2683
2684
2685
2686
2687
2688
2689
2690
2691
2692
2693
2694
2695
2696
2697
2698
2699
2700
2701
2702
2703
2704
2705
2706
2707
2708
2709
2710
2711
2712
2713
2714
2715
2716
2717
2718
2719
2720
2721
2722
2723
2724
2725
2726
2727
2728
2729
# File 'lib/mailslurp_client/api/webhook_controller_api.rb', line 2682

def verify_webhook_signature_with_http_info(verify_webhook_signature_options, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug 'Calling API: WebhookControllerApi.verify_webhook_signature ...'
  end
  # verify the required parameter 'verify_webhook_signature_options' is set
  if @api_client.config.client_side_validation && verify_webhook_signature_options.nil?
    fail ArgumentError, "Missing the required parameter 'verify_webhook_signature_options' when calling WebhookControllerApi.verify_webhook_signature"
  end
  # resource path
  local_var_path = '/webhooks/verify'

  # query parameters
  query_params = opts[:query_params] || {}

  # header parameters
  header_params = opts[:header_params] || {}
  # HTTP header 'Accept' (if needed)
  header_params['Accept'] = @api_client.select_header_accept(['*/*'])
  # HTTP header 'Content-Type'
  header_params['Content-Type'] = @api_client.select_header_content_type(['application/json'])

  # form parameters
  form_params = opts[:form_params] || {}

  # http body (model)
  post_body = opts[:body] || @api_client.object_to_http_body(verify_webhook_signature_options) 

  # return_type
  return_type = opts[:return_type] || 'VerifyWebhookSignatureResults' 

  # auth_names
  auth_names = opts[:auth_names] || ['API_KEY']

  new_options = opts.merge(
    :header_params => header_params,
    :query_params => query_params,
    :form_params => form_params,
    :body => post_body,
    :auth_names => auth_names,
    :return_type => return_type
  )

  data, status_code, headers = @api_client.call_api(:POST, local_var_path, new_options)
  if @api_client.config.debugging
    @api_client.config.logger.debug "API called: WebhookControllerApi#verify_webhook_signature\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end

#wait_for_webhook_results(webhook_id, expected_count, timeout, opts = {}) ⇒ Array<WebhookResultDto>

Wait for webhook results for a webhook

Parameters:

  • webhook_id (String)

    ID of webhook to get results for

  • expected_count (Integer)

    Expected result count

  • timeout (Integer)

    Max time to wait in milliseconds

  • opts (Hash) (defaults to: {})

    the optional parameters

Returns:



2737
2738
2739
2740
# File 'lib/mailslurp_client/api/webhook_controller_api.rb', line 2737

def wait_for_webhook_results(webhook_id, expected_count, timeout, opts = {})
  data, _status_code, _headers = wait_for_webhook_results_with_http_info(webhook_id, expected_count, timeout, opts)
  data
end

#wait_for_webhook_results_with_http_info(webhook_id, expected_count, timeout, opts = {}) ⇒ Array<(Array<WebhookResultDto>, Integer, Hash)>

Wait for webhook results for a webhook

Parameters:

  • webhook_id (String)

    ID of webhook to get results for

  • expected_count (Integer)

    Expected result count

  • timeout (Integer)

    Max time to wait in milliseconds

  • opts (Hash) (defaults to: {})

    the optional parameters

Returns:

  • (Array<(Array<WebhookResultDto>, Integer, Hash)>)

    Array<WebhookResultDto> data, response status code and response headers



2748
2749
2750
2751
2752
2753
2754
2755
2756
2757
2758
2759
2760
2761
2762
2763
2764
2765
2766
2767
2768
2769
2770
2771
2772
2773
2774
2775
2776
2777
2778
2779
2780
2781
2782
2783
2784
2785
2786
2787
2788
2789
2790
2791
2792
2793
2794
2795
2796
2797
2798
2799
2800
2801
2802
2803
2804
2805
2806
2807
2808
2809
2810
2811
2812
2813
2814
2815
# File 'lib/mailslurp_client/api/webhook_controller_api.rb', line 2748

def wait_for_webhook_results_with_http_info(webhook_id, expected_count, timeout, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug 'Calling API: WebhookControllerApi.wait_for_webhook_results ...'
  end
  # verify the required parameter 'webhook_id' is set
  if @api_client.config.client_side_validation && webhook_id.nil?
    fail ArgumentError, "Missing the required parameter 'webhook_id' when calling WebhookControllerApi.wait_for_webhook_results"
  end
  # verify the required parameter 'expected_count' is set
  if @api_client.config.client_side_validation && expected_count.nil?
    fail ArgumentError, "Missing the required parameter 'expected_count' when calling WebhookControllerApi.wait_for_webhook_results"
  end
  if @api_client.config.client_side_validation && expected_count > 100
    fail ArgumentError, 'invalid value for "expected_count" when calling WebhookControllerApi.wait_for_webhook_results, must be smaller than or equal to 100.'
  end

  # verify the required parameter 'timeout' is set
  if @api_client.config.client_side_validation && timeout.nil?
    fail ArgumentError, "Missing the required parameter 'timeout' when calling WebhookControllerApi.wait_for_webhook_results"
  end
  if @api_client.config.client_side_validation && timeout > 300000
    fail ArgumentError, 'invalid value for "timeout" when calling WebhookControllerApi.wait_for_webhook_results, must be smaller than or equal to 300000.'
  end

  if @api_client.config.client_side_validation && timeout < 1000
    fail ArgumentError, 'invalid value for "timeout" when calling WebhookControllerApi.wait_for_webhook_results, must be greater than or equal to 1000.'
  end

  # resource path
  local_var_path = '/webhooks/{webhookId}/wait'.sub('{' + 'webhookId' + '}', CGI.escape(webhook_id.to_s))

  # query parameters
  query_params = opts[:query_params] || {}
  query_params[:'expectedCount'] = expected_count
  query_params[:'timeout'] = timeout

  # header parameters
  header_params = opts[:header_params] || {}
  # HTTP header 'Accept' (if needed)
  header_params['Accept'] = @api_client.select_header_accept(['*/*'])

  # form parameters
  form_params = opts[:form_params] || {}

  # http body (model)
  post_body = opts[:body] 

  # return_type
  return_type = opts[:return_type] || 'Array<WebhookResultDto>' 

  # auth_names
  auth_names = opts[:auth_names] || ['API_KEY']

  new_options = opts.merge(
    :header_params => header_params,
    :query_params => query_params,
    :form_params => form_params,
    :body => post_body,
    :auth_names => auth_names,
    :return_type => return_type
  )

  data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options)
  if @api_client.config.debugging
    @api_client.config.logger.debug "API called: WebhookControllerApi#wait_for_webhook_results\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end