MailSlurpClient::InboxForwarderControllerApi

All URIs are relative to https://api.mailslurp.com

MethodHTTP requestDescription
create_new_inbox_forwarderPOST /forwardersCreate an inbox forwarder
delete_inbox_forwarderDELETE /forwarders/{id}Delete an inbox forwarder
delete_inbox_forwardersDELETE /forwardersDelete inbox forwarders
get_inbox_forwarderGET /forwarders/{id}Get an inbox forwarder
get_inbox_forwardersGET /forwardersList inbox forwarders
test_inbox_forwarderPOST /forwarders/{id}/testTest an inbox forwarder
test_inbox_forwarders_for_inboxPUT /forwardersTest inbox forwarders for inbox
test_new_inbox_forwarderPATCH /forwardersTest new inbox forwarder

create_new_inbox_forwarder

InboxForwarderDto create_new_inbox_forwarder(create_inbox_forwarder_options, opts)

Create an inbox forwarder

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

Example

# load the gem
require 'mailslurp_client'
# setup authorization
MailSlurpClient.configure do |config|
  # Configure API key authorization: API_KEY
  config.api_key['x-api-key'] = 'YOUR API KEY'
  # Uncomment the following line to set a prefix for the API key, e.g. 'Bearer' (defaults to nil)
  #config.api_key_prefix['x-api-key'] = 'Bearer'
end

api_instance = MailSlurpClient::InboxForwarderControllerApi.new
create_inbox_forwarder_options = MailSlurpClient::CreateInboxForwarderOptions.new # CreateInboxForwarderOptions | createInboxForwarderOptions
opts = {
  inbox_id: 'inbox_id_example' # String | Inbox id to attach forwarder to
}

begin
  #Create an inbox forwarder
  result = api_instance.create_new_inbox_forwarder(create_inbox_forwarder_options, opts)
  p result
rescue MailSlurpClient::ApiError => e
  puts "Exception when calling InboxForwarderControllerApi->create_new_inbox_forwarder: #{e}"
end

Parameters

NameTypeDescriptionNotes
create_inbox_forwarder_optionsCreateInboxForwarderOptionscreateInboxForwarderOptions
inbox_idStringInbox id to attach forwarder to[optional]

Return type

InboxForwarderDto

Authorization

API_KEY

HTTP request headers

  • Content-Type: application/json
  • Accept: application/json

delete_inbox_forwarder

delete_inbox_forwarder(id)

Delete an inbox forwarder

Delete inbox forwarder

Example

# load the gem
require 'mailslurp_client'
# setup authorization
MailSlurpClient.configure do |config|
  # Configure API key authorization: API_KEY
  config.api_key['x-api-key'] = 'YOUR API KEY'
  # Uncomment the following line to set a prefix for the API key, e.g. 'Bearer' (defaults to nil)
  #config.api_key_prefix['x-api-key'] = 'Bearer'
end

api_instance = MailSlurpClient::InboxForwarderControllerApi.new
id = 'id_example' # String | ID of inbox forwarder

begin
  #Delete an inbox forwarder
  api_instance.delete_inbox_forwarder(id)
rescue MailSlurpClient::ApiError => e
  puts "Exception when calling InboxForwarderControllerApi->delete_inbox_forwarder: #{e}"
end

Parameters

NameTypeDescriptionNotes
idStringID of inbox forwarder

Return type

nil (empty response body)

Authorization

API_KEY

HTTP request headers

  • Content-Type: Not defined
  • Accept: Not defined

delete_inbox_forwarders

delete_inbox_forwarders(opts)

Delete inbox forwarders

Delete inbox forwarders. Accepts optional inboxId filter.

Example

# load the gem
require 'mailslurp_client'
# setup authorization
MailSlurpClient.configure do |config|
  # Configure API key authorization: API_KEY
  config.api_key['x-api-key'] = 'YOUR API KEY'
  # Uncomment the following line to set a prefix for the API key, e.g. 'Bearer' (defaults to nil)
  #config.api_key_prefix['x-api-key'] = 'Bearer'
end

api_instance = MailSlurpClient::InboxForwarderControllerApi.new
opts = {
  inbox_id: 'inbox_id_example' # String | Optional inbox id to attach forwarder to
}

begin
  #Delete inbox forwarders
  api_instance.delete_inbox_forwarders(opts)
rescue MailSlurpClient::ApiError => e
  puts "Exception when calling InboxForwarderControllerApi->delete_inbox_forwarders: #{e}"
end

Parameters

NameTypeDescriptionNotes
inbox_idStringOptional inbox id to attach forwarder to[optional]

Return type

nil (empty response body)

Authorization

API_KEY

HTTP request headers

  • Content-Type: Not defined
  • Accept: Not defined

get_inbox_forwarder

InboxForwarderDto get_inbox_forwarder(id)

Get an inbox forwarder

Get inbox ruleset

Example

# load the gem
require 'mailslurp_client'
# setup authorization
MailSlurpClient.configure do |config|
  # Configure API key authorization: API_KEY
  config.api_key['x-api-key'] = 'YOUR API KEY'
  # Uncomment the following line to set a prefix for the API key, e.g. 'Bearer' (defaults to nil)
  #config.api_key_prefix['x-api-key'] = 'Bearer'
end

api_instance = MailSlurpClient::InboxForwarderControllerApi.new
id = 'id_example' # String | ID of inbox forwarder

begin
  #Get an inbox forwarder
  result = api_instance.get_inbox_forwarder(id)
  p result
rescue MailSlurpClient::ApiError => e
  puts "Exception when calling InboxForwarderControllerApi->get_inbox_forwarder: #{e}"
end

Parameters

NameTypeDescriptionNotes
idStringID of inbox forwarder

Return type

InboxForwarderDto

Authorization

API_KEY

HTTP request headers

  • Content-Type: Not defined
  • Accept: application/json

get_inbox_forwarders

PageInboxForwarderDto get_inbox_forwarders(opts)

List inbox forwarders

List all forwarders attached to an inbox

Example

# load the gem
require 'mailslurp_client'
# setup authorization
MailSlurpClient.configure do |config|
  # Configure API key authorization: API_KEY
  config.api_key['x-api-key'] = 'YOUR API KEY'
  # Uncomment the following line to set a prefix for the API key, e.g. 'Bearer' (defaults to nil)
  #config.api_key_prefix['x-api-key'] = 'Bearer'
end

api_instance = MailSlurpClient::InboxForwarderControllerApi.new
opts = {
  before: DateTime.parse('2013-10-20T19:20:30+01:00'), # DateTime | Filter by created at before the given timestamp
  inbox_id: 'inbox_id_example', # String | Optional inbox id to get forwarders from
  page: 0, # Integer | Optional page  in inbox forwarder list pagination
  search_filter: 'search_filter_example', # String | Optional search filter
  since: DateTime.parse('2013-10-20T19:20:30+01:00'), # DateTime | Filter by created at after the given timestamp
  size: 20, # Integer | Optional page size in inbox forwarder list pagination
  sort: 'ASC' # String | Optional createdAt sort direction ASC or DESC
}

begin
  #List inbox forwarders
  result = api_instance.get_inbox_forwarders(opts)
  p result
rescue MailSlurpClient::ApiError => e
  puts "Exception when calling InboxForwarderControllerApi->get_inbox_forwarders: #{e}"
end

Parameters

NameTypeDescriptionNotes
beforeDateTimeFilter by created at before the given timestamp[optional]
inbox_idStringOptional inbox id to get forwarders from[optional]
pageIntegerOptional page in inbox forwarder list pagination[optional] [default to 0]
search_filterStringOptional search filter[optional]
sinceDateTimeFilter by created at after the given timestamp[optional]
sizeIntegerOptional page size in inbox forwarder list pagination[optional] [default to 20]
sortStringOptional createdAt sort direction ASC or DESC[optional] [default to ‘ASC’]

Return type

PageInboxForwarderDto

Authorization

API_KEY

HTTP request headers

  • Content-Type: Not defined
  • Accept: application/json

test_inbox_forwarder

InboxForwarderTestResult test_inbox_forwarder(id, inbox_forwarder_test_options)

Test an inbox forwarder

Test an inbox forwarder

Example

# load the gem
require 'mailslurp_client'
# setup authorization
MailSlurpClient.configure do |config|
  # Configure API key authorization: API_KEY
  config.api_key['x-api-key'] = 'YOUR API KEY'
  # Uncomment the following line to set a prefix for the API key, e.g. 'Bearer' (defaults to nil)
  #config.api_key_prefix['x-api-key'] = 'Bearer'
end

api_instance = MailSlurpClient::InboxForwarderControllerApi.new
id = 'id_example' # String | ID of inbox forwarder
inbox_forwarder_test_options = MailSlurpClient::InboxForwarderTestOptions.new # InboxForwarderTestOptions | inboxForwarderTestOptions

begin
  #Test an inbox forwarder
  result = api_instance.test_inbox_forwarder(id, inbox_forwarder_test_options)
  p result
rescue MailSlurpClient::ApiError => e
  puts "Exception when calling InboxForwarderControllerApi->test_inbox_forwarder: #{e}"
end

Parameters

NameTypeDescriptionNotes
idStringID of inbox forwarder
inbox_forwarder_test_optionsInboxForwarderTestOptionsinboxForwarderTestOptions

Return type

InboxForwarderTestResult

Authorization

API_KEY

HTTP request headers

  • Content-Type: application/json
  • Accept: application/json

test_inbox_forwarders_for_inbox

InboxForwarderTestResult test_inbox_forwarders_for_inbox(inbox_id, inbox_forwarder_test_options)

Test inbox forwarders for inbox

Test inbox forwarders for inbox

Example

# load the gem
require 'mailslurp_client'
# setup authorization
MailSlurpClient.configure do |config|
  # Configure API key authorization: API_KEY
  config.api_key['x-api-key'] = 'YOUR API KEY'
  # Uncomment the following line to set a prefix for the API key, e.g. 'Bearer' (defaults to nil)
  #config.api_key_prefix['x-api-key'] = 'Bearer'
end

api_instance = MailSlurpClient::InboxForwarderControllerApi.new
inbox_id = 'inbox_id_example' # String | ID of inbox
inbox_forwarder_test_options = MailSlurpClient::InboxForwarderTestOptions.new # InboxForwarderTestOptions | inboxForwarderTestOptions

begin
  #Test inbox forwarders for inbox
  result = api_instance.test_inbox_forwarders_for_inbox(inbox_id, inbox_forwarder_test_options)
  p result
rescue MailSlurpClient::ApiError => e
  puts "Exception when calling InboxForwarderControllerApi->test_inbox_forwarders_for_inbox: #{e}"
end

Parameters

NameTypeDescriptionNotes
inbox_idStringID of inbox
inbox_forwarder_test_optionsInboxForwarderTestOptionsinboxForwarderTestOptions

Return type

InboxForwarderTestResult

Authorization

API_KEY

HTTP request headers

  • Content-Type: application/json
  • Accept: application/json

test_new_inbox_forwarder

InboxForwarderTestResult test_new_inbox_forwarder(test_new_inbox_forwarder_options)

Test new inbox forwarder

Test new inbox forwarder

Example

# load the gem
require 'mailslurp_client'
# setup authorization
MailSlurpClient.configure do |config|
  # Configure API key authorization: API_KEY
  config.api_key['x-api-key'] = 'YOUR API KEY'
  # Uncomment the following line to set a prefix for the API key, e.g. 'Bearer' (defaults to nil)
  #config.api_key_prefix['x-api-key'] = 'Bearer'
end

api_instance = MailSlurpClient::InboxForwarderControllerApi.new
test_new_inbox_forwarder_options = MailSlurpClient::TestNewInboxForwarderOptions.new # TestNewInboxForwarderOptions | testNewInboxForwarderOptions

begin
  #Test new inbox forwarder
  result = api_instance.test_new_inbox_forwarder(test_new_inbox_forwarder_options)
  p result
rescue MailSlurpClient::ApiError => e
  puts "Exception when calling InboxForwarderControllerApi->test_new_inbox_forwarder: #{e}"
end

Parameters

NameTypeDescriptionNotes
test_new_inbox_forwarder_optionsTestNewInboxForwarderOptionstestNewInboxForwarderOptions

Return type

InboxForwarderTestResult

Authorization

API_KEY

HTTP request headers

  • Content-Type: application/json
  • Accept: application/json