Class: MailSlurpClient::CampaignProbeControllerApi

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

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(api_client = ApiClient.default) ⇒ CampaignProbeControllerApi

Returns a new instance of CampaignProbeControllerApi.



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

def api_client
  @api_client
end

Instance Method Details

#compare_campaign_probe_runs(probe_id, run_id, other_run_id, opts = {}) ⇒ CampaignProbeRunComparisonDto

Compare two campaign probe runs

Parameters:

  • probe_id (String)
  • run_id (String)
  • other_run_id (String)
  • opts (Hash) (defaults to: {})

    the optional parameters

Returns:



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

def compare_campaign_probe_runs(probe_id, run_id, other_run_id, opts = {})
  data, _status_code, _headers = compare_campaign_probe_runs_with_http_info(probe_id, run_id, other_run_id, opts)
  data
end

#compare_campaign_probe_runs_with_http_info(probe_id, run_id, other_run_id, opts = {}) ⇒ Array<(CampaignProbeRunComparisonDto, Integer, Hash)>

Compare two campaign probe runs

Parameters:

  • probe_id (String)
  • run_id (String)
  • other_run_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
89
90
91
92
# File 'lib/mailslurp_client/api/campaign_probe_controller_api.rb', line 39

def compare_campaign_probe_runs_with_http_info(probe_id, run_id, other_run_id, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug 'Calling API: CampaignProbeControllerApi.compare_campaign_probe_runs ...'
  end
  # verify the required parameter 'probe_id' is set
  if @api_client.config.client_side_validation && probe_id.nil?
    fail ArgumentError, "Missing the required parameter 'probe_id' when calling CampaignProbeControllerApi.compare_campaign_probe_runs"
  end
  # verify the required parameter 'run_id' is set
  if @api_client.config.client_side_validation && run_id.nil?
    fail ArgumentError, "Missing the required parameter 'run_id' when calling CampaignProbeControllerApi.compare_campaign_probe_runs"
  end
  # verify the required parameter 'other_run_id' is set
  if @api_client.config.client_side_validation && other_run_id.nil?
    fail ArgumentError, "Missing the required parameter 'other_run_id' when calling CampaignProbeControllerApi.compare_campaign_probe_runs"
  end
  # resource path
  local_var_path = '/campaign-probe/probes/{probeId}/runs/{runId}/compare/{otherRunId}'.sub('{' + 'probeId' + '}', CGI.escape(probe_id.to_s)).sub('{' + 'runId' + '}', CGI.escape(run_id.to_s)).sub('{' + 'otherRunId' + '}', CGI.escape(other_run_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] || 'CampaignProbeRunComparisonDto' 

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

#create_campaign_probe(create_campaign_probe_options, opts = {}) ⇒ CampaignProbeDto

Create campaign probe

Parameters:

Returns:



98
99
100
101
# File 'lib/mailslurp_client/api/campaign_probe_controller_api.rb', line 98

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

#create_campaign_probe_with_http_info(create_campaign_probe_options, opts = {}) ⇒ Array<(CampaignProbeDto, Integer, Hash)>

Create campaign probe

Parameters:

Returns:

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

    CampaignProbeDto data, response status code and response headers



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/campaign_probe_controller_api.rb', line 107

def create_campaign_probe_with_http_info(create_campaign_probe_options, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug 'Calling API: CampaignProbeControllerApi.create_campaign_probe ...'
  end
  # verify the required parameter 'create_campaign_probe_options' is set
  if @api_client.config.client_side_validation && create_campaign_probe_options.nil?
    fail ArgumentError, "Missing the required parameter 'create_campaign_probe_options' when calling CampaignProbeControllerApi.create_campaign_probe"
  end
  # resource path
  local_var_path = '/campaign-probe/probes'

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

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

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

#delete_campaign_probe(probe_id, opts = {}) ⇒ nil

Delete campaign probe

Parameters:

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

    the optional parameters

Returns:

  • (nil)


160
161
162
163
# File 'lib/mailslurp_client/api/campaign_probe_controller_api.rb', line 160

def delete_campaign_probe(probe_id, opts = {})
  delete_campaign_probe_with_http_info(probe_id, opts)
  nil
end

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

Delete campaign probe

Parameters:

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

    the optional parameters

Returns:

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

    nil, response status code and response headers



169
170
171
172
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
# File 'lib/mailslurp_client/api/campaign_probe_controller_api.rb', line 169

def delete_campaign_probe_with_http_info(probe_id, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug 'Calling API: CampaignProbeControllerApi.delete_campaign_probe ...'
  end
  # verify the required parameter 'probe_id' is set
  if @api_client.config.client_side_validation && probe_id.nil?
    fail ArgumentError, "Missing the required parameter 'probe_id' when calling CampaignProbeControllerApi.delete_campaign_probe"
  end
  # resource path
  local_var_path = '/campaign-probe/probes/{probeId}'.sub('{' + 'probeId' + '}', CGI.escape(probe_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: CampaignProbeControllerApi#delete_campaign_probe\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end

#get_campaign_probe(probe_id, opts = {}) ⇒ CampaignProbeDto

Get campaign probe

Parameters:

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

    the optional parameters

Returns:



218
219
220
221
# File 'lib/mailslurp_client/api/campaign_probe_controller_api.rb', line 218

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

#get_campaign_probe_insights(probe_id, opts = {}) ⇒ CampaignProbeInsightsDto

Get campaign probe insights

Parameters:

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

    the optional parameters

Options Hash (opts):

  • :since (DateTime)
  • :before (DateTime)

Returns:



280
281
282
283
# File 'lib/mailslurp_client/api/campaign_probe_controller_api.rb', line 280

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

#get_campaign_probe_insights_with_http_info(probe_id, opts = {}) ⇒ Array<(CampaignProbeInsightsDto, Integer, Hash)>

Get campaign probe insights

Parameters:

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

    the optional parameters

Options Hash (opts):

  • :since (DateTime)
  • :before (DateTime)

Returns:

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

    CampaignProbeInsightsDto data, response status code and response headers



291
292
293
294
295
296
297
298
299
300
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
# File 'lib/mailslurp_client/api/campaign_probe_controller_api.rb', line 291

def get_campaign_probe_insights_with_http_info(probe_id, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug 'Calling API: CampaignProbeControllerApi.get_campaign_probe_insights ...'
  end
  # verify the required parameter 'probe_id' is set
  if @api_client.config.client_side_validation && probe_id.nil?
    fail ArgumentError, "Missing the required parameter 'probe_id' when calling CampaignProbeControllerApi.get_campaign_probe_insights"
  end
  # resource path
  local_var_path = '/campaign-probe/probes/{probeId}/insights'.sub('{' + 'probeId' + '}', CGI.escape(probe_id.to_s))

  # 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?

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

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

#get_campaign_probe_run(probe_id, run_id, opts = {}) ⇒ CampaignProbeRunDto

Get campaign probe run

Parameters:

  • probe_id (String)
  • run_id (String)
  • opts (Hash) (defaults to: {})

    the optional parameters

Returns:



345
346
347
348
# File 'lib/mailslurp_client/api/campaign_probe_controller_api.rb', line 345

def get_campaign_probe_run(probe_id, run_id, opts = {})
  data, _status_code, _headers = get_campaign_probe_run_with_http_info(probe_id, run_id, opts)
  data
end

#get_campaign_probe_run_with_http_info(probe_id, run_id, opts = {}) ⇒ Array<(CampaignProbeRunDto, Integer, Hash)>

Get campaign probe run

Parameters:

  • probe_id (String)
  • run_id (String)
  • opts (Hash) (defaults to: {})

    the optional parameters

Returns:

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

    CampaignProbeRunDto data, response status code and response headers



355
356
357
358
359
360
361
362
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
# File 'lib/mailslurp_client/api/campaign_probe_controller_api.rb', line 355

def get_campaign_probe_run_with_http_info(probe_id, run_id, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug 'Calling API: CampaignProbeControllerApi.get_campaign_probe_run ...'
  end
  # verify the required parameter 'probe_id' is set
  if @api_client.config.client_side_validation && probe_id.nil?
    fail ArgumentError, "Missing the required parameter 'probe_id' when calling CampaignProbeControllerApi.get_campaign_probe_run"
  end
  # verify the required parameter 'run_id' is set
  if @api_client.config.client_side_validation && run_id.nil?
    fail ArgumentError, "Missing the required parameter 'run_id' when calling CampaignProbeControllerApi.get_campaign_probe_run"
  end
  # resource path
  local_var_path = '/campaign-probe/probes/{probeId}/runs/{runId}'.sub('{' + 'probeId' + '}', CGI.escape(probe_id.to_s)).sub('{' + 'runId' + '}', CGI.escape(run_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] || 'CampaignProbeRunDto' 

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

#get_campaign_probe_runs(probe_id, opts = {}) ⇒ Array<CampaignProbeRunDto>

List campaign probe runs

Parameters:

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

    the optional parameters

Options Hash (opts):

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

Returns:



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

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

#get_campaign_probe_runs_with_http_info(probe_id, opts = {}) ⇒ Array<(Array<CampaignProbeRunDto>, Integer, Hash)>

List campaign probe runs

Parameters:

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

    the optional parameters

Options Hash (opts):

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

Returns:

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

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



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
470
471
472
473
474
475
476
477
478
479
480
# File 'lib/mailslurp_client/api/campaign_probe_controller_api.rb', line 427

def get_campaign_probe_runs_with_http_info(probe_id, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug 'Calling API: CampaignProbeControllerApi.get_campaign_probe_runs ...'
  end
  # verify the required parameter 'probe_id' is set
  if @api_client.config.client_side_validation && probe_id.nil?
    fail ArgumentError, "Missing the required parameter 'probe_id' when calling CampaignProbeControllerApi.get_campaign_probe_runs"
  end
  allowable_values = ["HEALTHY", "WARNING", "FAILED"]
  if @api_client.config.client_side_validation && opts[:'status'] && !allowable_values.include?(opts[:'status'])
    fail ArgumentError, "invalid value for \"status\", must be one of #{allowable_values}"
  end
  # resource path
  local_var_path = '/campaign-probe/probes/{probeId}/runs'.sub('{' + 'probeId' + '}', CGI.escape(probe_id.to_s))

  # 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[:'status'] = opts[:'status'] if !opts[:'status'].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] || 'Array<CampaignProbeRunDto>' 

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

#get_campaign_probe_series(probe_id, opts = {}) ⇒ CampaignProbeSeriesDto

Get campaign probe trend series

Parameters:

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

    the optional parameters

Options Hash (opts):

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

Returns:



489
490
491
492
# File 'lib/mailslurp_client/api/campaign_probe_controller_api.rb', line 489

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

#get_campaign_probe_series_with_http_info(probe_id, opts = {}) ⇒ Array<(CampaignProbeSeriesDto, Integer, Hash)>

Get campaign probe trend series

Parameters:

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

    the optional parameters

Options Hash (opts):

  • :since (DateTime)
  • :before (DateTime)
  • :bucket (String)

Returns:

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

    CampaignProbeSeriesDto data, response status code and response headers



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
549
550
551
552
553
# File 'lib/mailslurp_client/api/campaign_probe_controller_api.rb', line 501

def get_campaign_probe_series_with_http_info(probe_id, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug 'Calling API: CampaignProbeControllerApi.get_campaign_probe_series ...'
  end
  # verify the required parameter 'probe_id' is set
  if @api_client.config.client_side_validation && probe_id.nil?
    fail ArgumentError, "Missing the required parameter 'probe_id' when calling CampaignProbeControllerApi.get_campaign_probe_series"
  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 = '/campaign-probe/probes/{probeId}/series'.sub('{' + 'probeId' + '}', CGI.escape(probe_id.to_s))

  # 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[:'bucket'] = opts[:'bucket'] if !opts[:'bucket'].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] || 'CampaignProbeSeriesDto' 

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

#get_campaign_probe_with_http_info(probe_id, opts = {}) ⇒ Array<(CampaignProbeDto, Integer, Hash)>

Get campaign probe

Parameters:

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

    the optional parameters

Returns:

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

    CampaignProbeDto data, response status code and response headers



227
228
229
230
231
232
233
234
235
236
237
238
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
# File 'lib/mailslurp_client/api/campaign_probe_controller_api.rb', line 227

def get_campaign_probe_with_http_info(probe_id, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug 'Calling API: CampaignProbeControllerApi.get_campaign_probe ...'
  end
  # verify the required parameter 'probe_id' is set
  if @api_client.config.client_side_validation && probe_id.nil?
    fail ArgumentError, "Missing the required parameter 'probe_id' when calling CampaignProbeControllerApi.get_campaign_probe"
  end
  # resource path
  local_var_path = '/campaign-probe/probes/{probeId}'.sub('{' + 'probeId' + '}', CGI.escape(probe_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] || 'CampaignProbeDto' 

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

#get_campaign_probes(opts = {}) ⇒ Array<CampaignProbeDto>

List campaign probes

Parameters:

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

    the optional parameters

Returns:



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

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

#get_campaign_probes_with_http_info(opts = {}) ⇒ Array<(Array<CampaignProbeDto>, Integer, Hash)>

List campaign probes

Parameters:

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

    the optional parameters

Returns:

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

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



566
567
568
569
570
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
# File 'lib/mailslurp_client/api/campaign_probe_controller_api.rb', line 566

def get_campaign_probes_with_http_info(opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug 'Calling API: CampaignProbeControllerApi.get_campaign_probes ...'
  end
  # resource path
  local_var_path = '/campaign-probe/probes'

  # 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] || 'Array<CampaignProbeDto>' 

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

#run_campaign_probe_now(probe_id, create_campaign_probe_run_options, opts = {}) ⇒ CampaignProbeRunNowResult

Run campaign probe now

Parameters:

Returns:



614
615
616
617
# File 'lib/mailslurp_client/api/campaign_probe_controller_api.rb', line 614

def run_campaign_probe_now(probe_id, create_campaign_probe_run_options, opts = {})
  data, _status_code, _headers = run_campaign_probe_now_with_http_info(probe_id, create_campaign_probe_run_options, opts)
  data
end

#run_campaign_probe_now_with_http_info(probe_id, create_campaign_probe_run_options, opts = {}) ⇒ Array<(CampaignProbeRunNowResult, Integer, Hash)>

Run campaign probe now

Parameters:

Returns:

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

    CampaignProbeRunNowResult data, response status code and response headers



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

def run_campaign_probe_now_with_http_info(probe_id, create_campaign_probe_run_options, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug 'Calling API: CampaignProbeControllerApi.run_campaign_probe_now ...'
  end
  # verify the required parameter 'probe_id' is set
  if @api_client.config.client_side_validation && probe_id.nil?
    fail ArgumentError, "Missing the required parameter 'probe_id' when calling CampaignProbeControllerApi.run_campaign_probe_now"
  end
  # verify the required parameter 'create_campaign_probe_run_options' is set
  if @api_client.config.client_side_validation && create_campaign_probe_run_options.nil?
    fail ArgumentError, "Missing the required parameter 'create_campaign_probe_run_options' when calling CampaignProbeControllerApi.run_campaign_probe_now"
  end
  # resource path
  local_var_path = '/campaign-probe/probes/{probeId}/run-now'.sub('{' + 'probeId' + '}', CGI.escape(probe_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_campaign_probe_run_options) 

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

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

#run_due_campaign_probes(opts = {}) ⇒ CampaignProbeRunDueResult

Run due campaign probes for user

Parameters:

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

    the optional parameters

Options Hash (opts):

  • :max_runs (Integer)

Returns:



681
682
683
684
# File 'lib/mailslurp_client/api/campaign_probe_controller_api.rb', line 681

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

#run_due_campaign_probes_with_http_info(opts = {}) ⇒ Array<(CampaignProbeRunDueResult, Integer, Hash)>

Run due campaign probes for user

Parameters:

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

    the optional parameters

Options Hash (opts):

  • :max_runs (Integer)

Returns:

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

    CampaignProbeRunDueResult data, response status code and response headers



690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
# File 'lib/mailslurp_client/api/campaign_probe_controller_api.rb', line 690

def run_due_campaign_probes_with_http_info(opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug 'Calling API: CampaignProbeControllerApi.run_due_campaign_probes ...'
  end
  # resource path
  local_var_path = '/campaign-probe/probes/run-due'

  # query parameters
  query_params = opts[:query_params] || {}
  query_params[:'maxRuns'] = opts[:'max_runs'] if !opts[:'max_runs'].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] || 'CampaignProbeRunDueResult' 

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

#update_campaign_probe(probe_id, update_campaign_probe_options, opts = {}) ⇒ CampaignProbeDto

Update campaign probe

Parameters:

  • probe_id (String)
  • update_campaign_probe_options (UpdateCampaignProbeOptions)
  • opts (Hash) (defaults to: {})

    the optional parameters

Returns:



739
740
741
742
# File 'lib/mailslurp_client/api/campaign_probe_controller_api.rb', line 739

def update_campaign_probe(probe_id, update_campaign_probe_options, opts = {})
  data, _status_code, _headers = update_campaign_probe_with_http_info(probe_id, update_campaign_probe_options, opts)
  data
end

#update_campaign_probe_with_http_info(probe_id, update_campaign_probe_options, opts = {}) ⇒ Array<(CampaignProbeDto, Integer, Hash)>

Update campaign probe

Parameters:

  • probe_id (String)
  • update_campaign_probe_options (UpdateCampaignProbeOptions)
  • opts (Hash) (defaults to: {})

    the optional parameters

Returns:

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

    CampaignProbeDto data, response status code and response headers



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

def update_campaign_probe_with_http_info(probe_id, update_campaign_probe_options, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug 'Calling API: CampaignProbeControllerApi.update_campaign_probe ...'
  end
  # verify the required parameter 'probe_id' is set
  if @api_client.config.client_side_validation && probe_id.nil?
    fail ArgumentError, "Missing the required parameter 'probe_id' when calling CampaignProbeControllerApi.update_campaign_probe"
  end
  # verify the required parameter 'update_campaign_probe_options' is set
  if @api_client.config.client_side_validation && update_campaign_probe_options.nil?
    fail ArgumentError, "Missing the required parameter 'update_campaign_probe_options' when calling CampaignProbeControllerApi.update_campaign_probe"
  end
  # resource path
  local_var_path = '/campaign-probe/probes/{probeId}'.sub('{' + 'probeId' + '}', CGI.escape(probe_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_campaign_probe_options) 

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

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