Class: MailSlurpClient::DeliverabilityTestControllerApi

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

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(api_client = ApiClient.default) ⇒ DeliverabilityTestControllerApi

Returns a new instance of DeliverabilityTestControllerApi.



19
20
21
# File 'lib/mailslurp_client/api/deliverability_test_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/deliverability_test_controller_api.rb', line 17

def api_client
  @api_client
end

Instance Method Details

#cancel_deliverability_simulation_job(test_id, job_id, opts = {}) ⇒ DeliverabilitySimulationJobDto

Cancel deliverability simulation job Cancel a running or paused simulation job.

Parameters:

  • test_id (String)
  • job_id (String)
  • opts (Hash) (defaults to: {})

    the optional parameters

Returns:



28
29
30
31
# File 'lib/mailslurp_client/api/deliverability_test_controller_api.rb', line 28

def cancel_deliverability_simulation_job(test_id, job_id, opts = {})
  data, _status_code, _headers = cancel_deliverability_simulation_job_with_http_info(test_id, job_id, opts)
  data
end

#cancel_deliverability_simulation_job_with_http_info(test_id, job_id, opts = {}) ⇒ Array<(DeliverabilitySimulationJobDto, Integer, Hash)>

Cancel deliverability simulation job Cancel a running or paused simulation job.

Parameters:

  • test_id (String)
  • job_id (String)
  • opts (Hash) (defaults to: {})

    the optional parameters

Returns:



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
85
86
87
88
# File 'lib/mailslurp_client/api/deliverability_test_controller_api.rb', line 39

def cancel_deliverability_simulation_job_with_http_info(test_id, job_id, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug 'Calling API: DeliverabilityTestControllerApi.cancel_deliverability_simulation_job ...'
  end
  # verify the required parameter 'test_id' is set
  if @api_client.config.client_side_validation && test_id.nil?
    fail ArgumentError, "Missing the required parameter 'test_id' when calling DeliverabilityTestControllerApi.cancel_deliverability_simulation_job"
  end
  # verify the required parameter 'job_id' is set
  if @api_client.config.client_side_validation && job_id.nil?
    fail ArgumentError, "Missing the required parameter 'job_id' when calling DeliverabilityTestControllerApi.cancel_deliverability_simulation_job"
  end
  # resource path
  local_var_path = '/test/deliverability/{testId}/simulation-jobs/{jobId}/cancel'.sub('{' + 'testId' + '}', CGI.escape(test_id.to_s)).sub('{' + 'jobId' + '}', CGI.escape(job_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] || 'DeliverabilitySimulationJobDto' 

  # 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: DeliverabilityTestControllerApi#cancel_deliverability_simulation_job\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end

#create_deliverability_simulation_job(test_id, create_deliverability_simulation_job_options, opts = {}) ⇒ DeliverabilitySimulationJobDto

Create deliverability simulation job Create and start a simulation job for a running deliverability test. Only one active simulation job is allowed per user.

Parameters:

Returns:



96
97
98
99
# File 'lib/mailslurp_client/api/deliverability_test_controller_api.rb', line 96

def create_deliverability_simulation_job(test_id, create_deliverability_simulation_job_options, opts = {})
  data, _status_code, _headers = create_deliverability_simulation_job_with_http_info(test_id, create_deliverability_simulation_job_options, opts)
  data
end

#create_deliverability_simulation_job_with_http_info(test_id, create_deliverability_simulation_job_options, opts = {}) ⇒ Array<(DeliverabilitySimulationJobDto, Integer, Hash)>

Create deliverability simulation job Create and start a simulation job for a running deliverability test. Only one active simulation job is allowed per user.

Parameters:

Returns:



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
155
156
157
158
# File 'lib/mailslurp_client/api/deliverability_test_controller_api.rb', line 107

def create_deliverability_simulation_job_with_http_info(test_id, create_deliverability_simulation_job_options, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug 'Calling API: DeliverabilityTestControllerApi.create_deliverability_simulation_job ...'
  end
  # verify the required parameter 'test_id' is set
  if @api_client.config.client_side_validation && test_id.nil?
    fail ArgumentError, "Missing the required parameter 'test_id' when calling DeliverabilityTestControllerApi.create_deliverability_simulation_job"
  end
  # verify the required parameter 'create_deliverability_simulation_job_options' is set
  if @api_client.config.client_side_validation && create_deliverability_simulation_job_options.nil?
    fail ArgumentError, "Missing the required parameter 'create_deliverability_simulation_job_options' when calling DeliverabilityTestControllerApi.create_deliverability_simulation_job"
  end
  # resource path
  local_var_path = '/test/deliverability/{testId}/simulation-jobs'.sub('{' + 'testId' + '}', CGI.escape(test_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_deliverability_simulation_job_options) 

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

  # 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: DeliverabilityTestControllerApi#create_deliverability_simulation_job\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end

#create_deliverability_test(create_deliverability_test_options, opts = {}) ⇒ DeliverabilityTestDto

Create deliverability/load test Create a deliverability test for inboxes or phone numbers using ALL, PATTERN, or EXPLICIT selector scope.

Parameters:

Returns:



165
166
167
168
# File 'lib/mailslurp_client/api/deliverability_test_controller_api.rb', line 165

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

#create_deliverability_test_with_http_info(create_deliverability_test_options, opts = {}) ⇒ Array<(DeliverabilityTestDto, Integer, Hash)>

Create deliverability/load test Create a deliverability test for inboxes or phone numbers using ALL, PATTERN, or EXPLICIT selector scope.

Parameters:

Returns:

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

    DeliverabilityTestDto data, response status code and response headers



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
# File 'lib/mailslurp_client/api/deliverability_test_controller_api.rb', line 175

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

  # 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_deliverability_test_options) 

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

  # 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: DeliverabilityTestControllerApi#create_deliverability_test\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end

#delete_deliverability_test(test_id, opts = {}) ⇒ DeleteResult

Delete deliverability/load test Delete test and all persisted entity-level results.

Parameters:

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

    the optional parameters

Returns:



229
230
231
232
# File 'lib/mailslurp_client/api/deliverability_test_controller_api.rb', line 229

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

#delete_deliverability_test_with_http_info(test_id, opts = {}) ⇒ Array<(DeleteResult, Integer, Hash)>

Delete deliverability/load test Delete test and all persisted entity-level results.

Parameters:

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

    the optional parameters

Returns:

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

    DeleteResult data, response status code and response headers



239
240
241
242
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
# File 'lib/mailslurp_client/api/deliverability_test_controller_api.rb', line 239

def delete_deliverability_test_with_http_info(test_id, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug 'Calling API: DeliverabilityTestControllerApi.delete_deliverability_test ...'
  end
  # verify the required parameter 'test_id' is set
  if @api_client.config.client_side_validation && test_id.nil?
    fail ArgumentError, "Missing the required parameter 'test_id' when calling DeliverabilityTestControllerApi.delete_deliverability_test"
  end
  # resource path
  local_var_path = '/test/deliverability/{testId}'.sub('{' + 'testId' + '}', CGI.escape(test_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] || 'DeleteResult' 

  # 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: DeliverabilityTestControllerApi#delete_deliverability_test\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end

#duplicate_deliverability_test(test_id, opts = {}) ⇒ DeliverabilityTestDto

Duplicate deliverability/load test Create a fresh deliverability test using an existing test configuration, including selector scope, exclusions, and expectations.

Parameters:

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

    the optional parameters

Returns:



291
292
293
294
# File 'lib/mailslurp_client/api/deliverability_test_controller_api.rb', line 291

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

#duplicate_deliverability_test_with_http_info(test_id, opts = {}) ⇒ Array<(DeliverabilityTestDto, Integer, Hash)>

Duplicate deliverability/load test Create a fresh deliverability test using an existing test configuration, including selector scope, exclusions, and expectations.

Parameters:

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

    the optional parameters

Returns:

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

    DeliverabilityTestDto data, response status code and response headers



301
302
303
304
305
306
307
308
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
# File 'lib/mailslurp_client/api/deliverability_test_controller_api.rb', line 301

def duplicate_deliverability_test_with_http_info(test_id, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug 'Calling API: DeliverabilityTestControllerApi.duplicate_deliverability_test ...'
  end
  # verify the required parameter 'test_id' is set
  if @api_client.config.client_side_validation && test_id.nil?
    fail ArgumentError, "Missing the required parameter 'test_id' when calling DeliverabilityTestControllerApi.duplicate_deliverability_test"
  end
  # resource path
  local_var_path = '/test/deliverability/{testId}/duplicate'.sub('{' + 'testId' + '}', CGI.escape(test_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] || 'DeliverabilityTestDto' 

  # 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: DeliverabilityTestControllerApi#duplicate_deliverability_test\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end

#export_deliverability_test_report(test_id, opts = {}) ⇒ nil

Export deliverability/load test report as PDF Export a PDF report for a terminal deliverability test (COMPLETE, FAILED, or STOPPED), including configuration, summary outcomes, and detailed entity-level results.

Parameters:

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

    the optional parameters

Returns:

  • (nil)


353
354
355
356
# File 'lib/mailslurp_client/api/deliverability_test_controller_api.rb', line 353

def export_deliverability_test_report(test_id, opts = {})
  export_deliverability_test_report_with_http_info(test_id, opts)
  nil
end

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

Export deliverability/load test report as PDF Export a PDF report for a terminal deliverability test (COMPLETE, FAILED, or STOPPED), including configuration, summary outcomes, and detailed entity-level results.

Parameters:

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

    the optional parameters

Returns:

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

    nil, response status code and response headers



363
364
365
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
# File 'lib/mailslurp_client/api/deliverability_test_controller_api.rb', line 363

def export_deliverability_test_report_with_http_info(test_id, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug 'Calling API: DeliverabilityTestControllerApi.export_deliverability_test_report ...'
  end
  # verify the required parameter 'test_id' is set
  if @api_client.config.client_side_validation && test_id.nil?
    fail ArgumentError, "Missing the required parameter 'test_id' when calling DeliverabilityTestControllerApi.export_deliverability_test_report"
  end
  # resource path
  local_var_path = '/test/deliverability/{testId}/report/export'.sub('{' + 'testId' + '}', CGI.escape(test_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(:GET, local_var_path, new_options)
  if @api_client.config.debugging
    @api_client.config.logger.debug "API called: DeliverabilityTestControllerApi#export_deliverability_test_report\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end

#export_deliverability_test_results(test_id, opts = {}) ⇒ nil

Export deliverability/load test entity results as CSV Export per-entity deliverability results including expectation-level pass/fail counts. The latest status is evaluated with the same polling safeguards before export.

Parameters:

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

    the optional parameters

Options Hash (opts):

  • :matched (Boolean)

Returns:

  • (nil)


414
415
416
417
# File 'lib/mailslurp_client/api/deliverability_test_controller_api.rb', line 414

def export_deliverability_test_results(test_id, opts = {})
  export_deliverability_test_results_with_http_info(test_id, opts)
  nil
end

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

Export deliverability/load test entity results as CSV Export per-entity deliverability results including expectation-level pass/fail counts. The latest status is evaluated with the same polling safeguards before export.

Parameters:

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

    the optional parameters

Options Hash (opts):

  • :matched (Boolean)

Returns:

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

    nil, response status code and response headers



425
426
427
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
# File 'lib/mailslurp_client/api/deliverability_test_controller_api.rb', line 425

def export_deliverability_test_results_with_http_info(test_id, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug 'Calling API: DeliverabilityTestControllerApi.export_deliverability_test_results ...'
  end
  # verify the required parameter 'test_id' is set
  if @api_client.config.client_side_validation && test_id.nil?
    fail ArgumentError, "Missing the required parameter 'test_id' when calling DeliverabilityTestControllerApi.export_deliverability_test_results"
  end
  # resource path
  local_var_path = '/test/deliverability/{testId}/results/export'.sub('{' + 'testId' + '}', CGI.escape(test_id.to_s))

  # query parameters
  query_params = opts[:query_params] || {}
  query_params[:'matched'] = opts[:'matched'] if !opts[:'matched'].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(:GET, local_var_path, new_options)
  if @api_client.config.debugging
    @api_client.config.logger.debug "API called: DeliverabilityTestControllerApi#export_deliverability_test_results\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end

#get_deliverability_analytics_series(opts = {}) ⇒ DeliverabilityAnalyticsSeriesDto

Get deliverability analytics time series Compare deliverability runs over a time range with bucketed chart metrics and run-level rows for table views.

Parameters:

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

    the optional parameters

Options Hash (opts):

  • :since (DateTime)
  • :before (DateTime)
  • :scope (String)
  • :bucket (String) — default: default to 'DAY'
  • :run_limit (Integer)

Returns:



480
481
482
483
# File 'lib/mailslurp_client/api/deliverability_test_controller_api.rb', line 480

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

#get_deliverability_analytics_series_with_http_info(opts = {}) ⇒ Array<(DeliverabilityAnalyticsSeriesDto, Integer, Hash)>

Get deliverability analytics time series Compare deliverability runs over a time range with bucketed chart metrics and run-level rows for table views.

Parameters:

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

    the optional parameters

Options Hash (opts):

  • :since (DateTime)
  • :before (DateTime)
  • :scope (String)
  • :bucket (String)
  • :run_limit (Integer)

Returns:



494
495
496
497
498
499
500
501
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
# File 'lib/mailslurp_client/api/deliverability_test_controller_api.rb', line 494

def get_deliverability_analytics_series_with_http_info(opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug 'Calling API: DeliverabilityTestControllerApi.get_deliverability_analytics_series ...'
  end
  allowable_values = ["INBOX", "PHONE"]
  if @api_client.config.client_side_validation && opts[:'scope'] && !allowable_values.include?(opts[:'scope'])
    fail ArgumentError, "invalid value for \"scope\", must be one of #{allowable_values}"
  end
  allowable_values = ["HOUR", "DAY"]
  if @api_client.config.client_side_validation && opts[:'bucket'] && !allowable_values.include?(opts[:'bucket'])
    fail ArgumentError, "invalid value for \"bucket\", must be one of #{allowable_values}"
  end
  # resource path
  local_var_path = '/test/deliverability/analytics/series'

  # query parameters
  query_params = opts[:query_params] || {}
  query_params[:'since'] = opts[:'since'] if !opts[:'since'].nil?
  query_params[:'before'] = opts[:'before'] if !opts[:'before'].nil?
  query_params[:'scope'] = opts[:'scope'] if !opts[:'scope'].nil?
  query_params[:'bucket'] = opts[:'bucket'] if !opts[:'bucket'].nil?
  query_params[:'runLimit'] = opts[:'run_limit'] if !opts[:'run_limit'].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] || 'DeliverabilityAnalyticsSeriesDto' 

  # 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: DeliverabilityTestControllerApi#get_deliverability_analytics_series\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end

#get_deliverability_failure_hotspots(opts = {}) ⇒ DeliverabilityFailureHotspotsDto

Get deliverability failure hotspots Find commonly failing entities and phone country/variant dimensions across deliverability runs in a time range.

Parameters:

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

    the optional parameters

Options Hash (opts):

  • :since (DateTime)
  • :before (DateTime)
  • :scope (String)
  • :limit (Integer)

Returns:



558
559
560
561
# File 'lib/mailslurp_client/api/deliverability_test_controller_api.rb', line 558

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

#get_deliverability_failure_hotspots_with_http_info(opts = {}) ⇒ Array<(DeliverabilityFailureHotspotsDto, Integer, Hash)>

Get deliverability failure hotspots Find commonly failing entities and phone country/variant dimensions across deliverability runs in a time range.

Parameters:

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

    the optional parameters

Options Hash (opts):

  • :since (DateTime)
  • :before (DateTime)
  • :scope (String)
  • :limit (Integer)

Returns:



571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
# File 'lib/mailslurp_client/api/deliverability_test_controller_api.rb', line 571

def get_deliverability_failure_hotspots_with_http_info(opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug 'Calling API: DeliverabilityTestControllerApi.get_deliverability_failure_hotspots ...'
  end
  allowable_values = ["INBOX", "PHONE"]
  if @api_client.config.client_side_validation && opts[:'scope'] && !allowable_values.include?(opts[:'scope'])
    fail ArgumentError, "invalid value for \"scope\", must be one of #{allowable_values}"
  end
  # resource path
  local_var_path = '/test/deliverability/analytics/hotspots'

  # query parameters
  query_params = opts[:query_params] || {}
  query_params[:'since'] = opts[:'since'] if !opts[:'since'].nil?
  query_params[:'before'] = opts[:'before'] if !opts[:'before'].nil?
  query_params[:'scope'] = opts[:'scope'] if !opts[:'scope'].nil?
  query_params[:'limit'] = opts[:'limit'] if !opts[:'limit'].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] || 'DeliverabilityFailureHotspotsDto' 

  # 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: DeliverabilityTestControllerApi#get_deliverability_failure_hotspots\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end

#get_deliverability_simulation_job(test_id, job_id, opts = {}) ⇒ DeliverabilitySimulationJobDto

Get deliverability simulation job Get simulation job status and progress counters.

Parameters:

  • test_id (String)
  • job_id (String)
  • opts (Hash) (defaults to: {})

    the optional parameters

Returns:



628
629
630
631
# File 'lib/mailslurp_client/api/deliverability_test_controller_api.rb', line 628

def get_deliverability_simulation_job(test_id, job_id, opts = {})
  data, _status_code, _headers = get_deliverability_simulation_job_with_http_info(test_id, job_id, opts)
  data
end

#get_deliverability_simulation_job_events(test_id, job_id, opts = {}) ⇒ DeliverabilitySimulationJobEventPageDto

Get deliverability simulation job events Get paged simulation events including send successes and failures.

Parameters:

  • test_id (String)
  • job_id (String)
  • opts (Hash) (defaults to: {})

    the optional parameters

Options Hash (opts):

  • :page (Integer) — default: default to 0
  • :size (Integer) — default: default to 20
  • :sort (String) — default: default to 'DESC'

Returns:



699
700
701
702
# File 'lib/mailslurp_client/api/deliverability_test_controller_api.rb', line 699

def get_deliverability_simulation_job_events(test_id, job_id, opts = {})
  data, _status_code, _headers = get_deliverability_simulation_job_events_with_http_info(test_id, job_id, opts)
  data
end

#get_deliverability_simulation_job_events_with_http_info(test_id, job_id, opts = {}) ⇒ Array<(DeliverabilitySimulationJobEventPageDto, Integer, Hash)>

Get deliverability simulation job events Get paged simulation events including send successes and failures.

Parameters:

  • test_id (String)
  • job_id (String)
  • opts (Hash) (defaults to: {})

    the optional parameters

Options Hash (opts):

  • :page (Integer)
  • :size (Integer)
  • :sort (String)

Returns:



713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
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
# File 'lib/mailslurp_client/api/deliverability_test_controller_api.rb', line 713

def get_deliverability_simulation_job_events_with_http_info(test_id, job_id, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug 'Calling API: DeliverabilityTestControllerApi.get_deliverability_simulation_job_events ...'
  end
  # verify the required parameter 'test_id' is set
  if @api_client.config.client_side_validation && test_id.nil?
    fail ArgumentError, "Missing the required parameter 'test_id' when calling DeliverabilityTestControllerApi.get_deliverability_simulation_job_events"
  end
  # verify the required parameter 'job_id' is set
  if @api_client.config.client_side_validation && job_id.nil?
    fail ArgumentError, "Missing the required parameter 'job_id' when calling DeliverabilityTestControllerApi.get_deliverability_simulation_job_events"
  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 = '/test/deliverability/{testId}/simulation-jobs/{jobId}/events'.sub('{' + 'testId' + '}', CGI.escape(test_id.to_s)).sub('{' + 'jobId' + '}', CGI.escape(job_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] || 'DeliverabilitySimulationJobEventPageDto' 

  # 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: DeliverabilityTestControllerApi#get_deliverability_simulation_job_events\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end

#get_deliverability_simulation_job_with_http_info(test_id, job_id, opts = {}) ⇒ Array<(DeliverabilitySimulationJobDto, Integer, Hash)>

Get deliverability simulation job Get simulation job status and progress counters.

Parameters:

  • test_id (String)
  • job_id (String)
  • opts (Hash) (defaults to: {})

    the optional parameters

Returns:



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
# File 'lib/mailslurp_client/api/deliverability_test_controller_api.rb', line 639

def get_deliverability_simulation_job_with_http_info(test_id, job_id, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug 'Calling API: DeliverabilityTestControllerApi.get_deliverability_simulation_job ...'
  end
  # verify the required parameter 'test_id' is set
  if @api_client.config.client_side_validation && test_id.nil?
    fail ArgumentError, "Missing the required parameter 'test_id' when calling DeliverabilityTestControllerApi.get_deliverability_simulation_job"
  end
  # verify the required parameter 'job_id' is set
  if @api_client.config.client_side_validation && job_id.nil?
    fail ArgumentError, "Missing the required parameter 'job_id' when calling DeliverabilityTestControllerApi.get_deliverability_simulation_job"
  end
  # resource path
  local_var_path = '/test/deliverability/{testId}/simulation-jobs/{jobId}'.sub('{' + 'testId' + '}', CGI.escape(test_id.to_s)).sub('{' + 'jobId' + '}', CGI.escape(job_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] || 'DeliverabilitySimulationJobDto' 

  # 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: DeliverabilityTestControllerApi#get_deliverability_simulation_job\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end

#get_deliverability_test(test_id, opts = {}) ⇒ DeliverabilityTestDto

Get deliverability/load test Get deliverability test configuration and latest progress counters.

Parameters:

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

    the optional parameters

Returns:



776
777
778
779
# File 'lib/mailslurp_client/api/deliverability_test_controller_api.rb', line 776

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

#get_deliverability_test_results(test_id, opts = {}) ⇒ DeliverabilityEntityResultPageDto

Get deliverability/load test entity results Get paged per-entity expectation results with optional matched/unmatched filtering.

Parameters:

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

    the optional parameters

Options Hash (opts):

  • :matched (Boolean)
  • :page (Integer) — default: default to 0
  • :size (Integer) — default: default to 20
  • :sort (String) — default: default to 'ASC'

Returns:



842
843
844
845
# File 'lib/mailslurp_client/api/deliverability_test_controller_api.rb', line 842

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

#get_deliverability_test_results_with_http_info(test_id, opts = {}) ⇒ Array<(DeliverabilityEntityResultPageDto, Integer, Hash)>

Get deliverability/load test entity results Get paged per-entity expectation results with optional matched/unmatched filtering.

Parameters:

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

    the optional parameters

Options Hash (opts):

  • :matched (Boolean)
  • :page (Integer)
  • :size (Integer)
  • :sort (String)

Returns:



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
# File 'lib/mailslurp_client/api/deliverability_test_controller_api.rb', line 856

def get_deliverability_test_results_with_http_info(test_id, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug 'Calling API: DeliverabilityTestControllerApi.get_deliverability_test_results ...'
  end
  # verify the required parameter 'test_id' is set
  if @api_client.config.client_side_validation && test_id.nil?
    fail ArgumentError, "Missing the required parameter 'test_id' when calling DeliverabilityTestControllerApi.get_deliverability_test_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
  # resource path
  local_var_path = '/test/deliverability/{testId}/results'.sub('{' + 'testId' + '}', CGI.escape(test_id.to_s))

  # query parameters
  query_params = opts[:query_params] || {}
  query_params[:'matched'] = opts[:'matched'] if !opts[:'matched'].nil?
  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] || 'DeliverabilityEntityResultPageDto' 

  # 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: DeliverabilityTestControllerApi#get_deliverability_test_results\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end

#get_deliverability_test_with_http_info(test_id, opts = {}) ⇒ Array<(DeliverabilityTestDto, Integer, Hash)>

Get deliverability/load test Get deliverability test configuration and latest progress counters.

Parameters:

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

    the optional parameters

Returns:

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

    DeliverabilityTestDto data, response status code and response headers



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
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
# File 'lib/mailslurp_client/api/deliverability_test_controller_api.rb', line 786

def get_deliverability_test_with_http_info(test_id, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug 'Calling API: DeliverabilityTestControllerApi.get_deliverability_test ...'
  end
  # verify the required parameter 'test_id' is set
  if @api_client.config.client_side_validation && test_id.nil?
    fail ArgumentError, "Missing the required parameter 'test_id' when calling DeliverabilityTestControllerApi.get_deliverability_test"
  end
  # resource path
  local_var_path = '/test/deliverability/{testId}'.sub('{' + 'testId' + '}', CGI.escape(test_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] || 'DeliverabilityTestDto' 

  # 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: DeliverabilityTestControllerApi#get_deliverability_test\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end

#get_deliverability_tests(opts = {}) ⇒ DeliverabilityTestPageDto

List deliverability/load tests List deliverability tests for the authenticated account.

Parameters:

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

    the optional parameters

Options Hash (opts):

  • :page (Integer)

    Page index (default to 0)

  • :size (Integer)

    Page size (default to 20)

  • :sort (String)

    Sort direction (default to 'DESC')

Returns:



918
919
920
921
# File 'lib/mailslurp_client/api/deliverability_test_controller_api.rb', line 918

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

#get_deliverability_tests_with_http_info(opts = {}) ⇒ Array<(DeliverabilityTestPageDto, Integer, Hash)>

List deliverability/load tests List deliverability tests for the authenticated account.

Parameters:

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

    the optional parameters

Options Hash (opts):

  • :page (Integer)

    Page index

  • :size (Integer)

    Page size

  • :sort (String)

    Sort direction

Returns:

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

    DeliverabilityTestPageDto data, response status code and response headers



930
931
932
933
934
935
936
937
938
939
940
941
942
943
944
945
946
947
948
949
950
951
952
953
954
955
956
957
958
959
960
961
962
963
964
965
966
967
968
969
970
971
972
973
974
975
976
977
978
# File 'lib/mailslurp_client/api/deliverability_test_controller_api.rb', line 930

def get_deliverability_tests_with_http_info(opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug 'Calling API: DeliverabilityTestControllerApi.get_deliverability_tests ...'
  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 = '/test/deliverability'

  # 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] || 'DeliverabilityTestPageDto' 

  # 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: DeliverabilityTestControllerApi#get_deliverability_tests\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end

#get_latest_deliverability_simulation_job(test_id, opts = {}) ⇒ DeliverabilitySimulationJobDto

Get latest deliverability simulation job Get the most recent simulation job for a deliverability test.

Parameters:

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

    the optional parameters

Returns:



985
986
987
988
# File 'lib/mailslurp_client/api/deliverability_test_controller_api.rb', line 985

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

#get_latest_deliverability_simulation_job_with_http_info(test_id, opts = {}) ⇒ Array<(DeliverabilitySimulationJobDto, Integer, Hash)>

Get latest deliverability simulation job Get the most recent simulation job for a deliverability test.

Parameters:

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

    the optional parameters

Returns:



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
1027
1028
1029
1030
1031
1032
1033
1034
1035
1036
1037
1038
1039
1040
# File 'lib/mailslurp_client/api/deliverability_test_controller_api.rb', line 995

def get_latest_deliverability_simulation_job_with_http_info(test_id, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug 'Calling API: DeliverabilityTestControllerApi.get_latest_deliverability_simulation_job ...'
  end
  # verify the required parameter 'test_id' is set
  if @api_client.config.client_side_validation && test_id.nil?
    fail ArgumentError, "Missing the required parameter 'test_id' when calling DeliverabilityTestControllerApi.get_latest_deliverability_simulation_job"
  end
  # resource path
  local_var_path = '/test/deliverability/{testId}/simulation-jobs/latest'.sub('{' + 'testId' + '}', CGI.escape(test_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] || 'DeliverabilitySimulationJobDto' 

  # 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: DeliverabilityTestControllerApi#get_latest_deliverability_simulation_job\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end

#pause_deliverability_simulation_job(test_id, job_id, opts = {}) ⇒ DeliverabilitySimulationJobDto

Pause deliverability simulation job Pause a running simulation job.

Parameters:

  • test_id (String)
  • job_id (String)
  • opts (Hash) (defaults to: {})

    the optional parameters

Returns:



1048
1049
1050
1051
# File 'lib/mailslurp_client/api/deliverability_test_controller_api.rb', line 1048

def pause_deliverability_simulation_job(test_id, job_id, opts = {})
  data, _status_code, _headers = pause_deliverability_simulation_job_with_http_info(test_id, job_id, opts)
  data
end

#pause_deliverability_simulation_job_with_http_info(test_id, job_id, opts = {}) ⇒ Array<(DeliverabilitySimulationJobDto, Integer, Hash)>

Pause deliverability simulation job Pause a running simulation job.

Parameters:

  • test_id (String)
  • job_id (String)
  • opts (Hash) (defaults to: {})

    the optional parameters

Returns:



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
1093
1094
1095
1096
1097
1098
1099
1100
1101
1102
1103
1104
1105
1106
1107
1108
# File 'lib/mailslurp_client/api/deliverability_test_controller_api.rb', line 1059

def pause_deliverability_simulation_job_with_http_info(test_id, job_id, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug 'Calling API: DeliverabilityTestControllerApi.pause_deliverability_simulation_job ...'
  end
  # verify the required parameter 'test_id' is set
  if @api_client.config.client_side_validation && test_id.nil?
    fail ArgumentError, "Missing the required parameter 'test_id' when calling DeliverabilityTestControllerApi.pause_deliverability_simulation_job"
  end
  # verify the required parameter 'job_id' is set
  if @api_client.config.client_side_validation && job_id.nil?
    fail ArgumentError, "Missing the required parameter 'job_id' when calling DeliverabilityTestControllerApi.pause_deliverability_simulation_job"
  end
  # resource path
  local_var_path = '/test/deliverability/{testId}/simulation-jobs/{jobId}/pause'.sub('{' + 'testId' + '}', CGI.escape(test_id.to_s)).sub('{' + 'jobId' + '}', CGI.escape(job_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] || 'DeliverabilitySimulationJobDto' 

  # 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: DeliverabilityTestControllerApi#pause_deliverability_simulation_job\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end

#pause_deliverability_test(test_id, opts = {}) ⇒ DeliverabilityTestDto

Pause deliverability/load test Pause a RUNNING or SCHEDULED deliverability test.

Parameters:

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

    the optional parameters

Returns:



1115
1116
1117
1118
# File 'lib/mailslurp_client/api/deliverability_test_controller_api.rb', line 1115

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

#pause_deliverability_test_with_http_info(test_id, opts = {}) ⇒ Array<(DeliverabilityTestDto, Integer, Hash)>

Pause deliverability/load test Pause a RUNNING or SCHEDULED deliverability test.

Parameters:

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

    the optional parameters

Returns:

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

    DeliverabilityTestDto data, response status code and response headers



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
1153
1154
1155
1156
1157
1158
1159
1160
1161
1162
1163
1164
1165
1166
1167
1168
1169
1170
# File 'lib/mailslurp_client/api/deliverability_test_controller_api.rb', line 1125

def pause_deliverability_test_with_http_info(test_id, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug 'Calling API: DeliverabilityTestControllerApi.pause_deliverability_test ...'
  end
  # verify the required parameter 'test_id' is set
  if @api_client.config.client_side_validation && test_id.nil?
    fail ArgumentError, "Missing the required parameter 'test_id' when calling DeliverabilityTestControllerApi.pause_deliverability_test"
  end
  # resource path
  local_var_path = '/test/deliverability/{testId}/pause'.sub('{' + 'testId' + '}', CGI.escape(test_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] || 'DeliverabilityTestDto' 

  # 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: DeliverabilityTestControllerApi#pause_deliverability_test\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end

#poll_deliverability_test_status(test_id, opts = {}) ⇒ DeliverabilityPollStatusResultDto

Poll deliverability/load test status Poll test progress. Evaluation is throttled with a 5-second cache window to protect backing data stores.

Parameters:

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

    the optional parameters

Returns:



1177
1178
1179
1180
# File 'lib/mailslurp_client/api/deliverability_test_controller_api.rb', line 1177

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

#poll_deliverability_test_status_with_http_info(test_id, opts = {}) ⇒ Array<(DeliverabilityPollStatusResultDto, Integer, Hash)>

Poll deliverability/load test status Poll test progress. Evaluation is throttled with a 5-second cache window to protect backing data stores.

Parameters:

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

    the optional parameters

Returns:



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
# File 'lib/mailslurp_client/api/deliverability_test_controller_api.rb', line 1187

def poll_deliverability_test_status_with_http_info(test_id, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug 'Calling API: DeliverabilityTestControllerApi.poll_deliverability_test_status ...'
  end
  # verify the required parameter 'test_id' is set
  if @api_client.config.client_side_validation && test_id.nil?
    fail ArgumentError, "Missing the required parameter 'test_id' when calling DeliverabilityTestControllerApi.poll_deliverability_test_status"
  end
  # resource path
  local_var_path = '/test/deliverability/{testId}/status'.sub('{' + 'testId' + '}', CGI.escape(test_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] || 'DeliverabilityPollStatusResultDto' 

  # 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: DeliverabilityTestControllerApi#poll_deliverability_test_status\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end

#resume_deliverability_simulation_job(test_id, job_id, opts = {}) ⇒ DeliverabilitySimulationJobDto

Resume deliverability simulation job Resume a paused simulation job.

Parameters:

  • test_id (String)
  • job_id (String)
  • opts (Hash) (defaults to: {})

    the optional parameters

Returns:



1240
1241
1242
1243
# File 'lib/mailslurp_client/api/deliverability_test_controller_api.rb', line 1240

def resume_deliverability_simulation_job(test_id, job_id, opts = {})
  data, _status_code, _headers = resume_deliverability_simulation_job_with_http_info(test_id, job_id, opts)
  data
end

#resume_deliverability_simulation_job_with_http_info(test_id, job_id, opts = {}) ⇒ Array<(DeliverabilitySimulationJobDto, Integer, Hash)>

Resume deliverability simulation job Resume a paused simulation job.

Parameters:

  • test_id (String)
  • job_id (String)
  • opts (Hash) (defaults to: {})

    the optional parameters

Returns:



1251
1252
1253
1254
1255
1256
1257
1258
1259
1260
1261
1262
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
# File 'lib/mailslurp_client/api/deliverability_test_controller_api.rb', line 1251

def resume_deliverability_simulation_job_with_http_info(test_id, job_id, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug 'Calling API: DeliverabilityTestControllerApi.resume_deliverability_simulation_job ...'
  end
  # verify the required parameter 'test_id' is set
  if @api_client.config.client_side_validation && test_id.nil?
    fail ArgumentError, "Missing the required parameter 'test_id' when calling DeliverabilityTestControllerApi.resume_deliverability_simulation_job"
  end
  # verify the required parameter 'job_id' is set
  if @api_client.config.client_side_validation && job_id.nil?
    fail ArgumentError, "Missing the required parameter 'job_id' when calling DeliverabilityTestControllerApi.resume_deliverability_simulation_job"
  end
  # resource path
  local_var_path = '/test/deliverability/{testId}/simulation-jobs/{jobId}/resume'.sub('{' + 'testId' + '}', CGI.escape(test_id.to_s)).sub('{' + 'jobId' + '}', CGI.escape(job_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] || 'DeliverabilitySimulationJobDto' 

  # 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: DeliverabilityTestControllerApi#resume_deliverability_simulation_job\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end

#start_deliverability_test(test_id, opts = {}) ⇒ DeliverabilityTestDto

Start or resume deliverability/load test Start a CREATED test or resume a PAUSED/SCHEDULED test.

Parameters:

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

    the optional parameters

Returns:



1307
1308
1309
1310
# File 'lib/mailslurp_client/api/deliverability_test_controller_api.rb', line 1307

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

#start_deliverability_test_with_http_info(test_id, opts = {}) ⇒ Array<(DeliverabilityTestDto, Integer, Hash)>

Start or resume deliverability/load test Start a CREATED test or resume a PAUSED/SCHEDULED test.

Parameters:

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

    the optional parameters

Returns:

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

    DeliverabilityTestDto data, response status code and response headers



1317
1318
1319
1320
1321
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
# File 'lib/mailslurp_client/api/deliverability_test_controller_api.rb', line 1317

def start_deliverability_test_with_http_info(test_id, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug 'Calling API: DeliverabilityTestControllerApi.start_deliverability_test ...'
  end
  # verify the required parameter 'test_id' is set
  if @api_client.config.client_side_validation && test_id.nil?
    fail ArgumentError, "Missing the required parameter 'test_id' when calling DeliverabilityTestControllerApi.start_deliverability_test"
  end
  # resource path
  local_var_path = '/test/deliverability/{testId}/start'.sub('{' + 'testId' + '}', CGI.escape(test_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] || 'DeliverabilityTestDto' 

  # 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: DeliverabilityTestControllerApi#start_deliverability_test\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end

#stop_deliverability_test(test_id, opts = {}) ⇒ DeliverabilityTestDto

Stop deliverability/load test Stop a deliverability test and mark it terminal.

Parameters:

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

    the optional parameters

Returns:



1369
1370
1371
1372
# File 'lib/mailslurp_client/api/deliverability_test_controller_api.rb', line 1369

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

#stop_deliverability_test_with_http_info(test_id, opts = {}) ⇒ Array<(DeliverabilityTestDto, Integer, Hash)>

Stop deliverability/load test Stop a deliverability test and mark it terminal.

Parameters:

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

    the optional parameters

Returns:

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

    DeliverabilityTestDto data, response status code and response headers



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
1418
1419
1420
1421
1422
1423
1424
# File 'lib/mailslurp_client/api/deliverability_test_controller_api.rb', line 1379

def stop_deliverability_test_with_http_info(test_id, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug 'Calling API: DeliverabilityTestControllerApi.stop_deliverability_test ...'
  end
  # verify the required parameter 'test_id' is set
  if @api_client.config.client_side_validation && test_id.nil?
    fail ArgumentError, "Missing the required parameter 'test_id' when calling DeliverabilityTestControllerApi.stop_deliverability_test"
  end
  # resource path
  local_var_path = '/test/deliverability/{testId}/stop'.sub('{' + 'testId' + '}', CGI.escape(test_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] || 'DeliverabilityTestDto' 

  # 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: DeliverabilityTestControllerApi#stop_deliverability_test\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end

#update_deliverability_test(test_id, update_deliverability_test_options, opts = {}) ⇒ DeliverabilityTestDto

Update deliverability/load test Update metadata, timeout, and expectations for a non-running non-terminal test.

Parameters:

Returns:



1432
1433
1434
1435
# File 'lib/mailslurp_client/api/deliverability_test_controller_api.rb', line 1432

def update_deliverability_test(test_id, update_deliverability_test_options, opts = {})
  data, _status_code, _headers = update_deliverability_test_with_http_info(test_id, update_deliverability_test_options, opts)
  data
end

#update_deliverability_test_with_http_info(test_id, update_deliverability_test_options, opts = {}) ⇒ Array<(DeliverabilityTestDto, Integer, Hash)>

Update deliverability/load test Update metadata, timeout, and expectations for a non-running non-terminal test.

Parameters:

Returns:

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

    DeliverabilityTestDto data, response status code and response headers



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
1472
1473
1474
1475
1476
1477
1478
1479
1480
1481
1482
1483
1484
1485
1486
1487
1488
1489
1490
1491
1492
1493
1494
# File 'lib/mailslurp_client/api/deliverability_test_controller_api.rb', line 1443

def update_deliverability_test_with_http_info(test_id, update_deliverability_test_options, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug 'Calling API: DeliverabilityTestControllerApi.update_deliverability_test ...'
  end
  # verify the required parameter 'test_id' is set
  if @api_client.config.client_side_validation && test_id.nil?
    fail ArgumentError, "Missing the required parameter 'test_id' when calling DeliverabilityTestControllerApi.update_deliverability_test"
  end
  # verify the required parameter 'update_deliverability_test_options' is set
  if @api_client.config.client_side_validation && update_deliverability_test_options.nil?
    fail ArgumentError, "Missing the required parameter 'update_deliverability_test_options' when calling DeliverabilityTestControllerApi.update_deliverability_test"
  end
  # resource path
  local_var_path = '/test/deliverability/{testId}'.sub('{' + 'testId' + '}', CGI.escape(test_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(update_deliverability_test_options) 

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

  # 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: DeliverabilityTestControllerApi#update_deliverability_test\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end