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


89
90
91
92
# File 'lib/mailslurp_client/api/connector_controller_api.rb', line 89

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



97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
# File 'lib/mailslurp_client/api/connector_controller_api.rb', line 97

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)


142
143
144
145
# File 'lib/mailslurp_client/api/connector_controller_api.rb', line 142

def delete_connector(id, opts = {})
  delete_connector_with_http_info(id, opts)
  nil
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



151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
# File 'lib/mailslurp_client/api/connector_controller_api.rb', line 151

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:



204
205
206
207
# File 'lib/mailslurp_client/api/connector_controller_api.rb', line 204

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



217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
# File 'lib/mailslurp_client/api/connector_controller_api.rb', line 217

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:



273
274
275
276
# File 'lib/mailslurp_client/api/connector_controller_api.rb', line 273

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:



333
334
335
336
# File 'lib/mailslurp_client/api/connector_controller_api.rb', line 333

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



342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
# File 'lib/mailslurp_client/api/connector_controller_api.rb', line 342

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:



398
399
400
401
# File 'lib/mailslurp_client/api/connector_controller_api.rb', line 398

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



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
455
456
457
458
459
460
461
462
463
464
465
466
# File 'lib/mailslurp_client/api/connector_controller_api.rb', line 412

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



282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
# File 'lib/mailslurp_client/api/connector_controller_api.rb', line 282

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:



477
478
479
480
# File 'lib/mailslurp_client/api/connector_controller_api.rb', line 477

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



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
535
536
537
538
539
540
541
# File 'lib/mailslurp_client/api/connector_controller_api.rb', line 491

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:



547
548
549
550
# File 'lib/mailslurp_client/api/connector_controller_api.rb', line 547

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



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
595
596
597
598
599
600
601
# File 'lib/mailslurp_client/api/connector_controller_api.rb', line 556

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:



608
609
610
611
# File 'lib/mailslurp_client/api/connector_controller_api.rb', line 608

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



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
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
# File 'lib/mailslurp_client/api/connector_controller_api.rb', line 618

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