Class: MailSlurpClient::InboxForwarderControllerApi

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

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(api_client = ApiClient.default) ⇒ InboxForwarderControllerApi

Returns a new instance of InboxForwarderControllerApi.



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

def api_client
  @api_client
end

Instance Method Details

#create_new_inbox_forwarder(inbox_id, create_inbox_forwarder_options, opts = {}) ⇒ InboxForwarderDto

Create an inbox forwarder Create a new inbox rule for forwarding, blocking, and allowing emails when sending and receiving

Parameters:

  • inbox_id (String)

    Inbox id to attach forwarder to

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

    the optional parameters

Returns:



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

def create_new_inbox_forwarder(inbox_id, create_inbox_forwarder_options, opts = {})
  data, _status_code, _headers = create_new_inbox_forwarder_with_http_info(inbox_id, create_inbox_forwarder_options, opts)
  data
end

#create_new_inbox_forwarder_with_http_info(inbox_id, create_inbox_forwarder_options, opts = {}) ⇒ Array<(InboxForwarderDto, Integer, Hash)>

Create an inbox forwarder Create a new inbox rule for forwarding, blocking, and allowing emails when sending and receiving

Parameters:

  • inbox_id (String)

    Inbox id to attach forwarder to

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

    the optional parameters

Returns:

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

    InboxForwarderDto 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
88
89
90
91
# File 'lib/mailslurp_client/api/inbox_forwarder_controller_api.rb', line 39

def create_new_inbox_forwarder_with_http_info(inbox_id, create_inbox_forwarder_options, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug 'Calling API: InboxForwarderControllerApi.create_new_inbox_forwarder ...'
  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 InboxForwarderControllerApi.create_new_inbox_forwarder"
  end
  # verify the required parameter 'create_inbox_forwarder_options' is set
  if @api_client.config.client_side_validation && create_inbox_forwarder_options.nil?
    fail ArgumentError, "Missing the required parameter 'create_inbox_forwarder_options' when calling InboxForwarderControllerApi.create_new_inbox_forwarder"
  end
  # resource path
  local_var_path = '/forwarders'

  # 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(['*/*'])
  # 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_inbox_forwarder_options) 

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

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

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

Delete an inbox forwarder Delete inbox forwarder

Parameters:

  • id (String)

    ID of inbox forwarder

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

    the optional parameters

Returns:

  • (nil)


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

def delete_inbox_forwarder(id, opts = {})
  delete_inbox_forwarder_with_http_info(id, opts)
  nil
end

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

Delete an inbox forwarder Delete inbox forwarder

Parameters:

  • id (String)

    ID of inbox forwarder

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

    the optional parameters

Returns:

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

    nil, response status code and response headers



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

def delete_inbox_forwarder_with_http_info(id, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug 'Calling API: InboxForwarderControllerApi.delete_inbox_forwarder ...'
  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 InboxForwarderControllerApi.delete_inbox_forwarder"
  end
  # resource path
  local_var_path = '/forwarders/{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: InboxForwarderControllerApi#delete_inbox_forwarder\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end

#delete_inbox_forwarders(opts = {}) ⇒ nil

Delete inbox forwarders Delete inbox forwarders. Accepts optional inboxId filter.

Parameters:

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

    the optional parameters

Options Hash (opts):

  • :inbox_id (String)

    Optional inbox id to attach forwarder to

Returns:

  • (nil)


158
159
160
161
# File 'lib/mailslurp_client/api/inbox_forwarder_controller_api.rb', line 158

def delete_inbox_forwarders(opts = {})
  delete_inbox_forwarders_with_http_info(opts)
  nil
end

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

Delete inbox forwarders Delete inbox forwarders. Accepts optional inboxId filter.

Parameters:

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

    the optional parameters

Options Hash (opts):

  • :inbox_id (String)

    Optional inbox id to attach forwarder to

Returns:

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

    nil, response status code and response headers



168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
# File 'lib/mailslurp_client/api/inbox_forwarder_controller_api.rb', line 168

def delete_inbox_forwarders_with_http_info(opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug 'Calling API: InboxForwarderControllerApi.delete_inbox_forwarders ...'
  end
  # resource path
  local_var_path = '/forwarders'

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

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

#get_all_inbox_forwarder_events(opts = {}) ⇒ PageInboxForwarderEvents

Get all inbox forwarder events Get all inbox forwarder events

Parameters:

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

    the optional parameters

Options Hash (opts):

  • :page (Integer)

    Optional page index in inbox forwarder event list pagination (default to 0)

  • :size (Integer)

    Optional page size in inbox forwarder event list pagination (default to 20)

  • :sort (String)

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

Returns:



217
218
219
220
# File 'lib/mailslurp_client/api/inbox_forwarder_controller_api.rb', line 217

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

#get_all_inbox_forwarder_events_with_http_info(opts = {}) ⇒ Array<(PageInboxForwarderEvents, Integer, Hash)>

Get all inbox forwarder events Get all inbox forwarder events

Parameters:

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

    the optional parameters

Options Hash (opts):

  • :page (Integer)

    Optional page index in inbox forwarder event list pagination

  • :size (Integer)

    Optional page size in inbox forwarder event list pagination

  • :sort (String)

    Optional createdAt sort direction ASC or DESC

Returns:

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

    PageInboxForwarderEvents data, response status code and response headers



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

def get_all_inbox_forwarder_events_with_http_info(opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug 'Calling API: InboxForwarderControllerApi.get_all_inbox_forwarder_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 = '/forwarders/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?

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

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

#get_forwarder_event(event_id, opts = {}) ⇒ InboxForwarderEventDto

Get a forwarder event Get forwarder event

Parameters:

  • event_id (String)

    ID of inbox forwarder event

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

    the optional parameters

Returns:



284
285
286
287
# File 'lib/mailslurp_client/api/inbox_forwarder_controller_api.rb', line 284

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

#get_forwarder_event_with_http_info(event_id, opts = {}) ⇒ Array<(InboxForwarderEventDto, Integer, Hash)>

Get a forwarder event Get forwarder event

Parameters:

  • event_id (String)

    ID of inbox forwarder event

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

    the optional parameters

Returns:

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

    InboxForwarderEventDto data, response status code and response headers



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

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

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

#get_inbox_forwarder(id, opts = {}) ⇒ InboxForwarderDto

Get an inbox forwarder Get inbox forwarder

Parameters:

  • id (String)

    ID of inbox forwarder

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

    the optional parameters

Returns:



346
347
348
349
# File 'lib/mailslurp_client/api/inbox_forwarder_controller_api.rb', line 346

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

#get_inbox_forwarder_event(id, event_id, opts = {}) ⇒ InboxForwarderEventDto

Get an inbox forwarder event Get inbox forwarder event

Parameters:

  • id (String)

    ID of inbox forwarder

  • event_id (String)

    ID of inbox forwarder event

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

    the optional parameters

Returns:



409
410
411
412
# File 'lib/mailslurp_client/api/inbox_forwarder_controller_api.rb', line 409

def get_inbox_forwarder_event(id, event_id, opts = {})
  data, _status_code, _headers = get_inbox_forwarder_event_with_http_info(id, event_id, opts)
  data
end

#get_inbox_forwarder_event_with_http_info(id, event_id, opts = {}) ⇒ Array<(InboxForwarderEventDto, Integer, Hash)>

Get an inbox forwarder event Get inbox forwarder event

Parameters:

  • id (String)

    ID of inbox forwarder

  • event_id (String)

    ID of inbox forwarder event

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

    the optional parameters

Returns:

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

    InboxForwarderEventDto data, response status code and response headers



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
467
468
469
# File 'lib/mailslurp_client/api/inbox_forwarder_controller_api.rb', line 420

def get_inbox_forwarder_event_with_http_info(id, event_id, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug 'Calling API: InboxForwarderControllerApi.get_inbox_forwarder_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 InboxForwarderControllerApi.get_inbox_forwarder_event"
  end
  # verify the required parameter 'event_id' is set
  if @api_client.config.client_side_validation && event_id.nil?
    fail ArgumentError, "Missing the required parameter 'event_id' when calling InboxForwarderControllerApi.get_inbox_forwarder_event"
  end
  # resource path
  local_var_path = '/forwarders/{id}/events/{eventId}'.sub('{' + 'id' + '}', CGI.escape(id.to_s)).sub('{' + 'eventId' + '}', CGI.escape(event_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] || 'InboxForwarderEventDto' 

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

#get_inbox_forwarder_events(id, opts = {}) ⇒ PageInboxForwarderEvents

Get an inbox forwarder event list Get inbox forwarder events

Parameters:

  • id (String)

    ID of inbox forwarder

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

    the optional parameters

Options Hash (opts):

  • :page (Integer)

    Optional page index in inbox forwarder event list pagination (default to 0)

  • :size (Integer)

    Optional page size in inbox forwarder event list pagination (default to 20)

  • :sort (String)

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

Returns:



479
480
481
482
# File 'lib/mailslurp_client/api/inbox_forwarder_controller_api.rb', line 479

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

#get_inbox_forwarder_events_with_http_info(id, opts = {}) ⇒ Array<(PageInboxForwarderEvents, Integer, Hash)>

Get an inbox forwarder event list Get inbox forwarder events

Parameters:

  • id (String)

    ID of inbox forwarder

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

    the optional parameters

Options Hash (opts):

  • :page (Integer)

    Optional page index in inbox forwarder event list pagination

  • :size (Integer)

    Optional page size in inbox forwarder event list pagination

  • :sort (String)

    Optional createdAt sort direction ASC or DESC

Returns:

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

    PageInboxForwarderEvents data, response status code and response headers



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
542
543
544
# File 'lib/mailslurp_client/api/inbox_forwarder_controller_api.rb', line 492

def get_inbox_forwarder_events_with_http_info(id, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug 'Calling API: InboxForwarderControllerApi.get_inbox_forwarder_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 InboxForwarderControllerApi.get_inbox_forwarder_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 = '/forwarders/{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?

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

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

#get_inbox_forwarder_with_http_info(id, opts = {}) ⇒ Array<(InboxForwarderDto, Integer, Hash)>

Get an inbox forwarder Get inbox forwarder

Parameters:

  • id (String)

    ID of inbox forwarder

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

    the optional parameters

Returns:

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

    InboxForwarderDto data, response status code and response headers



356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
# File 'lib/mailslurp_client/api/inbox_forwarder_controller_api.rb', line 356

def get_inbox_forwarder_with_http_info(id, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug 'Calling API: InboxForwarderControllerApi.get_inbox_forwarder ...'
  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 InboxForwarderControllerApi.get_inbox_forwarder"
  end
  # resource path
  local_var_path = '/forwarders/{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] || 'InboxForwarderDto' 

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

#get_inbox_forwarders(opts = {}) ⇒ PageInboxForwarderDto

List inbox forwarders List all forwarders attached to an inbox

Parameters:

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

    the optional parameters

Options Hash (opts):

  • :inbox_id (String)

    Optional inbox id to get forwarders from

  • :page (Integer)

    Optional page index in inbox forwarder list pagination (default to 0)

  • :size (Integer)

    Optional page size in inbox forwarder list pagination (default to 20)

  • :sort (String)

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

  • :search_filter (String)

    Optional search filter

  • :since (DateTime)

    Filter by created at after the given timestamp

  • :before (DateTime)

    Filter by created at before the given timestamp

Returns:



557
558
559
560
# File 'lib/mailslurp_client/api/inbox_forwarder_controller_api.rb', line 557

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

#get_inbox_forwarders_with_http_info(opts = {}) ⇒ Array<(PageInboxForwarderDto, Integer, Hash)>

List inbox forwarders List all forwarders attached to an inbox

Parameters:

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

    the optional parameters

Options Hash (opts):

  • :inbox_id (String)

    Optional inbox id to get forwarders from

  • :page (Integer)

    Optional page index in inbox forwarder list pagination

  • :size (Integer)

    Optional page size in inbox forwarder list pagination

  • :sort (String)

    Optional createdAt sort direction ASC or DESC

  • :search_filter (String)

    Optional search filter

  • :since (DateTime)

    Filter by created at after the given timestamp

  • :before (DateTime)

    Filter by created at before the given timestamp

Returns:

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

    PageInboxForwarderDto data, response status code and response headers



573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
# File 'lib/mailslurp_client/api/inbox_forwarder_controller_api.rb', line 573

def get_inbox_forwarders_with_http_info(opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug 'Calling API: InboxForwarderControllerApi.get_inbox_forwarders ...'
  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 = '/forwarders'

  # query parameters
  query_params = opts[:query_params] || {}
  query_params[:'inboxId'] = opts[:'inbox_id'] if !opts[:'inbox_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[:'searchFilter'] = opts[:'search_filter'] if !opts[:'search_filter'].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] || 'PageInboxForwarderDto' 

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

#test_inbox_forwarder(id, inbox_forwarder_test_options, opts = {}) ⇒ InboxForwarderTestResult

Test an inbox forwarder Test an inbox forwarder

Parameters:

  • id (String)

    ID of inbox forwarder

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

    the optional parameters

Returns:



633
634
635
636
# File 'lib/mailslurp_client/api/inbox_forwarder_controller_api.rb', line 633

def test_inbox_forwarder(id, inbox_forwarder_test_options, opts = {})
  data, _status_code, _headers = test_inbox_forwarder_with_http_info(id, inbox_forwarder_test_options, opts)
  data
end

#test_inbox_forwarder_with_http_info(id, inbox_forwarder_test_options, opts = {}) ⇒ Array<(InboxForwarderTestResult, Integer, Hash)>

Test an inbox forwarder Test an inbox forwarder

Parameters:

  • id (String)

    ID of inbox forwarder

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

    the optional parameters

Returns:

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

    InboxForwarderTestResult data, response status code and response headers



644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
# File 'lib/mailslurp_client/api/inbox_forwarder_controller_api.rb', line 644

def test_inbox_forwarder_with_http_info(id, inbox_forwarder_test_options, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug 'Calling API: InboxForwarderControllerApi.test_inbox_forwarder ...'
  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 InboxForwarderControllerApi.test_inbox_forwarder"
  end
  # verify the required parameter 'inbox_forwarder_test_options' is set
  if @api_client.config.client_side_validation && inbox_forwarder_test_options.nil?
    fail ArgumentError, "Missing the required parameter 'inbox_forwarder_test_options' when calling InboxForwarderControllerApi.test_inbox_forwarder"
  end
  # resource path
  local_var_path = '/forwarders/{id}/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(inbox_forwarder_test_options) 

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

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

#test_inbox_forwarders_for_inbox(inbox_id, inbox_forwarder_test_options, opts = {}) ⇒ InboxForwarderTestResult

Test inbox forwarders for inbox Test inbox forwarders for inbox

Parameters:

  • inbox_id (String)

    ID of inbox

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

    the optional parameters

Returns:



703
704
705
706
# File 'lib/mailslurp_client/api/inbox_forwarder_controller_api.rb', line 703

def test_inbox_forwarders_for_inbox(inbox_id, inbox_forwarder_test_options, opts = {})
  data, _status_code, _headers = test_inbox_forwarders_for_inbox_with_http_info(inbox_id, inbox_forwarder_test_options, opts)
  data
end

#test_inbox_forwarders_for_inbox_with_http_info(inbox_id, inbox_forwarder_test_options, opts = {}) ⇒ Array<(InboxForwarderTestResult, Integer, Hash)>

Test inbox forwarders for inbox Test inbox forwarders for inbox

Parameters:

  • inbox_id (String)

    ID of inbox

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

    the optional parameters

Returns:

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

    InboxForwarderTestResult data, response status code and response headers



714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
# File 'lib/mailslurp_client/api/inbox_forwarder_controller_api.rb', line 714

def test_inbox_forwarders_for_inbox_with_http_info(inbox_id, inbox_forwarder_test_options, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug 'Calling API: InboxForwarderControllerApi.test_inbox_forwarders_for_inbox ...'
  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 InboxForwarderControllerApi.test_inbox_forwarders_for_inbox"
  end
  # verify the required parameter 'inbox_forwarder_test_options' is set
  if @api_client.config.client_side_validation && inbox_forwarder_test_options.nil?
    fail ArgumentError, "Missing the required parameter 'inbox_forwarder_test_options' when calling InboxForwarderControllerApi.test_inbox_forwarders_for_inbox"
  end
  # resource path
  local_var_path = '/forwarders'

  # 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(['*/*'])
  # 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(inbox_forwarder_test_options) 

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

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

#test_new_inbox_forwarder(test_new_inbox_forwarder_options, opts = {}) ⇒ InboxForwarderTestResult

Test new inbox forwarder Test new inbox forwarder

Parameters:

Returns:



773
774
775
776
# File 'lib/mailslurp_client/api/inbox_forwarder_controller_api.rb', line 773

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

#test_new_inbox_forwarder_with_http_info(test_new_inbox_forwarder_options, opts = {}) ⇒ Array<(InboxForwarderTestResult, Integer, Hash)>

Test new inbox forwarder Test new inbox forwarder

Parameters:

Returns:

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

    InboxForwarderTestResult data, response status code and response headers



783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
# File 'lib/mailslurp_client/api/inbox_forwarder_controller_api.rb', line 783

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

  # 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(test_new_inbox_forwarder_options) 

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

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

#update_inbox_forwarder(id, create_inbox_forwarder_options, opts = {}) ⇒ InboxForwarderDto

Update an inbox forwarder Update inbox forwarder

Parameters:

  • id (String)

    ID of inbox forwarder

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

    the optional parameters

Returns:



838
839
840
841
# File 'lib/mailslurp_client/api/inbox_forwarder_controller_api.rb', line 838

def update_inbox_forwarder(id, create_inbox_forwarder_options, opts = {})
  data, _status_code, _headers = update_inbox_forwarder_with_http_info(id, create_inbox_forwarder_options, opts)
  data
end

#update_inbox_forwarder_with_http_info(id, create_inbox_forwarder_options, opts = {}) ⇒ Array<(InboxForwarderDto, Integer, Hash)>

Update an inbox forwarder Update inbox forwarder

Parameters:

  • id (String)

    ID of inbox forwarder

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

    the optional parameters

Returns:

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

    InboxForwarderDto data, response status code and response headers



849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
867
868
869
870
871
872
873
874
875
876
877
878
879
880
881
882
883
884
885
886
887
888
889
890
891
892
893
894
895
896
897
898
899
900
# File 'lib/mailslurp_client/api/inbox_forwarder_controller_api.rb', line 849

def update_inbox_forwarder_with_http_info(id, create_inbox_forwarder_options, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug 'Calling API: InboxForwarderControllerApi.update_inbox_forwarder ...'
  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 InboxForwarderControllerApi.update_inbox_forwarder"
  end
  # verify the required parameter 'create_inbox_forwarder_options' is set
  if @api_client.config.client_side_validation && create_inbox_forwarder_options.nil?
    fail ArgumentError, "Missing the required parameter 'create_inbox_forwarder_options' when calling InboxForwarderControllerApi.update_inbox_forwarder"
  end
  # resource path
  local_var_path = '/forwarders/{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_inbox_forwarder_options) 

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

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