Class: MailSlurpClient::DevicePreviewsControllerApi

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

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(api_client = ApiClient.default) ⇒ DevicePreviewsControllerApi

Returns a new instance of DevicePreviewsControllerApi.



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

def api_client
  @api_client
end

Instance Method Details

#cancel_device_preview_run(run_id, opts = {}) ⇒ CancelDevicePreviewRunResult

Cancel a running device preview run

Parameters:

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

    the optional parameters

Options Hash (opts):

Returns:



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

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

#cancel_device_preview_run_with_http_info(run_id, opts = {}) ⇒ Array<(CancelDevicePreviewRunResult, Integer, Hash)>

Cancel a running device preview run

Parameters:

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

    the optional parameters

Options Hash (opts):

Returns:



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

def cancel_device_preview_run_with_http_info(run_id, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug 'Calling API: DevicePreviewsControllerApi.cancel_device_preview_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 DevicePreviewsControllerApi.cancel_device_preview_run"
  end
  # resource path
  local_var_path = '/emails/device-previews/{runId}/cancel'.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(['*/*'])
  # 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(opts[:'cancel_device_preview_run_options']) 

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

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

#create_device_preview_feedback(create_device_preview_feedback_options, opts = {}) ⇒ DevicePreviewFeedbackDto

Create device preview feedback

Parameters:

Returns:



90
91
92
93
# File 'lib/mailslurp_client/api/device_previews_controller_api.rb', line 90

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

#create_device_preview_feedback_with_http_info(create_device_preview_feedback_options, opts = {}) ⇒ Array<(DevicePreviewFeedbackDto, Integer, Hash)>

Create device preview feedback

Parameters:

Returns:

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

    DevicePreviewFeedbackDto data, response status code and response headers



99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
# File 'lib/mailslurp_client/api/device_previews_controller_api.rb', line 99

def create_device_preview_feedback_with_http_info(create_device_preview_feedback_options, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug 'Calling API: DevicePreviewsControllerApi.create_device_preview_feedback ...'
  end
  # verify the required parameter 'create_device_preview_feedback_options' is set
  if @api_client.config.client_side_validation && create_device_preview_feedback_options.nil?
    fail ArgumentError, "Missing the required parameter 'create_device_preview_feedback_options' when calling DevicePreviewsControllerApi.create_device_preview_feedback"
  end
  # resource path
  local_var_path = '/emails/device-previews/feedback'

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

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

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

#create_device_preview_run(email_id, opts = {}) ⇒ CreateDevicePreviewRunResult

Create a new device preview run for an email

Parameters:

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

    the optional parameters

Options Hash (opts):

Returns:



153
154
155
156
# File 'lib/mailslurp_client/api/device_previews_controller_api.rb', line 153

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

#create_device_preview_run_with_http_info(email_id, opts = {}) ⇒ Array<(CreateDevicePreviewRunResult, Integer, Hash)>

Create a new device preview run for an email

Parameters:

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

    the optional parameters

Options Hash (opts):

Returns:



163
164
165
166
167
168
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
# File 'lib/mailslurp_client/api/device_previews_controller_api.rb', line 163

def create_device_preview_run_with_http_info(email_id, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug 'Calling API: DevicePreviewsControllerApi.create_device_preview_run ...'
  end
  # verify the required parameter 'email_id' is set
  if @api_client.config.client_side_validation && email_id.nil?
    fail ArgumentError, "Missing the required parameter 'email_id' when calling DevicePreviewsControllerApi.create_device_preview_run"
  end
  # resource path
  local_var_path = '/emails/{emailId}/device-previews'.sub('{' + 'emailId' + '}', CGI.escape(email_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(opts[:'create_device_preview_options']) 

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

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

#delete_device_preview_run(run_id, opts = {}) ⇒ DeleteDevicePreviewRunResult

Delete local device preview run data

Parameters:

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

    the optional parameters

Returns:



216
217
218
219
# File 'lib/mailslurp_client/api/device_previews_controller_api.rb', line 216

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

#delete_device_preview_run_with_http_info(run_id, opts = {}) ⇒ Array<(DeleteDevicePreviewRunResult, Integer, Hash)>

Delete local device preview run data

Parameters:

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

    the optional parameters

Returns:



225
226
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
# File 'lib/mailslurp_client/api/device_previews_controller_api.rb', line 225

def delete_device_preview_run_with_http_info(run_id, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug 'Calling API: DevicePreviewsControllerApi.delete_device_preview_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 DevicePreviewsControllerApi.delete_device_preview_run"
  end
  # resource path
  local_var_path = '/emails/device-previews/{runId}'.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] || 'DeleteDevicePreviewRunResult' 

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

#ensure_device_preview_run(email_id, opts = {}) ⇒ CreateDevicePreviewRunResult

Return active run for email or create one when none exists

Parameters:

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

    the optional parameters

Options Hash (opts):

Returns:



277
278
279
280
# File 'lib/mailslurp_client/api/device_previews_controller_api.rb', line 277

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

#ensure_device_preview_run_with_http_info(email_id, opts = {}) ⇒ Array<(CreateDevicePreviewRunResult, Integer, Hash)>

Return active run for email or create one when none exists

Parameters:

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

    the optional parameters

Options Hash (opts):

Returns:



287
288
289
290
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
# File 'lib/mailslurp_client/api/device_previews_controller_api.rb', line 287

def ensure_device_preview_run_with_http_info(email_id, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug 'Calling API: DevicePreviewsControllerApi.ensure_device_preview_run ...'
  end
  # verify the required parameter 'email_id' is set
  if @api_client.config.client_side_validation && email_id.nil?
    fail ArgumentError, "Missing the required parameter 'email_id' when calling DevicePreviewsControllerApi.ensure_device_preview_run"
  end
  # resource path
  local_var_path = '/emails/{emailId}/device-previews/latest'.sub('{' + 'emailId' + '}', CGI.escape(email_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(opts[:'create_device_preview_options']) 

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

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

#get_device_preview_feedback(feedback_id, opts = {}) ⇒ DevicePreviewFeedbackDto

Get a single device preview feedback item

Parameters:

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

    the optional parameters

Returns:



340
341
342
343
# File 'lib/mailslurp_client/api/device_previews_controller_api.rb', line 340

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

#get_device_preview_feedback_items(opts = {}) ⇒ DevicePreviewFeedbackListDto

List device preview feedback

Parameters:

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

    the optional parameters

Options Hash (opts):

  • :page (Integer)
  • :size (Integer)
  • :source (String)
  • :run_id (String)
  • :status (String)
  • :provider (String)
  • :category (String)
  • :search (String)

Returns:



407
408
409
410
# File 'lib/mailslurp_client/api/device_previews_controller_api.rb', line 407

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

#get_device_preview_feedback_items_with_http_info(opts = {}) ⇒ Array<(DevicePreviewFeedbackListDto, Integer, Hash)>

List device preview feedback

Parameters:

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

    the optional parameters

Options Hash (opts):

  • :page (Integer)
  • :size (Integer)
  • :source (String)
  • :run_id (String)
  • :status (String)
  • :provider (String)
  • :category (String)
  • :search (String)

Returns:



423
424
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
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
# File 'lib/mailslurp_client/api/device_previews_controller_api.rb', line 423

def get_device_preview_feedback_items_with_http_info(opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug 'Calling API: DevicePreviewsControllerApi.get_device_preview_feedback_items ...'
  end
  allowable_values = ["API_SERVICE", "LAB_USER", "END_USER", "SYSTEM"]
  if @api_client.config.client_side_validation && opts[:'source'] && !allowable_values.include?(opts[:'source'])
    fail ArgumentError, "invalid value for \"source\", must be one of #{allowable_values}"
  end
  allowable_values = ["OPEN", "ACKNOWLEDGED", "RESOLVED", "DISMISSED"]
  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
  allowable_values = ["GMAIL", "OUTLOOK", "YAHOO"]
  if @api_client.config.client_side_validation && opts[:'provider'] && !allowable_values.include?(opts[:'provider'])
    fail ArgumentError, "invalid value for \"provider\", must be one of #{allowable_values}"
  end
  allowable_values = ["GENERAL", "RUN_QUALITY", "SCREENSHOT_QUALITY", "PROVIDER_ISSUE", "BUG_REPORT", "FEATURE_REQUEST", "NOTE"]
  if @api_client.config.client_side_validation && opts[:'category'] && !allowable_values.include?(opts[:'category'])
    fail ArgumentError, "invalid value for \"category\", must be one of #{allowable_values}"
  end
  # resource path
  local_var_path = '/emails/device-previews/feedback'

  # 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[:'source'] = opts[:'source'] if !opts[:'source'].nil?
  query_params[:'runId'] = opts[:'run_id'] if !opts[:'run_id'].nil?
  query_params[:'status'] = opts[:'status'] if !opts[:'status'].nil?
  query_params[:'provider'] = opts[:'provider'] if !opts[:'provider'].nil?
  query_params[:'category'] = opts[:'category'] if !opts[:'category'].nil?
  query_params[:'search'] = opts[:'search'] if !opts[:'search'].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] || 'DevicePreviewFeedbackListDto' 

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

#get_device_preview_feedback_with_http_info(feedback_id, opts = {}) ⇒ Array<(DevicePreviewFeedbackDto, Integer, Hash)>

Get a single device preview feedback item

Parameters:

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

    the optional parameters

Returns:

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

    DevicePreviewFeedbackDto data, response status code and response headers



349
350
351
352
353
354
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
# File 'lib/mailslurp_client/api/device_previews_controller_api.rb', line 349

def get_device_preview_feedback_with_http_info(feedback_id, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug 'Calling API: DevicePreviewsControllerApi.get_device_preview_feedback ...'
  end
  # verify the required parameter 'feedback_id' is set
  if @api_client.config.client_side_validation && feedback_id.nil?
    fail ArgumentError, "Missing the required parameter 'feedback_id' when calling DevicePreviewsControllerApi.get_device_preview_feedback"
  end
  # resource path
  local_var_path = '/emails/device-previews/feedback/{feedbackId}'.sub('{' + 'feedbackId' + '}', CGI.escape(feedback_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] || 'DevicePreviewFeedbackDto' 

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

#get_device_preview_run(run_id, opts = {}) ⇒ DevicePreviewRunDto

Get device preview run status

Parameters:

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

    the optional parameters

Returns:



494
495
496
497
# File 'lib/mailslurp_client/api/device_previews_controller_api.rb', line 494

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

#get_device_preview_run_provider_progress(run_id, provider, opts = {}) ⇒ DevicePreviewProviderProgressDto

Get provider-level progress for a device preview run

Parameters:

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

    the optional parameters

Returns:



555
556
557
558
# File 'lib/mailslurp_client/api/device_previews_controller_api.rb', line 555

def get_device_preview_run_provider_progress(run_id, provider, opts = {})
  data, _status_code, _headers = get_device_preview_run_provider_progress_with_http_info(run_id, provider, opts)
  data
end

#get_device_preview_run_provider_progress_with_http_info(run_id, provider, opts = {}) ⇒ Array<(DevicePreviewProviderProgressDto, Integer, Hash)>

Get provider-level progress for a device preview run

Parameters:

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

    the optional parameters

Returns:



565
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
608
609
610
611
612
613
614
615
616
617
618
619
# File 'lib/mailslurp_client/api/device_previews_controller_api.rb', line 565

def get_device_preview_run_provider_progress_with_http_info(run_id, provider, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug 'Calling API: DevicePreviewsControllerApi.get_device_preview_run_provider_progress ...'
  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 DevicePreviewsControllerApi.get_device_preview_run_provider_progress"
  end
  # verify the required parameter 'provider' is set
  if @api_client.config.client_side_validation && provider.nil?
    fail ArgumentError, "Missing the required parameter 'provider' when calling DevicePreviewsControllerApi.get_device_preview_run_provider_progress"
  end
  # verify enum value
  allowable_values = ["GMAIL", "OUTLOOK", "YAHOO"]
  if @api_client.config.client_side_validation && !allowable_values.include?(provider)
    fail ArgumentError, "invalid value for \"provider\", must be one of #{allowable_values}"
  end
  # resource path
  local_var_path = '/emails/device-previews/{runId}/providers/{provider}'.sub('{' + 'runId' + '}', CGI.escape(run_id.to_s)).sub('{' + 'provider' + '}', CGI.escape(provider.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] || 'DevicePreviewProviderProgressDto' 

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

#get_device_preview_run_results(run_id, opts = {}) ⇒ DevicePreviewRunResultsDto

Get device preview run results

Parameters:

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

    the optional parameters

Returns:



625
626
627
628
# File 'lib/mailslurp_client/api/device_previews_controller_api.rb', line 625

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

#get_device_preview_run_results_with_http_info(run_id, opts = {}) ⇒ Array<(DevicePreviewRunResultsDto, Integer, Hash)>

Get device preview run results

Parameters:

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

    the optional parameters

Returns:

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

    DevicePreviewRunResultsDto data, response status code and response headers



634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
# File 'lib/mailslurp_client/api/device_previews_controller_api.rb', line 634

def get_device_preview_run_results_with_http_info(run_id, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug 'Calling API: DevicePreviewsControllerApi.get_device_preview_run_results ...'
  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 DevicePreviewsControllerApi.get_device_preview_run_results"
  end
  # resource path
  local_var_path = '/emails/device-previews/{runId}/results'.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] || 'DevicePreviewRunResultsDto' 

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

#get_device_preview_run_screenshot(run_id, screenshot_id, opts = {}) ⇒ String

Get a seeded device preview screenshot image

Parameters:

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

    the optional parameters

Returns:

  • (String)


686
687
688
689
# File 'lib/mailslurp_client/api/device_previews_controller_api.rb', line 686

def get_device_preview_run_screenshot(run_id, screenshot_id, opts = {})
  data, _status_code, _headers = get_device_preview_run_screenshot_with_http_info(run_id, screenshot_id, opts)
  data
end

#get_device_preview_run_screenshot_with_http_info(run_id, screenshot_id, opts = {}) ⇒ Array<(String, Integer, Hash)>

Get a seeded device preview screenshot image

Parameters:

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

    the optional parameters

Returns:

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

    String data, response status code and response headers



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
733
734
735
736
737
738
739
740
741
742
743
744
745
# File 'lib/mailslurp_client/api/device_previews_controller_api.rb', line 696

def get_device_preview_run_screenshot_with_http_info(run_id, screenshot_id, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug 'Calling API: DevicePreviewsControllerApi.get_device_preview_run_screenshot ...'
  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 DevicePreviewsControllerApi.get_device_preview_run_screenshot"
  end
  # verify the required parameter 'screenshot_id' is set
  if @api_client.config.client_side_validation && screenshot_id.nil?
    fail ArgumentError, "Missing the required parameter 'screenshot_id' when calling DevicePreviewsControllerApi.get_device_preview_run_screenshot"
  end
  # resource path
  local_var_path = '/emails/device-previews/{runId}/screenshots/{screenshotId}/image'.sub('{' + 'runId' + '}', CGI.escape(run_id.to_s)).sub('{' + 'screenshotId' + '}', CGI.escape(screenshot_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] || 'String' 

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

#get_device_preview_run_with_http_info(run_id, opts = {}) ⇒ Array<(DevicePreviewRunDto, Integer, Hash)>

Get device preview run status

Parameters:

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

    the optional parameters

Returns:

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

    DevicePreviewRunDto data, response status code and response headers



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/device_previews_controller_api.rb', line 503

def get_device_preview_run_with_http_info(run_id, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug 'Calling API: DevicePreviewsControllerApi.get_device_preview_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 DevicePreviewsControllerApi.get_device_preview_run"
  end
  # resource path
  local_var_path = '/emails/device-previews/{runId}'.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] || 'DevicePreviewRunDto' 

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

#get_device_preview_runs(email_id, opts = {}) ⇒ Array<DevicePreviewRunDto>

List previous device preview runs for an email

Parameters:

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

    the optional parameters

Options Hash (opts):

  • :limit (Integer) — default: default to 50

Returns:



752
753
754
755
# File 'lib/mailslurp_client/api/device_previews_controller_api.rb', line 752

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

#get_device_preview_runs_for_account(opts = {}) ⇒ Array<DevicePreviewRunDto>

List previous device preview runs for account

Parameters:

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

    the optional parameters

Options Hash (opts):

  • :limit (Integer) — default: default to 50

Returns:



814
815
816
817
# File 'lib/mailslurp_client/api/device_previews_controller_api.rb', line 814

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

#get_device_preview_runs_for_account_with_http_info(opts = {}) ⇒ Array<(Array<DevicePreviewRunDto>, Integer, Hash)>

List previous device preview runs for account

Parameters:

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

    the optional parameters

Options Hash (opts):

  • :limit (Integer)

Returns:

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

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



823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
# File 'lib/mailslurp_client/api/device_previews_controller_api.rb', line 823

def (opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug 'Calling API: DevicePreviewsControllerApi.get_device_preview_runs_for_account ...'
  end
  # resource path
  local_var_path = '/emails/device-previews'

  # query parameters
  query_params = opts[:query_params] || {}
  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<DevicePreviewRunDto>' 

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

#get_device_preview_runs_offset_paginated(email_id, opts = {}) ⇒ PageDevicePreviewRunProjection

List previous device preview runs for an email in paginated form

Parameters:

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

    the optional parameters

Options Hash (opts):

  • :page (Integer)

    Optional page index in list pagination (default to 0)

  • :size (Integer)

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

  • :sort (String)

    Optional createdAt sort direction ASC or DESC (default to 'DESC')

Returns:



874
875
876
877
# File 'lib/mailslurp_client/api/device_previews_controller_api.rb', line 874

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

#get_device_preview_runs_offset_paginated_with_http_info(email_id, opts = {}) ⇒ Array<(PageDevicePreviewRunProjection, Integer, Hash)>

List previous device preview runs for an email in paginated form

Parameters:

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

    the optional parameters

Options Hash (opts):

  • :page (Integer)

    Optional page index in list pagination

  • :size (Integer)

    Optional page size for paginated result list.

  • :sort (String)

    Optional createdAt sort direction ASC or DESC

Returns:



886
887
888
889
890
891
892
893
894
895
896
897
898
899
900
901
902
903
904
905
906
907
908
909
910
911
912
913
914
915
916
917
918
919
920
921
922
923
924
925
926
927
928
929
930
931
932
933
934
935
936
937
938
939
940
941
942
# File 'lib/mailslurp_client/api/device_previews_controller_api.rb', line 886

def get_device_preview_runs_offset_paginated_with_http_info(email_id, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug 'Calling API: DevicePreviewsControllerApi.get_device_preview_runs_offset_paginated ...'
  end
  # verify the required parameter 'email_id' is set
  if @api_client.config.client_side_validation && email_id.nil?
    fail ArgumentError, "Missing the required parameter 'email_id' when calling DevicePreviewsControllerApi.get_device_preview_runs_offset_paginated"
  end
  if @api_client.config.client_side_validation && !opts[:'size'].nil? && opts[:'size'] > 100
    fail ArgumentError, 'invalid value for "opts[:"size"]" when calling DevicePreviewsControllerApi.get_device_preview_runs_offset_paginated, must be smaller than or equal to 100.'
  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 = '/emails/{emailId}/device-previews/offset-paginated'.sub('{' + 'emailId' + '}', CGI.escape(email_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] || 'PageDevicePreviewRunProjection' 

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

#get_device_preview_runs_with_http_info(email_id, opts = {}) ⇒ Array<(Array<DevicePreviewRunDto>, Integer, Hash)>

List previous device preview runs for an email

Parameters:

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

    the optional parameters

Options Hash (opts):

  • :limit (Integer)

Returns:

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

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



762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
# File 'lib/mailslurp_client/api/device_previews_controller_api.rb', line 762

def get_device_preview_runs_with_http_info(email_id, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug 'Calling API: DevicePreviewsControllerApi.get_device_preview_runs ...'
  end
  # verify the required parameter 'email_id' is set
  if @api_client.config.client_side_validation && email_id.nil?
    fail ArgumentError, "Missing the required parameter 'email_id' when calling DevicePreviewsControllerApi.get_device_preview_runs"
  end
  # resource path
  local_var_path = '/emails/{emailId}/device-previews'.sub('{' + 'emailId' + '}', CGI.escape(email_id.to_s))

  # query parameters
  query_params = opts[:query_params] || {}
  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<DevicePreviewRunDto>' 

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

#update_device_preview_feedback(feedback_id, update_device_preview_feedback_options, opts = {}) ⇒ DevicePreviewFeedbackDto

Update device preview feedback

Parameters:

Returns:



949
950
951
952
# File 'lib/mailslurp_client/api/device_previews_controller_api.rb', line 949

def update_device_preview_feedback(feedback_id, update_device_preview_feedback_options, opts = {})
  data, _status_code, _headers = update_device_preview_feedback_with_http_info(feedback_id, update_device_preview_feedback_options, opts)
  data
end

#update_device_preview_feedback_with_http_info(feedback_id, update_device_preview_feedback_options, opts = {}) ⇒ Array<(DevicePreviewFeedbackDto, Integer, Hash)>

Update device preview feedback

Parameters:

Returns:

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

    DevicePreviewFeedbackDto data, response status code and response headers



959
960
961
962
963
964
965
966
967
968
969
970
971
972
973
974
975
976
977
978
979
980
981
982
983
984
985
986
987
988
989
990
991
992
993
994
995
996
997
998
999
1000
1001
1002
1003
1004
1005
1006
1007
1008
1009
1010
# File 'lib/mailslurp_client/api/device_previews_controller_api.rb', line 959

def update_device_preview_feedback_with_http_info(feedback_id, update_device_preview_feedback_options, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug 'Calling API: DevicePreviewsControllerApi.update_device_preview_feedback ...'
  end
  # verify the required parameter 'feedback_id' is set
  if @api_client.config.client_side_validation && feedback_id.nil?
    fail ArgumentError, "Missing the required parameter 'feedback_id' when calling DevicePreviewsControllerApi.update_device_preview_feedback"
  end
  # verify the required parameter 'update_device_preview_feedback_options' is set
  if @api_client.config.client_side_validation && update_device_preview_feedback_options.nil?
    fail ArgumentError, "Missing the required parameter 'update_device_preview_feedback_options' when calling DevicePreviewsControllerApi.update_device_preview_feedback"
  end
  # resource path
  local_var_path = '/emails/device-previews/feedback/{feedbackId}'.sub('{' + 'feedbackId' + '}', CGI.escape(feedback_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_device_preview_feedback_options) 

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

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