class MailSlurpClient::DomainControllerApi
Attributes
Public Class Methods
# File lib/mailslurp_client/api/domain_controller_api.rb, line 19 def initialize(api_client = ApiClient.default) @api_client = api_client end
Public Instance Methods
Add catch all wild card inbox to domain Add a catch all inbox to a domain so that any emails sent to it that cannot be matched will be sent to the catch all inbox generated @param id [String] id @param [Hash] opts the optional parameters @return [DomainDto]
# File lib/mailslurp_client/api/domain_controller_api.rb, line 27 def add_domain_wildcard_catch_all(id, opts = {}) data, _status_code, _headers = add_domain_wildcard_catch_all_with_http_info(id, opts) data end
Add catch all wild card inbox to domain Add a catch all inbox to a domain so that any emails sent to it that cannot be matched will be sent to the catch all inbox generated @param id [String] id @param [Hash] opts the optional parameters @return [Array<(DomainDto
, Integer, Hash)>] DomainDto
data, response status code and response headers
# File lib/mailslurp_client/api/domain_controller_api.rb, line 37 def add_domain_wildcard_catch_all_with_http_info(id, opts = {}) if @api_client.config.debugging @api_client.config.logger.debug 'Calling API: DomainControllerApi.add_domain_wildcard_catch_all ...' 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 DomainControllerApi.add_domain_wildcard_catch_all" end # resource path local_var_path = '/domains/{id}/wildcard'.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(['application/json']) # form parameters form_params = opts[:form_params] || {} # http body (model) post_body = opts[:body] # return_type return_type = opts[:return_type] || 'DomainDto' # 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: DomainControllerApi#add_domain_wildcard_catch_all\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end
Create Domain Link a domain that you own with MailSlurp so you can create email addresses using it. Endpoint returns DNS records used for validation. You must add these verification records to your host provider's DNS setup to verify the domain. @param domain_options [CreateDomainOptions] domainOptions @param [Hash] opts the optional parameters @return [DomainDto]
# File lib/mailslurp_client/api/domain_controller_api.rb, line 89 def create_domain(domain_options, opts = {}) data, _status_code, _headers = create_domain_with_http_info(domain_options, opts) data end
Create Domain Link a domain that you own with MailSlurp so you can create email addresses using it. Endpoint returns DNS records used for validation. You must add these verification records to your host provider's DNS setup to verify the domain. @param domain_options [CreateDomainOptions] domainOptions @param [Hash] opts the optional parameters @return [Array<(DomainDto
, Integer, Hash)>] DomainDto
data, response status code and response headers
# File lib/mailslurp_client/api/domain_controller_api.rb, line 99 def create_domain_with_http_info(domain_options, opts = {}) if @api_client.config.debugging @api_client.config.logger.debug 'Calling API: DomainControllerApi.create_domain ...' end # verify the required parameter 'domain_options' is set if @api_client.config.client_side_validation && domain_options.nil? fail ArgumentError, "Missing the required parameter 'domain_options' when calling DomainControllerApi.create_domain" end # resource path local_var_path = '/domains' # 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(domain_options) # return_type return_type = opts[:return_type] || 'DomainDto' # 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: DomainControllerApi#create_domain\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end
Delete a domain Delete a domain. This will disable any existing inboxes that use this domain. @param id [String] id @param [Hash] opts the optional parameters @return [Array<String>]
# File lib/mailslurp_client/api/domain_controller_api.rb, line 153 def delete_domain(id, opts = {}) data, _status_code, _headers = delete_domain_with_http_info(id, opts) data end
Delete a domain Delete a domain. This will disable any existing inboxes that use this domain. @param id [String] id @param [Hash] opts the optional parameters @return [Array<(Array<String>, Integer, Hash)>] Array<String> data, response status code and response headers
# File lib/mailslurp_client/api/domain_controller_api.rb, line 163 def delete_domain_with_http_info(id, opts = {}) if @api_client.config.debugging @api_client.config.logger.debug 'Calling API: DomainControllerApi.delete_domain ...' 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 DomainControllerApi.delete_domain" end # resource path local_var_path = '/domains/{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(['application/json']) # form parameters form_params = opts[:form_params] || {} # http body (model) post_body = opts[:body] # return_type return_type = opts[:return_type] || 'Array<String>' # 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: DomainControllerApi#delete_domain\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end
Get a domain Returns domain verification status and tokens for a given domain @param id [String] id @param [Hash] opts the optional parameters @return [DomainDto]
# File lib/mailslurp_client/api/domain_controller_api.rb, line 215 def get_domain(id, opts = {}) data, _status_code, _headers = get_domain_with_http_info(id, opts) data end
Get a domain Returns domain verification status and tokens for a given domain @param id [String] id @param [Hash] opts the optional parameters @return [Array<(DomainDto
, Integer, Hash)>] DomainDto
data, response status code and response headers
# File lib/mailslurp_client/api/domain_controller_api.rb, line 225 def get_domain_with_http_info(id, opts = {}) if @api_client.config.debugging @api_client.config.logger.debug 'Calling API: DomainControllerApi.get_domain ...' 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 DomainControllerApi.get_domain" end # resource path local_var_path = '/domains/{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(['application/json']) # form parameters form_params = opts[:form_params] || {} # http body (model) post_body = opts[:body] # return_type return_type = opts[:return_type] || 'DomainDto' # 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: DomainControllerApi#get_domain\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end
Get domains List all custom domains you have created @param [Hash] opts the optional parameters @return [Array<DomainPreview>]
# File lib/mailslurp_client/api/domain_controller_api.rb, line 276 def get_domains(opts = {}) data, _status_code, _headers = get_domains_with_http_info(opts) data end
Get domains List all custom domains you have created @param [Hash] opts the optional parameters @return [Array<(Array<DomainPreview>, Integer, Hash)>] Array<DomainPreview> data, response status code and response headers
# File lib/mailslurp_client/api/domain_controller_api.rb, line 285 def get_domains_with_http_info(opts = {}) if @api_client.config.debugging @api_client.config.logger.debug 'Calling API: DomainControllerApi.get_domains ...' end # resource path local_var_path = '/domains' # 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] || 'Array<DomainPreview>' # 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: DomainControllerApi#get_domains\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end
Update a domain Update values on a domain. Note you cannot change the domain name as it is immutable. Recreate the domain if you need to alter this. @param id [String] id @param update_domain_dto [UpdateDomainOptions] updateDomainDto @param [Hash] opts the optional parameters @return [DomainDto]
# File lib/mailslurp_client/api/domain_controller_api.rb, line 334 def update_domain(id, update_domain_dto, opts = {}) data, _status_code, _headers = update_domain_with_http_info(id, update_domain_dto, opts) data end
Update a domain Update values on a domain. Note you cannot change the domain name as it is immutable. Recreate the domain if you need to alter this. @param id [String] id @param update_domain_dto [UpdateDomainOptions] updateDomainDto @param [Hash] opts the optional parameters @return [Array<(DomainDto
, Integer, Hash)>] DomainDto
data, response status code and response headers
# File lib/mailslurp_client/api/domain_controller_api.rb, line 345 def update_domain_with_http_info(id, update_domain_dto, opts = {}) if @api_client.config.debugging @api_client.config.logger.debug 'Calling API: DomainControllerApi.update_domain ...' 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 DomainControllerApi.update_domain" end # verify the required parameter 'update_domain_dto' is set if @api_client.config.client_side_validation && update_domain_dto.nil? fail ArgumentError, "Missing the required parameter 'update_domain_dto' when calling DomainControllerApi.update_domain" end # resource path local_var_path = '/domains/{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(['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_domain_dto) # return_type return_type = opts[:return_type] || 'DomainDto' # 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: DomainControllerApi#update_domain\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end