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:

Returns:



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

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:



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

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



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

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:



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

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



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

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_with_http_info(create_connector_options, opts = {}) ⇒ Array<(ConnectorDto, Integer, Hash)>

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

Parameters:

Returns:

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

    ConnectorDto data, response status code and response headers



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

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] || {}

  # 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

#delete_all_connector(opts = {}) ⇒ nil

Delete all inbox connectors

Parameters:

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

    the optional parameters

Returns:

  • (nil)


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

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



237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
# File 'lib/mailslurp_client/api/connector_controller_api.rb', line 237

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)


282
283
284
285
# File 'lib/mailslurp_client/api/connector_controller_api.rb', line 282

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)


341
342
343
344
# File 'lib/mailslurp_client/api/connector_controller_api.rb', line 341

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



351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
# File 'lib/mailslurp_client/api/connector_controller_api.rb', line 351

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)


401
402
403
404
# File 'lib/mailslurp_client/api/connector_controller_api.rb', line 401

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



411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
# File 'lib/mailslurp_client/api/connector_controller_api.rb', line 411

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_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



291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
# File 'lib/mailslurp_client/api/connector_controller_api.rb', line 291

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_sync_events(opts = {}) ⇒ PageConnectorSyncEvents

Get all inbox connector sync events

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:



464
465
466
467
# File 'lib/mailslurp_client/api/connector_controller_api.rb', line 464

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

#get_all_connector_sync_events_with_http_info(opts = {}) ⇒ Array<(PageConnectorSyncEvents, Integer, Hash)>

Get all inbox connector sync events

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<(PageConnectorSyncEvents, Integer, Hash)>)

    PageConnectorSyncEvents data, response status code and response headers



477
478
479
480
481
482
483
484
485
486
487
488
489
490
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
# File 'lib/mailslurp_client/api/connector_controller_api.rb', line 477

def get_all_connector_sync_events_with_http_info(opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug 'Calling API: ConnectorControllerApi.get_all_connector_sync_events ...'
  end
  allowable_values = ["ASC", "DESC"]
  if @api_client.config.client_side_validation && opts[:'sort'] && !allowable_values.include?(opts[:'sort'])
    fail ArgumentError, "invalid value for \"sort\", must be one of #{allowable_values}"
  end
  # resource path
  local_var_path = '/connectors/events'

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

  # 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_sync_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:



533
534
535
536
# File 'lib/mailslurp_client/api/connector_controller_api.rb', line 533

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

#get_connector_sync_event(id, opts = {}) ⇒ ConnectorSyncEventDto

Get an inbox connector sync event

Parameters:

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

    the optional parameters

Returns:



593
594
595
596
# File 'lib/mailslurp_client/api/connector_controller_api.rb', line 593

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

#get_connector_sync_event_with_http_info(id, opts = {}) ⇒ Array<(ConnectorSyncEventDto, Integer, Hash)>

Get an inbox connector sync event

Parameters:

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

    the optional parameters

Returns:

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

    ConnectorSyncEventDto data, response status code and response headers



602
603
604
605
606
607
608
609
610
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
# File 'lib/mailslurp_client/api/connector_controller_api.rb', line 602

def get_connector_sync_event_with_http_info(id, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug 'Calling API: ConnectorControllerApi.get_connector_sync_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_sync_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] || 'ConnectorSyncEventDto' 

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

#get_connector_sync_events(id, opts = {}) ⇒ PageConnectorSyncEvents

Get an inbox connector sync 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

Returns:



658
659
660
661
# File 'lib/mailslurp_client/api/connector_controller_api.rb', line 658

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

#get_connector_sync_events_with_http_info(id, opts = {}) ⇒ Array<(PageConnectorSyncEvents, Integer, Hash)>

Get an inbox connector sync 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

Returns:

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

    PageConnectorSyncEvents data, response status code and response headers



672
673
674
675
676
677
678
679
680
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
# File 'lib/mailslurp_client/api/connector_controller_api.rb', line 672

def get_connector_sync_events_with_http_info(id, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug 'Calling API: ConnectorControllerApi.get_connector_sync_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_sync_events"
  end
  allowable_values = ["ASC", "DESC"]
  if @api_client.config.client_side_validation && opts[:'sort'] && !allowable_values.include?(opts[:'sort'])
    fail ArgumentError, "invalid value for \"sort\", must be one of #{allowable_values}"
  end
  # resource path
  local_var_path = '/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?

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

  # 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_events\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



542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
# File 'lib/mailslurp_client/api/connector_controller_api.rb', line 542

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:



737
738
739
740
# File 'lib/mailslurp_client/api/connector_controller_api.rb', line 737

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



751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
# File 'lib/mailslurp_client/api/connector_controller_api.rb', line 751

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

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

Sync an inbox connector

Parameters:

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

    the optional parameters

Returns:



807
808
809
810
# File 'lib/mailslurp_client/api/connector_controller_api.rb', line 807

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

Returns:

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

    ConnectorSyncRequestResult data, response status code and response headers



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

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] || {}

  # 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

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



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

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_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



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

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