Class: MailSlurpClient::ConnectorControllerApi

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

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(api_client = ApiClient.default) ⇒ ConnectorControllerApi

Returns a new instance of ConnectorControllerApi.



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

def api_client
  @api_client
end

Instance Method Details

#create_connector(create_connector_options, opts = {}) ⇒ ConnectorDto

Create an inbox connector Sync emails between external mailboxes and MailSlurp inboxes

Parameters:

Options Hash (opts):

  • :inbox_id (String)

    Optional inbox ID to associate with the connector

Returns:



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

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

#create_connector_imap_connection(id, create_connector_imap_connection_options, opts = {}) ⇒ ConnectorImapConnectionDto

Create an inbox connector IMAP connection Allows the reading of emails in an external mailbox and syncing to a MailSlurp inbox

Parameters:

Returns:



95
96
97
98
# File 'lib/mailslurp_client/api/connector_controller_api.rb', line 95

def create_connector_imap_connection(id, create_connector_imap_connection_options, opts = {})
  data, _status_code, _headers = create_connector_imap_connection_with_http_info(id, create_connector_imap_connection_options, opts)
  data
end

#create_connector_imap_connection_with_http_info(id, create_connector_imap_connection_options, opts = {}) ⇒ Array<(ConnectorImapConnectionDto, Integer, Hash)>

Create an inbox connector IMAP connection Allows the reading of emails in an external mailbox and syncing to a MailSlurp inbox

Parameters:

Returns:

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

    ConnectorImapConnectionDto data, response status code and response headers



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

def create_connector_imap_connection_with_http_info(id, create_connector_imap_connection_options, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug 'Calling API: ConnectorControllerApi.create_connector_imap_connection ...'
  end
  # verify the required parameter 'id' is set
  if @api_client.config.client_side_validation && id.nil?
    fail ArgumentError, "Missing the required parameter 'id' when calling ConnectorControllerApi.create_connector_imap_connection"
  end
  # verify the required parameter 'create_connector_imap_connection_options' is set
  if @api_client.config.client_side_validation && create_connector_imap_connection_options.nil?
    fail ArgumentError, "Missing the required parameter 'create_connector_imap_connection_options' when calling ConnectorControllerApi.create_connector_imap_connection"
  end
  # resource path
  local_var_path = '/connectors/{id}/imap'.sub('{' + 'id' + '}', CGI.escape(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_connector_imap_connection_options) 

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

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

#create_connector_smtp_connection(id, create_connector_smtp_connection_options, opts = {}) ⇒ ConnectorSmtpConnectionDto

Create an inbox connector SMTP connection Allows sending via connector and email is routed to connected inbox and sent via SMTP

Parameters:

Returns:



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

def create_connector_smtp_connection(id, create_connector_smtp_connection_options, opts = {})
  data, _status_code, _headers = create_connector_smtp_connection_with_http_info(id, create_connector_smtp_connection_options, opts)
  data
end

#create_connector_smtp_connection_with_http_info(id, create_connector_smtp_connection_options, opts = {}) ⇒ Array<(ConnectorSmtpConnectionDto, Integer, Hash)>

Create an inbox connector SMTP connection Allows sending via connector and email is routed to connected inbox and sent via SMTP

Parameters:

Returns:

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

    ConnectorSmtpConnectionDto data, response status code and response headers



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

def create_connector_smtp_connection_with_http_info(id, create_connector_smtp_connection_options, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug 'Calling API: ConnectorControllerApi.create_connector_smtp_connection ...'
  end
  # verify the required parameter 'id' is set
  if @api_client.config.client_side_validation && id.nil?
    fail ArgumentError, "Missing the required parameter 'id' when calling ConnectorControllerApi.create_connector_smtp_connection"
  end
  # verify the required parameter 'create_connector_smtp_connection_options' is set
  if @api_client.config.client_side_validation && create_connector_smtp_connection_options.nil?
    fail ArgumentError, "Missing the required parameter 'create_connector_smtp_connection_options' when calling ConnectorControllerApi.create_connector_smtp_connection"
  end
  # resource path
  local_var_path = '/connectors/{id}/smtp'.sub('{' + 'id' + '}', CGI.escape(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_connector_smtp_connection_options) 

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

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

#create_connector_sync_settings(id, create_connector_sync_settings_options, opts = {}) ⇒ ConnectorSyncSettingsDto

Create an inbox connector sync settings Configure automatic pull or emails from external inboxes using an interval or schedule

Parameters:

Returns:



235
236
237
238
# File 'lib/mailslurp_client/api/connector_controller_api.rb', line 235

def create_connector_sync_settings(id, create_connector_sync_settings_options, opts = {})
  data, _status_code, _headers = create_connector_sync_settings_with_http_info(id, create_connector_sync_settings_options, opts)
  data
end

#create_connector_sync_settings_with_http_info(id, create_connector_sync_settings_options, opts = {}) ⇒ Array<(ConnectorSyncSettingsDto, Integer, Hash)>

Create an inbox connector sync settings Configure automatic pull or emails from external inboxes using an interval or schedule

Parameters:

Returns:

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

    ConnectorSyncSettingsDto data, response status code and response headers



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

def create_connector_sync_settings_with_http_info(id, create_connector_sync_settings_options, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug 'Calling API: ConnectorControllerApi.create_connector_sync_settings ...'
  end
  # verify the required parameter 'id' is set
  if @api_client.config.client_side_validation && id.nil?
    fail ArgumentError, "Missing the required parameter 'id' when calling ConnectorControllerApi.create_connector_sync_settings"
  end
  # verify the required parameter 'create_connector_sync_settings_options' is set
  if @api_client.config.client_side_validation && create_connector_sync_settings_options.nil?
    fail ArgumentError, "Missing the required parameter 'create_connector_sync_settings_options' when calling ConnectorControllerApi.create_connector_sync_settings"
  end
  # resource path
  local_var_path = '/connectors/{id}/sync-settings'.sub('{' + 'id' + '}', CGI.escape(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_connector_sync_settings_options) 

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

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

#create_connector_with_http_info(create_connector_options, opts = {}) ⇒ Array<(ConnectorDto, Integer, Hash)>

Create an inbox connector Sync emails between external mailboxes and MailSlurp inboxes

Parameters:

Options Hash (opts):

  • :inbox_id (String)

    Optional inbox ID to associate with the connector

Returns:

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

    ConnectorDto data, response status code and response headers



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

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

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

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

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

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

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

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

#create_connector_with_options(create_connector_with_options, opts = {}) ⇒ ConnectorDto

Create an inbox connector with options Sync emails between external mailboxes and MailSlurp inboxes

Parameters:

Options Hash (opts):

  • :inbox_id (String)

    Optional inbox ID to associate with the connector

Returns:



305
306
307
308
# File 'lib/mailslurp_client/api/connector_controller_api.rb', line 305

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

#create_connector_with_options_with_http_info(create_connector_with_options, opts = {}) ⇒ Array<(ConnectorDto, Integer, Hash)>

Create an inbox connector with options Sync emails between external mailboxes and MailSlurp inboxes

Parameters:

Options Hash (opts):

  • :inbox_id (String)

    Optional inbox ID to associate with the connector

Returns:

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

    ConnectorDto data, response status code and response headers



316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
# File 'lib/mailslurp_client/api/connector_controller_api.rb', line 316

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

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

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

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

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

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

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

#delete_all_connector(opts = {}) ⇒ nil

Delete all inbox connectors

Parameters:

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

    the optional parameters

Returns:

  • (nil)


369
370
371
372
# File 'lib/mailslurp_client/api/connector_controller_api.rb', line 369

def delete_all_connector(opts = {})
  delete_all_connector_with_http_info(opts)
  nil
end

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

Delete all inbox connectors

Parameters:

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

    the optional parameters

Returns:

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

    nil, response status code and response headers



377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
# File 'lib/mailslurp_client/api/connector_controller_api.rb', line 377

def delete_all_connector_with_http_info(opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug 'Calling API: ConnectorControllerApi.delete_all_connector ...'
  end
  # resource path
  local_var_path = '/connectors'

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

#delete_connector(id, opts = {}) ⇒ nil

Delete an inbox connector

Parameters:

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

    the optional parameters

Returns:

  • (nil)


422
423
424
425
# File 'lib/mailslurp_client/api/connector_controller_api.rb', line 422

def delete_connector(id, opts = {})
  delete_connector_with_http_info(id, opts)
  nil
end

#delete_connector_imap_connection(id, opts = {}) ⇒ nil

Delete an inbox connector IMAP connection Delete IMAP connection for external inbox

Parameters:

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

    the optional parameters

Returns:

  • (nil)


481
482
483
484
# File 'lib/mailslurp_client/api/connector_controller_api.rb', line 481

def delete_connector_imap_connection(id, opts = {})
  delete_connector_imap_connection_with_http_info(id, opts)
  nil
end

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

Delete an inbox connector IMAP connection Delete IMAP connection for external inbox

Parameters:

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

    the optional parameters

Returns:

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

    nil, response status code and response headers



491
492
493
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
# File 'lib/mailslurp_client/api/connector_controller_api.rb', line 491

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

#delete_connector_smtp_connection(id, opts = {}) ⇒ nil

Delete an inbox connector SMTP connection Delete SMTP connection for external inbox

Parameters:

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

    the optional parameters

Returns:

  • (nil)


541
542
543
544
# File 'lib/mailslurp_client/api/connector_controller_api.rb', line 541

def delete_connector_smtp_connection(id, opts = {})
  delete_connector_smtp_connection_with_http_info(id, opts)
  nil
end

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

Delete an inbox connector SMTP connection Delete SMTP connection for external inbox

Parameters:

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

    the optional parameters

Returns:

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

    nil, response status code and response headers



551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
# File 'lib/mailslurp_client/api/connector_controller_api.rb', line 551

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

#delete_connector_sync_settings(id, opts = {}) ⇒ nil

Create an inbox connector sync settings Configure automatic pull or emails from external inboxes using an interval or schedule

Parameters:

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

    the optional parameters

Returns:

  • (nil)


601
602
603
604
# File 'lib/mailslurp_client/api/connector_controller_api.rb', line 601

def delete_connector_sync_settings(id, opts = {})
  delete_connector_sync_settings_with_http_info(id, opts)
  nil
end

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

Create an inbox connector sync settings Configure automatic pull or emails from external inboxes using an interval or schedule

Parameters:

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

    the optional parameters

Returns:

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

    nil, response status code and response headers



611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
# File 'lib/mailslurp_client/api/connector_controller_api.rb', line 611

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

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

Delete an inbox connector

Parameters:

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

    the optional parameters

Returns:

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

    nil, response status code and response headers



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

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

#get_all_connector_events(opts = {}) ⇒ PageConnectorEvents

Get all inbox connector events

Parameters:

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

    the optional parameters

Options Hash (opts):

  • :id (String)

    Optional connector ID

  • :page (Integer)

    Optional page index in connector list pagination (default to 0)

  • :size (Integer)

    Optional page size in connector list pagination (default to 20)

  • :sort (String)

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

  • :since (DateTime)

    Filter by created at after the given timestamp

  • :before (DateTime)

    Filter by created at before the given timestamp

  • :event_type (String)

    Filter by event type

Returns:



666
667
668
669
# File 'lib/mailslurp_client/api/connector_controller_api.rb', line 666

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

#get_all_connector_events_with_http_info(opts = {}) ⇒ Array<(PageConnectorEvents, Integer, Hash)>

Get all inbox connector events

Parameters:

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

    the optional parameters

Options Hash (opts):

  • :id (String)

    Optional connector ID

  • :page (Integer)

    Optional page index in connector list pagination

  • :size (Integer)

    Optional page size in connector list pagination

  • :sort (String)

    Optional createdAt sort direction ASC or DESC

  • :since (DateTime)

    Filter by created at after the given timestamp

  • :before (DateTime)

    Filter by created at before the given timestamp

  • :event_type (String)

    Filter by event type

Returns:

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

    PageConnectorEvents data, response status code and response headers



681
682
683
684
685
686
687
688
689
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
733
734
735
736
737
# File 'lib/mailslurp_client/api/connector_controller_api.rb', line 681

def get_all_connector_events_with_http_info(opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug 'Calling API: ConnectorControllerApi.get_all_connector_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
  allowable_values = ["SEND", "SYNC"]
  if @api_client.config.client_side_validation && opts[:'event_type'] && !allowable_values.include?(opts[:'event_type'])
    fail ArgumentError, "invalid value for \"event_type\", must be one of #{allowable_values}"
  end
  # resource path
  local_var_path = '/connectors/events'

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

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

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

#get_connector(id, opts = {}) ⇒ ConnectorDto

Get an inbox connector

Parameters:

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

    the optional parameters

Returns:



743
744
745
746
# File 'lib/mailslurp_client/api/connector_controller_api.rb', line 743

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

#get_connector_by_email_address(email_address, opts = {}) ⇒ OptionalConnectorDto

Get connector by email address Find an inbox connector by email address

Parameters:

  • email_address (String)

    Email address to search for connector by

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

    the optional parameters

Returns:



804
805
806
807
# File 'lib/mailslurp_client/api/connector_controller_api.rb', line 804

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

#get_connector_by_email_address_with_http_info(email_address, opts = {}) ⇒ Array<(OptionalConnectorDto, Integer, Hash)>

Get connector by email address Find an inbox connector by email address

Parameters:

  • email_address (String)

    Email address to search for connector by

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

    the optional parameters

Returns:

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

    OptionalConnectorDto data, response status code and response headers



814
815
816
817
818
819
820
821
822
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
# File 'lib/mailslurp_client/api/connector_controller_api.rb', line 814

def get_connector_by_email_address_with_http_info(email_address, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug 'Calling API: ConnectorControllerApi.get_connector_by_email_address ...'
  end
  # verify the required parameter 'email_address' is set
  if @api_client.config.client_side_validation && email_address.nil?
    fail ArgumentError, "Missing the required parameter 'email_address' when calling ConnectorControllerApi.get_connector_by_email_address"
  end
  # resource path
  local_var_path = '/connectors/by-email-address'

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

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

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

#get_connector_by_inbox_id(inbox_id, opts = {}) ⇒ OptionalConnectorDto

Get connector by inbox ID Find an inbox connector by inbox ID

Parameters:

  • inbox_id (String)

    Inbox ID to search for connector by

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

    the optional parameters

Returns:



867
868
869
870
# File 'lib/mailslurp_client/api/connector_controller_api.rb', line 867

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

#get_connector_by_inbox_id_with_http_info(inbox_id, opts = {}) ⇒ Array<(OptionalConnectorDto, Integer, Hash)>

Get connector by inbox ID Find an inbox connector by inbox ID

Parameters:

  • inbox_id (String)

    Inbox ID to search for connector by

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

    the optional parameters

Returns:

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

    OptionalConnectorDto data, response status code and response headers



877
878
879
880
881
882
883
884
885
886
887
888
889
890
891
892
893
894
895
896
897
898
899
900
901
902
903
904
905
906
907
908
909
910
911
912
913
914
915
916
917
918
919
920
921
922
923
# File 'lib/mailslurp_client/api/connector_controller_api.rb', line 877

def get_connector_by_inbox_id_with_http_info(inbox_id, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug 'Calling API: ConnectorControllerApi.get_connector_by_inbox_id ...'
  end
  # verify the required parameter 'inbox_id' is set
  if @api_client.config.client_side_validation && inbox_id.nil?
    fail ArgumentError, "Missing the required parameter 'inbox_id' when calling ConnectorControllerApi.get_connector_by_inbox_id"
  end
  # resource path
  local_var_path = '/connectors/by-inbox-id'

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

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

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

#get_connector_by_name(name, opts = {}) ⇒ OptionalConnectorDto

Get connector by name Find an inbox connector by name

Parameters:

  • name (String)

    Name to search for connector by

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

    the optional parameters

Returns:



930
931
932
933
# File 'lib/mailslurp_client/api/connector_controller_api.rb', line 930

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

#get_connector_by_name_with_http_info(name, opts = {}) ⇒ Array<(OptionalConnectorDto, Integer, Hash)>

Get connector by name Find an inbox connector by name

Parameters:

  • name (String)

    Name to search for connector by

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

    the optional parameters

Returns:

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

    OptionalConnectorDto data, response status code and response headers



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
979
980
981
982
983
984
985
986
# File 'lib/mailslurp_client/api/connector_controller_api.rb', line 940

def get_connector_by_name_with_http_info(name, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug 'Calling API: ConnectorControllerApi.get_connector_by_name ...'
  end
  # verify the required parameter 'name' is set
  if @api_client.config.client_side_validation && name.nil?
    fail ArgumentError, "Missing the required parameter 'name' when calling ConnectorControllerApi.get_connector_by_name"
  end
  # resource path
  local_var_path = '/connectors/by-name'

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

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

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

#get_connector_event(id, opts = {}) ⇒ ConnectorEventDto

Get an inbox connector event

Parameters:

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

    the optional parameters

Returns:



992
993
994
995
# File 'lib/mailslurp_client/api/connector_controller_api.rb', line 992

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

#get_connector_event_with_http_info(id, opts = {}) ⇒ Array<(ConnectorEventDto, Integer, Hash)>

Get an inbox connector event

Parameters:

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

    the optional parameters

Returns:

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

    ConnectorEventDto data, response status code and response headers



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
1041
1042
1043
1044
1045
1046
# File 'lib/mailslurp_client/api/connector_controller_api.rb', line 1001

def get_connector_event_with_http_info(id, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug 'Calling API: ConnectorControllerApi.get_connector_event ...'
  end
  # verify the required parameter 'id' is set
  if @api_client.config.client_side_validation && id.nil?
    fail ArgumentError, "Missing the required parameter 'id' when calling ConnectorControllerApi.get_connector_event"
  end
  # resource path
  local_var_path = '/connectors/events/{id}'.sub('{' + 'id' + '}', CGI.escape(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] || 'ConnectorEventDto' 

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

#get_connector_events(id, opts = {}) ⇒ PageConnectorEvents

Get an inbox connector events

Parameters:

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

    the optional parameters

Options Hash (opts):

  • :page (Integer)

    Optional page index in connector list pagination (default to 0)

  • :size (Integer)

    Optional page size in connector list pagination (default to 20)

  • :sort (String)

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

  • :since (DateTime)

    Filter by created at after the given timestamp

  • :before (DateTime)

    Filter by created at before the given timestamp

  • :event_type (String)

    Filter by event type

Returns:



1058
1059
1060
1061
# File 'lib/mailslurp_client/api/connector_controller_api.rb', line 1058

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

#get_connector_events_with_http_info(id, opts = {}) ⇒ Array<(PageConnectorEvents, Integer, Hash)>

Get an inbox connector events

Parameters:

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

    the optional parameters

Options Hash (opts):

  • :page (Integer)

    Optional page index in connector list pagination

  • :size (Integer)

    Optional page size in connector list pagination

  • :sort (String)

    Optional createdAt sort direction ASC or DESC

  • :since (DateTime)

    Filter by created at after the given timestamp

  • :before (DateTime)

    Filter by created at before the given timestamp

  • :event_type (String)

    Filter by event type

Returns:

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

    PageConnectorEvents data, response status code and response headers



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
1109
1110
1111
1112
1113
1114
1115
1116
1117
1118
1119
1120
1121
1122
1123
1124
1125
1126
1127
1128
1129
1130
1131
1132
# File 'lib/mailslurp_client/api/connector_controller_api.rb', line 1073

def get_connector_events_with_http_info(id, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug 'Calling API: ConnectorControllerApi.get_connector_events ...'
  end
  # verify the required parameter 'id' is set
  if @api_client.config.client_side_validation && id.nil?
    fail ArgumentError, "Missing the required parameter 'id' when calling ConnectorControllerApi.get_connector_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
  allowable_values = ["SEND", "SYNC"]
  if @api_client.config.client_side_validation && opts[:'event_type'] && !allowable_values.include?(opts[:'event_type'])
    fail ArgumentError, "invalid value for \"event_type\", must be one of #{allowable_values}"
  end
  # resource path
  local_var_path = '/connectors/{id}/events'.sub('{' + 'id' + '}', CGI.escape(id.to_s))

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

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

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

#get_connector_imap_connection(id, opts = {}) ⇒ OptionalConnectorImapConnectionDto

Get an inbox connector IMAP connection Get IMAP connection for external inbox

Parameters:

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

    the optional parameters

Returns:



1139
1140
1141
1142
# File 'lib/mailslurp_client/api/connector_controller_api.rb', line 1139

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

#get_connector_imap_connection_with_http_info(id, opts = {}) ⇒ Array<(OptionalConnectorImapConnectionDto, Integer, Hash)>

Get an inbox connector IMAP connection Get IMAP connection for external inbox

Parameters:

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

    the optional parameters

Returns:



1149
1150
1151
1152
1153
1154
1155
1156
1157
1158
1159
1160
1161
1162
1163
1164
1165
1166
1167
1168
1169
1170
1171
1172
1173
1174
1175
1176
1177
1178
1179
1180
1181
1182
1183
1184
1185
1186
1187
1188
1189
1190
1191
1192
1193
1194
# File 'lib/mailslurp_client/api/connector_controller_api.rb', line 1149

def get_connector_imap_connection_with_http_info(id, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug 'Calling API: ConnectorControllerApi.get_connector_imap_connection ...'
  end
  # verify the required parameter 'id' is set
  if @api_client.config.client_side_validation && id.nil?
    fail ArgumentError, "Missing the required parameter 'id' when calling ConnectorControllerApi.get_connector_imap_connection"
  end
  # resource path
  local_var_path = '/connectors/{id}/imap'.sub('{' + 'id' + '}', CGI.escape(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] || 'OptionalConnectorImapConnectionDto' 

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

#get_connector_provider_settings(opts = {}) ⇒ ConnectorProviderSettingsDto

Get SMTP and IMAP connection settings for common mail providers Get common mail provider SMTP and IMAP connection settings

Parameters:

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

    the optional parameters

Returns:



1200
1201
1202
1203
# File 'lib/mailslurp_client/api/connector_controller_api.rb', line 1200

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

#get_connector_provider_settings_with_http_info(opts = {}) ⇒ Array<(ConnectorProviderSettingsDto, Integer, Hash)>

Get SMTP and IMAP connection settings for common mail providers Get common mail provider SMTP and IMAP connection settings

Parameters:

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

    the optional parameters

Returns:



1209
1210
1211
1212
1213
1214
1215
1216
1217
1218
1219
1220
1221
1222
1223
1224
1225
1226
1227
1228
1229
1230
1231
1232
1233
1234
1235
1236
1237
1238
1239
1240
1241
1242
1243
1244
1245
1246
1247
1248
1249
1250
# File 'lib/mailslurp_client/api/connector_controller_api.rb', line 1209

def get_connector_provider_settings_with_http_info(opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug 'Calling API: ConnectorControllerApi.get_connector_provider_settings ...'
  end
  # resource path
  local_var_path = '/connectors/provider-settings'

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

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

#get_connector_smtp_connection(id, opts = {}) ⇒ OptionalConnectorSmtpConnectionDto

Get an inbox connector SMTP connection Get SMTP connection for external inbox

Parameters:

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

    the optional parameters

Returns:



1257
1258
1259
1260
# File 'lib/mailslurp_client/api/connector_controller_api.rb', line 1257

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

#get_connector_smtp_connection_with_http_info(id, opts = {}) ⇒ Array<(OptionalConnectorSmtpConnectionDto, Integer, Hash)>

Get an inbox connector SMTP connection Get SMTP connection for external inbox

Parameters:

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

    the optional parameters

Returns:



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

def get_connector_smtp_connection_with_http_info(id, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug 'Calling API: ConnectorControllerApi.get_connector_smtp_connection ...'
  end
  # verify the required parameter 'id' is set
  if @api_client.config.client_side_validation && id.nil?
    fail ArgumentError, "Missing the required parameter 'id' when calling ConnectorControllerApi.get_connector_smtp_connection"
  end
  # resource path
  local_var_path = '/connectors/{id}/smtp'.sub('{' + 'id' + '}', CGI.escape(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] || 'OptionalConnectorSmtpConnectionDto' 

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

#get_connector_sync_settings(id, opts = {}) ⇒ OptionalConnectorSyncSettingsDto

Get an inbox connector sync settings Get sync settings for connection with external inbox

Parameters:

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

    the optional parameters

Returns:



1319
1320
1321
1322
# File 'lib/mailslurp_client/api/connector_controller_api.rb', line 1319

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

#get_connector_sync_settings_with_http_info(id, opts = {}) ⇒ Array<(OptionalConnectorSyncSettingsDto, Integer, Hash)>

Get an inbox connector sync settings Get sync settings for connection with external inbox

Parameters:

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

    the optional parameters

Returns:



1329
1330
1331
1332
1333
1334
1335
1336
1337
1338
1339
1340
1341
1342
1343
1344
1345
1346
1347
1348
1349
1350
1351
1352
1353
1354
1355
1356
1357
1358
1359
1360
1361
1362
1363
1364
1365
1366
1367
1368
1369
1370
1371
1372
1373
1374
# File 'lib/mailslurp_client/api/connector_controller_api.rb', line 1329

def get_connector_sync_settings_with_http_info(id, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug 'Calling API: ConnectorControllerApi.get_connector_sync_settings ...'
  end
  # verify the required parameter 'id' is set
  if @api_client.config.client_side_validation && id.nil?
    fail ArgumentError, "Missing the required parameter 'id' when calling ConnectorControllerApi.get_connector_sync_settings"
  end
  # resource path
  local_var_path = '/connectors/{id}/sync-settings'.sub('{' + 'id' + '}', CGI.escape(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] || 'OptionalConnectorSyncSettingsDto' 

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

#get_connector_with_http_info(id, opts = {}) ⇒ Array<(ConnectorDto, Integer, Hash)>

Get an inbox connector

Parameters:

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

    the optional parameters

Returns:

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

    ConnectorDto data, response status code and response headers



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

def get_connector_with_http_info(id, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug 'Calling API: ConnectorControllerApi.get_connector ...'
  end
  # verify the required parameter 'id' is set
  if @api_client.config.client_side_validation && id.nil?
    fail ArgumentError, "Missing the required parameter 'id' when calling ConnectorControllerApi.get_connector"
  end
  # resource path
  local_var_path = '/connectors/{id}'.sub('{' + 'id' + '}', CGI.escape(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] || 'ConnectorDto' 

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

#get_connectors(opts = {}) ⇒ PageConnector

Get inbox connectors List inbox connectors that sync external emails to MailSlurp inboxes

Parameters:

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

    the optional parameters

Options Hash (opts):

  • :page (Integer)

    Optional page index in connector list pagination (default to 0)

  • :size (Integer)

    Optional page size in connector list pagination (default to 20)

  • :sort (String)

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

  • :since (DateTime)

    Filter by created at after the given timestamp

  • :before (DateTime)

    Filter by created at before the given timestamp

Returns:



1385
1386
1387
1388
# File 'lib/mailslurp_client/api/connector_controller_api.rb', line 1385

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

#get_connectors_with_http_info(opts = {}) ⇒ Array<(PageConnector, Integer, Hash)>

Get inbox connectors List inbox connectors that sync external emails to MailSlurp inboxes

Parameters:

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

    the optional parameters

Options Hash (opts):

  • :page (Integer)

    Optional page index in connector list pagination

  • :size (Integer)

    Optional page size in connector list pagination

  • :sort (String)

    Optional createdAt sort direction ASC or DESC

  • :since (DateTime)

    Filter by created at after the given timestamp

  • :before (DateTime)

    Filter by created at before the given timestamp

Returns:

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

    PageConnector data, response status code and response headers



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
1425
1426
1427
1428
1429
1430
1431
1432
1433
1434
1435
1436
1437
1438
1439
1440
1441
1442
1443
1444
1445
1446
1447
1448
1449
# File 'lib/mailslurp_client/api/connector_controller_api.rb', line 1399

def get_connectors_with_http_info(opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug 'Calling API: ConnectorControllerApi.get_connectors ...'
  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 = '/connectors'

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

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

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

#send_email_from_connector(id, send_email_options, opts = {}) ⇒ SentEmailDto

Send from an inbox connector

Parameters:

  • id (String)
  • send_email_options (SendEmailOptions)
  • opts (Hash) (defaults to: {})

    the optional parameters

Options Hash (opts):

  • :use_fallback (Boolean)

Returns:



1457
1458
1459
1460
# File 'lib/mailslurp_client/api/connector_controller_api.rb', line 1457

def send_email_from_connector(id, send_email_options, opts = {})
  data, _status_code, _headers = send_email_from_connector_with_http_info(id, send_email_options, opts)
  data
end

#send_email_from_connector_with_http_info(id, send_email_options, opts = {}) ⇒ Array<(SentEmailDto, Integer, Hash)>

Send from an inbox connector

Parameters:

  • id (String)
  • send_email_options (SendEmailOptions)
  • opts (Hash) (defaults to: {})

    the optional parameters

Options Hash (opts):

  • :use_fallback (Boolean)

Returns:

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

    SentEmailDto data, response status code and response headers



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
1495
1496
1497
1498
1499
1500
1501
1502
1503
1504
1505
1506
1507
1508
1509
1510
1511
1512
1513
1514
1515
1516
1517
1518
1519
1520
# File 'lib/mailslurp_client/api/connector_controller_api.rb', line 1468

def send_email_from_connector_with_http_info(id, send_email_options, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug 'Calling API: ConnectorControllerApi.send_email_from_connector ...'
  end
  # verify the required parameter 'id' is set
  if @api_client.config.client_side_validation && id.nil?
    fail ArgumentError, "Missing the required parameter 'id' when calling ConnectorControllerApi.send_email_from_connector"
  end
  # verify the required parameter 'send_email_options' is set
  if @api_client.config.client_side_validation && send_email_options.nil?
    fail ArgumentError, "Missing the required parameter 'send_email_options' when calling ConnectorControllerApi.send_email_from_connector"
  end
  # resource path
  local_var_path = '/connectors/{id}/send'.sub('{' + 'id' + '}', CGI.escape(id.to_s))

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

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

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

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

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

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

#sync_connector(id, opts = {}) ⇒ ConnectorSyncRequestResult

Sync an inbox connector

Parameters:

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

    the optional parameters

Options Hash (opts):

  • :since (DateTime)

    Date to request emails since

  • :folder (String)

    Which folder to sync emails with

  • :logging (Boolean)

    Enable or disable logging for the sync operation

Returns:



1529
1530
1531
1532
# File 'lib/mailslurp_client/api/connector_controller_api.rb', line 1529

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

#sync_connector_with_http_info(id, opts = {}) ⇒ Array<(ConnectorSyncRequestResult, Integer, Hash)>

Sync an inbox connector

Parameters:

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

    the optional parameters

Options Hash (opts):

  • :since (DateTime)

    Date to request emails since

  • :folder (String)

    Which folder to sync emails with

  • :logging (Boolean)

    Enable or disable logging for the sync operation

Returns:

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

    ConnectorSyncRequestResult data, response status code and response headers



1541
1542
1543
1544
1545
1546
1547
1548
1549
1550
1551
1552
1553
1554
1555
1556
1557
1558
1559
1560
1561
1562
1563
1564
1565
1566
1567
1568
1569
1570
1571
1572
1573
1574
1575
1576
1577
1578
1579
1580
1581
1582
1583
1584
1585
1586
1587
1588
1589
# File 'lib/mailslurp_client/api/connector_controller_api.rb', line 1541

def sync_connector_with_http_info(id, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug 'Calling API: ConnectorControllerApi.sync_connector ...'
  end
  # verify the required parameter 'id' is set
  if @api_client.config.client_side_validation && id.nil?
    fail ArgumentError, "Missing the required parameter 'id' when calling ConnectorControllerApi.sync_connector"
  end
  # resource path
  local_var_path = '/connectors/{id}/sync'.sub('{' + 'id' + '}', CGI.escape(id.to_s))

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

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

#test_connector_imap_connection(id, opts = {}) ⇒ ConnectorImapConnectionTestResult

Test an inbox connector IMAP connection Test the IMAP connection for a connector

Parameters:

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

    the optional parameters

Options Hash (opts):

Returns:



1597
1598
1599
1600
# File 'lib/mailslurp_client/api/connector_controller_api.rb', line 1597

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

#test_connector_imap_connection_options(create_connector_imap_connection_options, opts = {}) ⇒ ConnectorImapConnectionTestResult

Test an inbox connector IMAP connection options Test the IMAP connection options for a connector

Parameters:

Returns:



1662
1663
1664
1665
# File 'lib/mailslurp_client/api/connector_controller_api.rb', line 1662

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

#test_connector_imap_connection_options_with_http_info(create_connector_imap_connection_options, opts = {}) ⇒ Array<(ConnectorImapConnectionTestResult, Integer, Hash)>

Test an inbox connector IMAP connection options Test the IMAP connection options for a connector

Parameters:

Returns:



1672
1673
1674
1675
1676
1677
1678
1679
1680
1681
1682
1683
1684
1685
1686
1687
1688
1689
1690
1691
1692
1693
1694
1695
1696
1697
1698
1699
1700
1701
1702
1703
1704
1705
1706
1707
1708
1709
1710
1711
1712
1713
1714
1715
1716
1717
1718
1719
# File 'lib/mailslurp_client/api/connector_controller_api.rb', line 1672

def test_connector_imap_connection_options_with_http_info(create_connector_imap_connection_options, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug 'Calling API: ConnectorControllerApi.test_connector_imap_connection_options ...'
  end
  # verify the required parameter 'create_connector_imap_connection_options' is set
  if @api_client.config.client_side_validation && create_connector_imap_connection_options.nil?
    fail ArgumentError, "Missing the required parameter 'create_connector_imap_connection_options' when calling ConnectorControllerApi.test_connector_imap_connection_options"
  end
  # resource path
  local_var_path = '/connectors/connections/imap/test'

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

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

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

#test_connector_imap_connection_with_http_info(id, opts = {}) ⇒ Array<(ConnectorImapConnectionTestResult, Integer, Hash)>

Test an inbox connector IMAP connection Test the IMAP connection for a connector

Parameters:

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

    the optional parameters

Options Hash (opts):

Returns:



1608
1609
1610
1611
1612
1613
1614
1615
1616
1617
1618
1619
1620
1621
1622
1623
1624
1625
1626
1627
1628
1629
1630
1631
1632
1633
1634
1635
1636
1637
1638
1639
1640
1641
1642
1643
1644
1645
1646
1647
1648
1649
1650
1651
1652
1653
1654
1655
# File 'lib/mailslurp_client/api/connector_controller_api.rb', line 1608

def test_connector_imap_connection_with_http_info(id, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug 'Calling API: ConnectorControllerApi.test_connector_imap_connection ...'
  end
  # verify the required parameter 'id' is set
  if @api_client.config.client_side_validation && id.nil?
    fail ArgumentError, "Missing the required parameter 'id' when calling ConnectorControllerApi.test_connector_imap_connection"
  end
  # resource path
  local_var_path = '/connectors/{id}/imap/test'.sub('{' + 'id' + '}', CGI.escape(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_connector_imap_connection_options']) 

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

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

#test_connector_smtp_connection(id, opts = {}) ⇒ ConnectorSmtpConnectionTestResult

Test an inbox connector SMTP connection Test the SMTP connection for a connector

Parameters:

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

    the optional parameters

Options Hash (opts):

Returns:



1727
1728
1729
1730
# File 'lib/mailslurp_client/api/connector_controller_api.rb', line 1727

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

#test_connector_smtp_connection_options(create_connector_smtp_connection_options, opts = {}) ⇒ ConnectorSmtpConnectionTestResult

Test an inbox connector SMTP connection options Test the SMTP connection options for a connector

Parameters:

Returns:



1792
1793
1794
1795
# File 'lib/mailslurp_client/api/connector_controller_api.rb', line 1792

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

#test_connector_smtp_connection_options_with_http_info(create_connector_smtp_connection_options, opts = {}) ⇒ Array<(ConnectorSmtpConnectionTestResult, Integer, Hash)>

Test an inbox connector SMTP connection options Test the SMTP connection options for a connector

Parameters:

Returns:



1802
1803
1804
1805
1806
1807
1808
1809
1810
1811
1812
1813
1814
1815
1816
1817
1818
1819
1820
1821
1822
1823
1824
1825
1826
1827
1828
1829
1830
1831
1832
1833
1834
1835
1836
1837
1838
1839
1840
1841
1842
1843
1844
1845
1846
1847
1848
1849
# File 'lib/mailslurp_client/api/connector_controller_api.rb', line 1802

def test_connector_smtp_connection_options_with_http_info(create_connector_smtp_connection_options, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug 'Calling API: ConnectorControllerApi.test_connector_smtp_connection_options ...'
  end
  # verify the required parameter 'create_connector_smtp_connection_options' is set
  if @api_client.config.client_side_validation && create_connector_smtp_connection_options.nil?
    fail ArgumentError, "Missing the required parameter 'create_connector_smtp_connection_options' when calling ConnectorControllerApi.test_connector_smtp_connection_options"
  end
  # resource path
  local_var_path = '/connectors/connections/smtp/test'

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

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

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

#test_connector_smtp_connection_with_http_info(id, opts = {}) ⇒ Array<(ConnectorSmtpConnectionTestResult, Integer, Hash)>

Test an inbox connector SMTP connection Test the SMTP connection for a connector

Parameters:

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

    the optional parameters

Options Hash (opts):

Returns:



1738
1739
1740
1741
1742
1743
1744
1745
1746
1747
1748
1749
1750
1751
1752
1753
1754
1755
1756
1757
1758
1759
1760
1761
1762
1763
1764
1765
1766
1767
1768
1769
1770
1771
1772
1773
1774
1775
1776
1777
1778
1779
1780
1781
1782
1783
1784
1785
# File 'lib/mailslurp_client/api/connector_controller_api.rb', line 1738

def test_connector_smtp_connection_with_http_info(id, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug 'Calling API: ConnectorControllerApi.test_connector_smtp_connection ...'
  end
  # verify the required parameter 'id' is set
  if @api_client.config.client_side_validation && id.nil?
    fail ArgumentError, "Missing the required parameter 'id' when calling ConnectorControllerApi.test_connector_smtp_connection"
  end
  # resource path
  local_var_path = '/connectors/{id}/smtp/test'.sub('{' + 'id' + '}', CGI.escape(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_connector_smtp_connection_options']) 

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

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

#update_connector(id, create_connector_options, opts = {}) ⇒ ConnectorDto

Update an inbox connector

Parameters:

  • id (String)
  • create_connector_options (CreateConnectorOptions)
  • opts (Hash) (defaults to: {})

    the optional parameters

Returns:



1856
1857
1858
1859
# File 'lib/mailslurp_client/api/connector_controller_api.rb', line 1856

def update_connector(id, create_connector_options, opts = {})
  data, _status_code, _headers = update_connector_with_http_info(id, create_connector_options, opts)
  data
end

#update_connector_imap_connection(id, create_connector_imap_connection_options, opts = {}) ⇒ ConnectorImapConnectionDto

Update an inbox connector IMAP connection Update IMAP connection for external inbox

Parameters:

Returns:



1925
1926
1927
1928
# File 'lib/mailslurp_client/api/connector_controller_api.rb', line 1925

def update_connector_imap_connection(id, create_connector_imap_connection_options, opts = {})
  data, _status_code, _headers = update_connector_imap_connection_with_http_info(id, create_connector_imap_connection_options, opts)
  data
end

#update_connector_imap_connection_with_http_info(id, create_connector_imap_connection_options, opts = {}) ⇒ Array<(ConnectorImapConnectionDto, Integer, Hash)>

Update an inbox connector IMAP connection Update IMAP connection for external inbox

Parameters:

Returns:

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

    ConnectorImapConnectionDto data, response status code and response headers



1936
1937
1938
1939
1940
1941
1942
1943
1944
1945
1946
1947
1948
1949
1950
1951
1952
1953
1954
1955
1956
1957
1958
1959
1960
1961
1962
1963
1964
1965
1966
1967
1968
1969
1970
1971
1972
1973
1974
1975
1976
1977
1978
1979
1980
1981
1982
1983
1984
1985
1986
1987
# File 'lib/mailslurp_client/api/connector_controller_api.rb', line 1936

def update_connector_imap_connection_with_http_info(id, create_connector_imap_connection_options, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug 'Calling API: ConnectorControllerApi.update_connector_imap_connection ...'
  end
  # verify the required parameter 'id' is set
  if @api_client.config.client_side_validation && id.nil?
    fail ArgumentError, "Missing the required parameter 'id' when calling ConnectorControllerApi.update_connector_imap_connection"
  end
  # verify the required parameter 'create_connector_imap_connection_options' is set
  if @api_client.config.client_side_validation && create_connector_imap_connection_options.nil?
    fail ArgumentError, "Missing the required parameter 'create_connector_imap_connection_options' when calling ConnectorControllerApi.update_connector_imap_connection"
  end
  # resource path
  local_var_path = '/connectors/{id}/imap'.sub('{' + 'id' + '}', CGI.escape(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_connector_imap_connection_options) 

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

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

#update_connector_smtp_connection(id, create_connector_smtp_connection_options, opts = {}) ⇒ ConnectorSmtpConnectionDto

Update an inbox connector SMTP connection Update SMTP connection for external inbox

Parameters:

Returns:



1995
1996
1997
1998
# File 'lib/mailslurp_client/api/connector_controller_api.rb', line 1995

def update_connector_smtp_connection(id, create_connector_smtp_connection_options, opts = {})
  data, _status_code, _headers = update_connector_smtp_connection_with_http_info(id, create_connector_smtp_connection_options, opts)
  data
end

#update_connector_smtp_connection_with_http_info(id, create_connector_smtp_connection_options, opts = {}) ⇒ Array<(ConnectorSmtpConnectionDto, Integer, Hash)>

Update an inbox connector SMTP connection Update SMTP connection for external inbox

Parameters:

Returns:

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

    ConnectorSmtpConnectionDto data, response status code and response headers



2006
2007
2008
2009
2010
2011
2012
2013
2014
2015
2016
2017
2018
2019
2020
2021
2022
2023
2024
2025
2026
2027
2028
2029
2030
2031
2032
2033
2034
2035
2036
2037
2038
2039
2040
2041
2042
2043
2044
2045
2046
2047
2048
2049
2050
2051
2052
2053
2054
2055
2056
2057
# File 'lib/mailslurp_client/api/connector_controller_api.rb', line 2006

def update_connector_smtp_connection_with_http_info(id, create_connector_smtp_connection_options, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug 'Calling API: ConnectorControllerApi.update_connector_smtp_connection ...'
  end
  # verify the required parameter 'id' is set
  if @api_client.config.client_side_validation && id.nil?
    fail ArgumentError, "Missing the required parameter 'id' when calling ConnectorControllerApi.update_connector_smtp_connection"
  end
  # verify the required parameter 'create_connector_smtp_connection_options' is set
  if @api_client.config.client_side_validation && create_connector_smtp_connection_options.nil?
    fail ArgumentError, "Missing the required parameter 'create_connector_smtp_connection_options' when calling ConnectorControllerApi.update_connector_smtp_connection"
  end
  # resource path
  local_var_path = '/connectors/{id}/smtp'.sub('{' + 'id' + '}', CGI.escape(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_connector_smtp_connection_options) 

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

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

#update_connector_with_http_info(id, create_connector_options, opts = {}) ⇒ Array<(ConnectorDto, Integer, Hash)>

Update an inbox connector

Parameters:

  • id (String)
  • create_connector_options (CreateConnectorOptions)
  • opts (Hash) (defaults to: {})

    the optional parameters

Returns:

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

    ConnectorDto data, response status code and response headers



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

def update_connector_with_http_info(id, create_connector_options, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug 'Calling API: ConnectorControllerApi.update_connector ...'
  end
  # verify the required parameter 'id' is set
  if @api_client.config.client_side_validation && id.nil?
    fail ArgumentError, "Missing the required parameter 'id' when calling ConnectorControllerApi.update_connector"
  end
  # verify the required parameter 'create_connector_options' is set
  if @api_client.config.client_side_validation && create_connector_options.nil?
    fail ArgumentError, "Missing the required parameter 'create_connector_options' when calling ConnectorControllerApi.update_connector"
  end
  # resource path
  local_var_path = '/connectors/{id}'.sub('{' + 'id' + '}', CGI.escape(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_connector_options) 

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

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