class MailSlurpClient::AliasControllerApi

Attributes

api_client[RW]

Public Class Methods

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

Public Instance Methods

create_alias(create_alias_options, opts = {}) click to toggle source

Create an email alias. Must be verified by clicking link inside verification email that will be sent to the address. Once verified the alias will be active. Email aliases use a MailSlurp randomly generated email address (or a custom domain inbox that you provide) to mask or proxy a real email address. Emails sent to the alias address will be forwarded to the hidden email address it was created for. If you want to send a reply use the threadId attached @param create_alias_options [CreateAliasOptions] createAliasOptions @param [Hash] opts the optional parameters @return [AliasDto]

# File lib/mailslurp_client/api/alias_controller_api.rb, line 27
def create_alias(create_alias_options, opts = {})
  data, _status_code, _headers = create_alias_with_http_info(create_alias_options, opts)
  data
end
create_alias_with_http_info(create_alias_options, opts = {}) click to toggle source

Create an email alias. Must be verified by clicking link inside verification email that will be sent to the address. Once verified the alias will be active. Email aliases use a MailSlurp randomly generated email address (or a custom domain inbox that you provide) to mask or proxy a real email address. Emails sent to the alias address will be forwarded to the hidden email address it was created for. If you want to send a reply use the threadId attached @param create_alias_options [CreateAliasOptions] createAliasOptions @param [Hash] opts the optional parameters @return [Array<(AliasDto, Integer, Hash)>] AliasDto data, response status code and response headers

# File lib/mailslurp_client/api/alias_controller_api.rb, line 37
def create_alias_with_http_info(create_alias_options, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug 'Calling API: AliasControllerApi.create_alias ...'
  end
  # verify the required parameter 'create_alias_options' is set
  if @api_client.config.client_side_validation && create_alias_options.nil?
    fail ArgumentError, "Missing the required parameter 'create_alias_options' when calling AliasControllerApi.create_alias"
  end
  # resource path
  local_var_path = '/aliases'

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

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

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

Delete an email alias @param alias_id [String] aliasId @param [Hash] opts the optional parameters @return [nil]

# File lib/mailslurp_client/api/alias_controller_api.rb, line 90
def delete_alias(alias_id, opts = {})
  delete_alias_with_http_info(alias_id, opts)
  nil
end
delete_alias_with_http_info(alias_id, opts = {}) click to toggle source

Delete an email alias @param alias_id [String] aliasId @param [Hash] opts the optional parameters @return [Array<(nil, Integer, Hash)>] nil, response status code and response headers

# File lib/mailslurp_client/api/alias_controller_api.rb, line 99
def delete_alias_with_http_info(alias_id, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug 'Calling API: AliasControllerApi.delete_alias ...'
  end
  # verify the required parameter 'alias_id' is set
  if @api_client.config.client_side_validation && alias_id.nil?
    fail ArgumentError, "Missing the required parameter 'alias_id' when calling AliasControllerApi.delete_alias"
  end
  # resource path
  local_var_path = '/aliases/{aliasId}'.sub('{' + 'aliasId' + '}', CGI.escape(alias_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: AliasControllerApi#delete_alias\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end
get_alias(alias_id, opts = {}) click to toggle source

Get an email alias Get an email alias by ID @param alias_id [String] aliasId @param [Hash] opts the optional parameters @return [AliasDto]

# File lib/mailslurp_client/api/alias_controller_api.rb, line 149
def get_alias(alias_id, opts = {})
  data, _status_code, _headers = get_alias_with_http_info(alias_id, opts)
  data
end
get_alias_emails(alias_id, opts = {}) click to toggle source

Get emails for an alias Get paginated emails for an alias by ID @param alias_id [String] aliasId @param [Hash] opts the optional parameters @option opts [DateTime] :before Optional filter by sent before given date time @option opts [Integer] :page Optional page index alias email list pagination (default to 0) @option opts [DateTime] :since Optional filter by sent after given date time @option opts [Integer] :size Optional page size alias email list pagination (default to 20) @option opts [String] :sort Optional createdAt sort direction ASC or DESC (default to 'ASC') @return [PageEmailProjection]

# File lib/mailslurp_client/api/alias_controller_api.rb, line 216
def get_alias_emails(alias_id, opts = {})
  data, _status_code, _headers = get_alias_emails_with_http_info(alias_id, opts)
  data
end
get_alias_emails_with_http_info(alias_id, opts = {}) click to toggle source

Get emails for an alias Get paginated emails for an alias by ID @param alias_id [String] aliasId @param [Hash] opts the optional parameters @option opts [DateTime] :before Optional filter by sent before given date time @option opts [Integer] :page Optional page index alias email list pagination @option opts [DateTime] :since Optional filter by sent after given date time @option opts [Integer] :size Optional page size alias email list pagination @option opts [String] :sort Optional createdAt sort direction ASC or DESC @return [Array<(PageEmailProjection, Integer, Hash)>] PageEmailProjection data, response status code and response headers

# File lib/mailslurp_client/api/alias_controller_api.rb, line 231
def get_alias_emails_with_http_info(alias_id, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug 'Calling API: AliasControllerApi.get_alias_emails ...'
  end
  # verify the required parameter 'alias_id' is set
  if @api_client.config.client_side_validation && alias_id.nil?
    fail ArgumentError, "Missing the required parameter 'alias_id' when calling AliasControllerApi.get_alias_emails"
  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 = '/aliases/{aliasId}/emails'.sub('{' + 'aliasId' + '}', CGI.escape(alias_id.to_s))

  # query parameters
  query_params = opts[:query_params] || {}
  query_params[:'before'] = opts[:'before'] if !opts[:'before'].nil?
  query_params[:'page'] = opts[:'page'] if !opts[:'page'].nil?
  query_params[:'since'] = opts[:'since'] if !opts[:'since'].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(['application/json'])

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

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

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

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

Get threads created for an alias Returns threads created for an email alias in paginated form @param alias_id [String] aliasId @param [Hash] opts the optional parameters @option opts [DateTime] :before Optional filter by sent before given date time @option opts [Integer] :page Optional page index in thread list pagination (default to 0) @option opts [DateTime] :since Optional filter by sent after given date time @option opts [Integer] :size Optional page size in thread list pagination (default to 20) @option opts [String] :sort Optional createdAt sort direction ASC or DESC (default to 'ASC') @return [PageThreadProjection]

# File lib/mailslurp_client/api/alias_controller_api.rb, line 297
def get_alias_threads(alias_id, opts = {})
  data, _status_code, _headers = get_alias_threads_with_http_info(alias_id, opts)
  data
end
get_alias_threads_with_http_info(alias_id, opts = {}) click to toggle source

Get threads created for an alias Returns threads created for an email alias in paginated form @param alias_id [String] aliasId @param [Hash] opts the optional parameters @option opts [DateTime] :before Optional filter by sent before given date time @option opts [Integer] :page Optional page index in thread list pagination @option opts [DateTime] :since Optional filter by sent after given date time @option opts [Integer] :size Optional page size in thread list pagination @option opts [String] :sort Optional createdAt sort direction ASC or DESC @return [Array<(PageThreadProjection, Integer, Hash)>] PageThreadProjection data, response status code and response headers

# File lib/mailslurp_client/api/alias_controller_api.rb, line 312
def get_alias_threads_with_http_info(alias_id, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug 'Calling API: AliasControllerApi.get_alias_threads ...'
  end
  # verify the required parameter 'alias_id' is set
  if @api_client.config.client_side_validation && alias_id.nil?
    fail ArgumentError, "Missing the required parameter 'alias_id' when calling AliasControllerApi.get_alias_threads"
  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 = '/aliases/{aliasId}/threads'.sub('{' + 'aliasId' + '}', CGI.escape(alias_id.to_s))

  # query parameters
  query_params = opts[:query_params] || {}
  query_params[:'before'] = opts[:'before'] if !opts[:'before'].nil?
  query_params[:'page'] = opts[:'page'] if !opts[:'page'].nil?
  query_params[:'since'] = opts[:'since'] if !opts[:'since'].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(['application/json'])

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

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

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

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

Get an email alias Get an email alias by ID @param alias_id [String] aliasId @param [Hash] opts the optional parameters @return [Array<(AliasDto, Integer, Hash)>] AliasDto data, response status code and response headers

# File lib/mailslurp_client/api/alias_controller_api.rb, line 159
def get_alias_with_http_info(alias_id, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug 'Calling API: AliasControllerApi.get_alias ...'
  end
  # verify the required parameter 'alias_id' is set
  if @api_client.config.client_side_validation && alias_id.nil?
    fail ArgumentError, "Missing the required parameter 'alias_id' when calling AliasControllerApi.get_alias"
  end
  # resource path
  local_var_path = '/aliases/{aliasId}'.sub('{' + 'aliasId' + '}', CGI.escape(alias_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(['application/json'])

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

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

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

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

Get all email aliases you have created Get all email aliases in paginated form @param [Hash] opts the optional parameters @option opts [DateTime] :before Filter by created at before the given timestamp @option opts [Integer] :page Optional page index in alias list pagination (default to 0) @option opts [DateTime] :since Filter by created at after the given timestamp @option opts [Integer] :size Optional page size in alias list pagination (default to 20) @option opts [String] :sort Optional createdAt sort direction ASC or DESC (default to 'ASC') @return [PageAlias]

# File lib/mailslurp_client/api/alias_controller_api.rb, line 377
def get_aliases(opts = {})
  data, _status_code, _headers = get_aliases_with_http_info(opts)
  data
end
get_aliases_with_http_info(opts = {}) click to toggle source

Get all email aliases you have created Get all email aliases in paginated form @param [Hash] opts the optional parameters @option opts [DateTime] :before Filter by created at before the given timestamp @option opts [Integer] :page Optional page index in alias list pagination @option opts [DateTime] :since Filter by created at after the given timestamp @option opts [Integer] :size Optional page size in alias list pagination @option opts [String] :sort Optional createdAt sort direction ASC or DESC @return [Array<(PageAlias, Integer, Hash)>] PageAlias data, response status code and response headers

# File lib/mailslurp_client/api/alias_controller_api.rb, line 391
def get_aliases_with_http_info(opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug 'Calling API: AliasControllerApi.get_aliases ...'
  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 = '/aliases'

  # query parameters
  query_params = opts[:query_params] || {}
  query_params[:'before'] = opts[:'before'] if !opts[:'before'].nil?
  query_params[:'page'] = opts[:'page'] if !opts[:'page'].nil?
  query_params[:'since'] = opts[:'since'] if !opts[:'since'].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(['application/json'])

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

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

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

  # 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: AliasControllerApi#get_aliases\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end
reply_to_alias_email(alias_id, email_id, reply_to_alias_email_options, opts = {}) click to toggle source

Reply to an email Send the reply to the email sender or reply-to and include same subject cc bcc etc. Reply to an email and the contents will be sent with the existing subject to the emails `to`, `cc`, and `bcc`. @param alias_id [String] ID of the alias that email belongs to @param email_id [String] ID of the email that should be replied to @param reply_to_alias_email_options [ReplyToAliasEmailOptions] replyToAliasEmailOptions @param [Hash] opts the optional parameters @return [SentEmailDto]

# File lib/mailslurp_client/api/alias_controller_api.rb, line 450
def reply_to_alias_email(alias_id, email_id, reply_to_alias_email_options, opts = {})
  data, _status_code, _headers = reply_to_alias_email_with_http_info(alias_id, email_id, reply_to_alias_email_options, opts)
  data
end
reply_to_alias_email_with_http_info(alias_id, email_id, reply_to_alias_email_options, opts = {}) click to toggle source

Reply to an email Send the reply to the email sender or reply-to and include same subject cc bcc etc. Reply to an email and the contents will be sent with the existing subject to the emails &#x60;to&#x60;, &#x60;cc&#x60;, and &#x60;bcc&#x60;. @param alias_id [String] ID of the alias that email belongs to @param email_id [String] ID of the email that should be replied to @param reply_to_alias_email_options [ReplyToAliasEmailOptions] replyToAliasEmailOptions @param [Hash] opts the optional parameters @return [Array<(SentEmailDto, Integer, Hash)>] SentEmailDto data, response status code and response headers

# File lib/mailslurp_client/api/alias_controller_api.rb, line 462
def reply_to_alias_email_with_http_info(alias_id, email_id, reply_to_alias_email_options, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug 'Calling API: AliasControllerApi.reply_to_alias_email ...'
  end
  # verify the required parameter 'alias_id' is set
  if @api_client.config.client_side_validation && alias_id.nil?
    fail ArgumentError, "Missing the required parameter 'alias_id' when calling AliasControllerApi.reply_to_alias_email"
  end
  # verify the required parameter 'email_id' is set
  if @api_client.config.client_side_validation && email_id.nil?
    fail ArgumentError, "Missing the required parameter 'email_id' when calling AliasControllerApi.reply_to_alias_email"
  end
  # verify the required parameter 'reply_to_alias_email_options' is set
  if @api_client.config.client_side_validation && reply_to_alias_email_options.nil?
    fail ArgumentError, "Missing the required parameter 'reply_to_alias_email_options' when calling AliasControllerApi.reply_to_alias_email"
  end
  # resource path
  local_var_path = '/aliases/{aliasId}/emails/{emailId}'.sub('{' + 'aliasId' + '}', CGI.escape(alias_id.to_s)).sub('{' + 'emailId' + '}', CGI.escape(email_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(['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(reply_to_alias_email_options) 

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

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

Send an email from an alias inbox Send an email from an alias. Replies to the email will be forwarded to the alias masked email address @param alias_id [String] aliasId @param [Hash] opts the optional parameters @option opts [SendEmailOptions] :send_email_options Options for the email to be sent @return [SentEmailDto]

# File lib/mailslurp_client/api/alias_controller_api.rb, line 525
def send_alias_email(alias_id, opts = {})
  data, _status_code, _headers = send_alias_email_with_http_info(alias_id, opts)
  data
end
send_alias_email_with_http_info(alias_id, opts = {}) click to toggle source

Send an email from an alias inbox Send an email from an alias. Replies to the email will be forwarded to the alias masked email address @param alias_id [String] aliasId @param [Hash] opts the optional parameters @option opts [SendEmailOptions] :send_email_options Options for the email to be sent @return [Array<(SentEmailDto, Integer, Hash)>] SentEmailDto data, response status code and response headers

# File lib/mailslurp_client/api/alias_controller_api.rb, line 536
def send_alias_email_with_http_info(alias_id, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug 'Calling API: AliasControllerApi.send_alias_email ...'
  end
  # verify the required parameter 'alias_id' is set
  if @api_client.config.client_side_validation && alias_id.nil?
    fail ArgumentError, "Missing the required parameter 'alias_id' when calling AliasControllerApi.send_alias_email"
  end
  # resource path
  local_var_path = '/aliases/{aliasId}/emails'.sub('{' + 'aliasId' + '}', CGI.escape(alias_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(['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(opts[:'send_email_options']) 

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

  # 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: AliasControllerApi#send_alias_email\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end
update_alias(alias_id, update_alias_options, opts = {}) click to toggle source

Update an email alias @param alias_id [String] aliasId @param update_alias_options [UpdateAliasOptions] updateAliasOptions @param [Hash] opts the optional parameters @return [nil]

# File lib/mailslurp_client/api/alias_controller_api.rb, line 590
def update_alias(alias_id, update_alias_options, opts = {})
  update_alias_with_http_info(alias_id, update_alias_options, opts)
  nil
end
update_alias_with_http_info(alias_id, update_alias_options, opts = {}) click to toggle source

Update an email alias @param alias_id [String] aliasId @param update_alias_options [UpdateAliasOptions] updateAliasOptions @param [Hash] opts the optional parameters @return [Array<(nil, Integer, Hash)>] nil, response status code and response headers

# File lib/mailslurp_client/api/alias_controller_api.rb, line 600
def update_alias_with_http_info(alias_id, update_alias_options, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug 'Calling API: AliasControllerApi.update_alias ...'
  end
  # verify the required parameter 'alias_id' is set
  if @api_client.config.client_side_validation && alias_id.nil?
    fail ArgumentError, "Missing the required parameter 'alias_id' when calling AliasControllerApi.update_alias"
  end
  # verify the required parameter 'update_alias_options' is set
  if @api_client.config.client_side_validation && update_alias_options.nil?
    fail ArgumentError, "Missing the required parameter 'update_alias_options' when calling AliasControllerApi.update_alias"
  end
  # resource path
  local_var_path = '/aliases/{aliasId}'.sub('{' + 'aliasId' + '}', CGI.escape(alias_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(['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(update_alias_options) 

  # 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(:PUT, local_var_path, new_options)
  if @api_client.config.debugging
    @api_client.config.logger.debug "API called: AliasControllerApi#update_alias\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end