class MailSlurpClient::MailServerControllerApi

Attributes

api_client[RW]

Public Class Methods

new(api_client = ApiClient.default) click to toggle source
# File lib/mailslurp_client/api/mail_server_controller_api.rb, line 19
def initialize(api_client = ApiClient.default)
  @api_client = api_client
end

Public Instance Methods

describe_mail_server_domain(describe_options, opts = {}) click to toggle source

Get DNS Mail Server records for a domain @param describe_options [DescribeDomainOptions] describeOptions @param [Hash] opts the optional parameters @return [DescribeMailServerDomainResult]

# File lib/mailslurp_client/api/mail_server_controller_api.rb, line 26
def describe_mail_server_domain(describe_options, opts = {})
  data, _status_code, _headers = describe_mail_server_domain_with_http_info(describe_options, opts)
  data
end
describe_mail_server_domain_with_http_info(describe_options, opts = {}) click to toggle source

Get DNS Mail Server records for a domain @param describe_options [DescribeDomainOptions] describeOptions @param [Hash] opts the optional parameters @return [Array<(DescribeMailServerDomainResult, Integer, Hash)>] DescribeMailServerDomainResult data, response status code and response headers

# File lib/mailslurp_client/api/mail_server_controller_api.rb, line 35
def describe_mail_server_domain_with_http_info(describe_options, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug 'Calling API: MailServerControllerApi.describe_mail_server_domain ...'
  end
  # verify the required parameter 'describe_options' is set
  if @api_client.config.client_side_validation && describe_options.nil?
    fail ArgumentError, "Missing the required parameter 'describe_options' when calling MailServerControllerApi.describe_mail_server_domain"
  end
  # resource path
  local_var_path = '/mail-server/describe/domain'

  # 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(['application/json'])
  # 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(describe_options) 

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

  # 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: MailServerControllerApi#describe_mail_server_domain\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end
get_dns_lookup(dns_lookup_options, opts = {}) click to toggle source

Lookup DNS records for a domain @param dns_lookup_options [DNSLookupOptions] dnsLookupOptions @param [Hash] opts the optional parameters @return [DNSLookupResults]

# File lib/mailslurp_client/api/mail_server_controller_api.rb, line 88
def get_dns_lookup(dns_lookup_options, opts = {})
  data, _status_code, _headers = get_dns_lookup_with_http_info(dns_lookup_options, opts)
  data
end
get_dns_lookup_with_http_info(dns_lookup_options, opts = {}) click to toggle source

Lookup DNS records for a domain @param dns_lookup_options [DNSLookupOptions] dnsLookupOptions @param [Hash] opts the optional parameters @return [Array<(DNSLookupResults, Integer, Hash)>] DNSLookupResults data, response status code and response headers

# File lib/mailslurp_client/api/mail_server_controller_api.rb, line 97
def get_dns_lookup_with_http_info(dns_lookup_options, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug 'Calling API: MailServerControllerApi.get_dns_lookup ...'
  end
  # verify the required parameter 'dns_lookup_options' is set
  if @api_client.config.client_side_validation && dns_lookup_options.nil?
    fail ArgumentError, "Missing the required parameter 'dns_lookup_options' when calling MailServerControllerApi.get_dns_lookup"
  end
  # resource path
  local_var_path = '/mail-server/describe/dns-lookup'

  # 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(['application/json'])
  # 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(dns_lookup_options) 

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

  # 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: MailServerControllerApi#get_dns_lookup\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end
get_ip_address(name, opts = {}) click to toggle source

Get IP address for a domain @param name [String] name @param [Hash] opts the optional parameters @return [IPAddressResult]

# File lib/mailslurp_client/api/mail_server_controller_api.rb, line 150
def get_ip_address(name, opts = {})
  data, _status_code, _headers = get_ip_address_with_http_info(name, opts)
  data
end
get_ip_address_with_http_info(name, opts = {}) click to toggle source

Get IP address for a domain @param name [String] name @param [Hash] opts the optional parameters @return [Array<(IPAddressResult, Integer, Hash)>] IPAddressResult data, response status code and response headers

# File lib/mailslurp_client/api/mail_server_controller_api.rb, line 159
def get_ip_address_with_http_info(name, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug 'Calling API: MailServerControllerApi.get_ip_address ...'
  end
  # verify the required parameter 'name' is set
  if @api_client.config.client_side_validation && name.nil?
    fail ArgumentError, "Missing the required parameter 'name' when calling MailServerControllerApi.get_ip_address"
  end
  # resource path
  local_var_path = '/mail-server/describe/ip-address'

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

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

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

  # http body (model)
  post_body = opts[:body] 

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

  # 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: MailServerControllerApi#get_ip_address\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end
verify_email_address(verify_options, opts = {}) click to toggle source

Verify the existence of an email address at a given mail server. @param verify_options [VerifyEmailAddressOptions] verifyOptions @param [Hash] opts the optional parameters @return [EmailVerificationResult]

# File lib/mailslurp_client/api/mail_server_controller_api.rb, line 211
def verify_email_address(verify_options, opts = {})
  data, _status_code, _headers = verify_email_address_with_http_info(verify_options, opts)
  data
end
verify_email_address_with_http_info(verify_options, opts = {}) click to toggle source

Verify the existence of an email address at a given mail server. @param verify_options [VerifyEmailAddressOptions] verifyOptions @param [Hash] opts the optional parameters @return [Array<(EmailVerificationResult, Integer, Hash)>] EmailVerificationResult data, response status code and response headers

# File lib/mailslurp_client/api/mail_server_controller_api.rb, line 220
def verify_email_address_with_http_info(verify_options, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug 'Calling API: MailServerControllerApi.verify_email_address ...'
  end
  # verify the required parameter 'verify_options' is set
  if @api_client.config.client_side_validation && verify_options.nil?
    fail ArgumentError, "Missing the required parameter 'verify_options' when calling MailServerControllerApi.verify_email_address"
  end
  # resource path
  local_var_path = '/mail-server/verify/email-address'

  # 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(['application/json'])
  # 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(verify_options) 

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

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