=begin #MailSlurp API #MailSlurp is an API for sending and receiving emails from dynamically allocated email addresses. It's designed for developers and QA teams to test applications, process inbound emails, send templated notifications, attachments, and more. ## Resources - [Homepage](https://www.mailslurp.com) - Get an [API KEY](https://app.mailslurp.com/sign-up/) - Generated [SDK Clients](https://www.mailslurp.com/docs/) - [Examples](https://github.com/mailslurp/examples) repository The version of the OpenAPI document: 6.5.2 Generated by: https://openapi-generator.tech OpenAPI Generator version: 4.3.1 =end require 'cgi' module MailSlurpClient class WaitForControllerApi attr_accessor :api_client def initialize(api_client = ApiClient.default) @api_client = api_client end # Wait for an email to match the provided filter conditions such as subject contains keyword. # Generic waitFor method that will wait until an inbox meets given conditions or return immediately if already met # @param wait_for_conditions [WaitForConditions] # @param [Hash] opts the optional parameters # @return [Array] def wait_for(wait_for_conditions, opts = {}) data, _status_code, _headers = wait_for_with_http_info(wait_for_conditions, opts) data end # Wait for an email to match the provided filter conditions such as subject contains keyword. # Generic waitFor method that will wait until an inbox meets given conditions or return immediately if already met # @param wait_for_conditions [WaitForConditions] # @param [Hash] opts the optional parameters # @return [Array<(Array, Integer, Hash)>] Array data, response status code and response headers def wait_for_with_http_info(wait_for_conditions, opts = {}) if @api_client.config.debugging @api_client.config.logger.debug 'Calling API: WaitForControllerApi.wait_for ...' end # verify the required parameter 'wait_for_conditions' is set if @api_client.config.client_side_validation && wait_for_conditions.nil? fail ArgumentError, "Missing the required parameter 'wait_for_conditions' when calling WaitForControllerApi.wait_for" end # resource path local_var_path = '/waitFor' # 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(wait_for_conditions) # return_type return_type = opts[:return_type] || 'Array' # 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: WaitForControllerApi#wait_for\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end # Wait for and return count number of emails. Hold connection until inbox count matches expected or timeout occurs # If inbox contains count or more emails at time of request then return count worth of emails. If not wait until the count is reached and return those or return an error if timeout is exceeded. # @param inbox_id [String] Id of the inbox we are fetching emails from # @param count [Integer] Number of emails to wait for. Must be greater that 1 # @param [Hash] opts the optional parameters # @option opts [Integer] :timeout Max milliseconds to wait # @option opts [Boolean] :unread_only Optional filter for unread only (default to false) # @option opts [DateTime] :before Filter for emails that were received before the given timestamp # @option opts [DateTime] :since Filter for emails that were received after the given timestamp # @option opts [String] :sort Sort direction # @option opts [Integer] :delay Max milliseconds delay between calls # @return [Array] def wait_for_email_count(inbox_id, count, opts = {}) data, _status_code, _headers = wait_for_email_count_with_http_info(inbox_id, count, opts) data end # Wait for and return count number of emails. Hold connection until inbox count matches expected or timeout occurs # If inbox contains count or more emails at time of request then return count worth of emails. If not wait until the count is reached and return those or return an error if timeout is exceeded. # @param inbox_id [String] Id of the inbox we are fetching emails from # @param count [Integer] Number of emails to wait for. Must be greater that 1 # @param [Hash] opts the optional parameters # @option opts [Integer] :timeout Max milliseconds to wait # @option opts [Boolean] :unread_only Optional filter for unread only # @option opts [DateTime] :before Filter for emails that were received before the given timestamp # @option opts [DateTime] :since Filter for emails that were received after the given timestamp # @option opts [String] :sort Sort direction # @option opts [Integer] :delay Max milliseconds delay between calls # @return [Array<(Array, Integer, Hash)>] Array data, response status code and response headers def wait_for_email_count_with_http_info(inbox_id, count, opts = {}) if @api_client.config.debugging @api_client.config.logger.debug 'Calling API: WaitForControllerApi.wait_for_email_count ...' 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 WaitForControllerApi.wait_for_email_count" end # verify the required parameter 'count' is set if @api_client.config.client_side_validation && count.nil? fail ArgumentError, "Missing the required parameter 'count' when calling WaitForControllerApi.wait_for_email_count" end if @api_client.config.client_side_validation && count < 1 fail ArgumentError, 'invalid value for "count" when calling WaitForControllerApi.wait_for_email_count, must be greater than or equal to 1.' 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 = '/waitForEmailCount' # query parameters query_params = opts[:query_params] || {} query_params[:'inboxId'] = inbox_id query_params[:'count'] = count query_params[:'timeout'] = opts[:'timeout'] if !opts[:'timeout'].nil? query_params[:'unreadOnly'] = opts[:'unread_only'] if !opts[:'unread_only'].nil? query_params[:'before'] = opts[:'before'] if !opts[:'before'].nil? query_params[:'since'] = opts[:'since'] if !opts[:'since'].nil? query_params[:'sort'] = opts[:'sort'] if !opts[:'sort'].nil? query_params[:'delay'] = opts[:'delay'] if !opts[:'delay'].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] || 'Array' # 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: WaitForControllerApi#wait_for_email_count\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end # Fetch inbox's latest email or if empty wait for an email to arrive # Will return either the last received email or wait for an email to arrive and return that. If you need to wait for an email for a non-empty inbox set `unreadOnly=true` or see the other receive methods such as `waitForNthEmail` or `waitForEmailCount`. # @param [Hash] opts the optional parameters # @option opts [String] :inbox_id Id of the inbox we are fetching emails from # @option opts [Integer] :timeout Max milliseconds to wait # @option opts [Boolean] :unread_only Optional filter for unread only. (default to false) # @option opts [DateTime] :before Filter for emails that were before after the given timestamp # @option opts [DateTime] :since Filter for emails that were received after the given timestamp # @option opts [String] :sort Sort direction # @option opts [Integer] :delay Max milliseconds delay between calls # @return [Email] def wait_for_latest_email(opts = {}) data, _status_code, _headers = wait_for_latest_email_with_http_info(opts) data end # Fetch inbox's latest email or if empty wait for an email to arrive # Will return either the last received email or wait for an email to arrive and return that. If you need to wait for an email for a non-empty inbox set `unreadOnly=true` or see the other receive methods such as `waitForNthEmail` or `waitForEmailCount`. # @param [Hash] opts the optional parameters # @option opts [String] :inbox_id Id of the inbox we are fetching emails from # @option opts [Integer] :timeout Max milliseconds to wait # @option opts [Boolean] :unread_only Optional filter for unread only. # @option opts [DateTime] :before Filter for emails that were before after the given timestamp # @option opts [DateTime] :since Filter for emails that were received after the given timestamp # @option opts [String] :sort Sort direction # @option opts [Integer] :delay Max milliseconds delay between calls # @return [Array<(Email, Integer, Hash)>] Email data, response status code and response headers def wait_for_latest_email_with_http_info(opts = {}) if @api_client.config.debugging @api_client.config.logger.debug 'Calling API: WaitForControllerApi.wait_for_latest_email ...' 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 = '/waitForLatestEmail' # query parameters query_params = opts[:query_params] || {} query_params[:'inboxId'] = opts[:'inbox_id'] if !opts[:'inbox_id'].nil? query_params[:'timeout'] = opts[:'timeout'] if !opts[:'timeout'].nil? query_params[:'unreadOnly'] = opts[:'unread_only'] if !opts[:'unread_only'].nil? query_params[:'before'] = opts[:'before'] if !opts[:'before'].nil? query_params[:'since'] = opts[:'since'] if !opts[:'since'].nil? query_params[:'sort'] = opts[:'sort'] if !opts[:'sort'].nil? query_params[:'delay'] = opts[:'delay'] if !opts[:'delay'].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] || 'Email' # 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: WaitForControllerApi#wait_for_latest_email\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end # Wait or return list of emails that match simple matching patterns # Perform a search of emails in an inbox with the given patterns. If results match expected count then return or else retry the search until results are found or timeout is reached. Match options allow simple CONTAINS or EQUALS filtering on SUBJECT, TO, BCC, CC, and FROM. See the `MatchOptions` object for options. An example payload is `{ matches: [{field: 'SUBJECT',should:'CONTAIN',value:'needle'}] }`. You can use an array of matches and they will be applied sequentially to filter out emails. If you want to perform matches and extractions of content using Regex patterns see the EmailController `getEmailContentMatch` method. # @param inbox_id [String] Id of the inbox we are fetching emails from # @param count [Integer] Number of emails to wait for. Must be greater or equal to 1 # @param match_options [MatchOptions] # @param [Hash] opts the optional parameters # @option opts [DateTime] :before Filter for emails that were received before the given timestamp # @option opts [DateTime] :since Filter for emails that were received after the given timestamp # @option opts [String] :sort Sort direction # @option opts [Integer] :delay Max milliseconds delay between calls # @option opts [Integer] :timeout Max milliseconds to wait # @option opts [Boolean] :unread_only Optional filter for unread only (default to false) # @return [Array] def wait_for_matching_emails(inbox_id, count, match_options, opts = {}) data, _status_code, _headers = wait_for_matching_emails_with_http_info(inbox_id, count, match_options, opts) data end # Wait or return list of emails that match simple matching patterns # Perform a search of emails in an inbox with the given patterns. If results match expected count then return or else retry the search until results are found or timeout is reached. Match options allow simple CONTAINS or EQUALS filtering on SUBJECT, TO, BCC, CC, and FROM. See the `MatchOptions` object for options. An example payload is `{ matches: [{field: 'SUBJECT',should:'CONTAIN',value:'needle'}] }`. You can use an array of matches and they will be applied sequentially to filter out emails. If you want to perform matches and extractions of content using Regex patterns see the EmailController `getEmailContentMatch` method. # @param inbox_id [String] Id of the inbox we are fetching emails from # @param count [Integer] Number of emails to wait for. Must be greater or equal to 1 # @param match_options [MatchOptions] # @param [Hash] opts the optional parameters # @option opts [DateTime] :before Filter for emails that were received before the given timestamp # @option opts [DateTime] :since Filter for emails that were received after the given timestamp # @option opts [String] :sort Sort direction # @option opts [Integer] :delay Max milliseconds delay between calls # @option opts [Integer] :timeout Max milliseconds to wait # @option opts [Boolean] :unread_only Optional filter for unread only # @return [Array<(Array, Integer, Hash)>] Array data, response status code and response headers def wait_for_matching_emails_with_http_info(inbox_id, count, match_options, opts = {}) if @api_client.config.debugging @api_client.config.logger.debug 'Calling API: WaitForControllerApi.wait_for_matching_emails ...' 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 WaitForControllerApi.wait_for_matching_emails" end # verify the required parameter 'count' is set if @api_client.config.client_side_validation && count.nil? fail ArgumentError, "Missing the required parameter 'count' when calling WaitForControllerApi.wait_for_matching_emails" end if @api_client.config.client_side_validation && count < 1 fail ArgumentError, 'invalid value for "count" when calling WaitForControllerApi.wait_for_matching_emails, must be greater than or equal to 1.' end # verify the required parameter 'match_options' is set if @api_client.config.client_side_validation && match_options.nil? fail ArgumentError, "Missing the required parameter 'match_options' when calling WaitForControllerApi.wait_for_matching_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 = '/waitForMatchingEmails' # query parameters query_params = opts[:query_params] || {} query_params[:'inboxId'] = inbox_id query_params[:'count'] = count query_params[:'before'] = opts[:'before'] if !opts[:'before'].nil? query_params[:'since'] = opts[:'since'] if !opts[:'since'].nil? query_params[:'sort'] = opts[:'sort'] if !opts[:'sort'].nil? query_params[:'delay'] = opts[:'delay'] if !opts[:'delay'].nil? query_params[:'timeout'] = opts[:'timeout'] if !opts[:'timeout'].nil? query_params[:'unreadOnly'] = opts[:'unread_only'] if !opts[:'unread_only'].nil? # 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(match_options) # return_type return_type = opts[:return_type] || 'Array' # 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: WaitForControllerApi#wait_for_matching_emails\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end # Wait for or return the first email that matches provided MatchOptions array # Perform a search of emails in an inbox with the given patterns. If a result if found then return or else retry the search until a result is found or timeout is reached. Match options allow simple CONTAINS or EQUALS filtering on SUBJECT, TO, BCC, CC, and FROM. See the `MatchOptions` object for options. An example payload is `{ matches: [{field: 'SUBJECT',should:'CONTAIN',value:'needle'}] }`. You can use an array of matches and they will be applied sequentially to filter out emails. If you want to perform matches and extractions of content using Regex patterns see the EmailController `getEmailContentMatch` method. # @param inbox_id [String] Id of the inbox we are matching an email for # @param match_options [MatchOptions] # @param [Hash] opts the optional parameters # @option opts [Integer] :timeout Max milliseconds to wait # @option opts [Boolean] :unread_only Optional filter for unread only (default to false) # @option opts [DateTime] :since Filter for emails that were received after the given timestamp # @option opts [DateTime] :before Filter for emails that were received before the given timestamp # @option opts [String] :sort Sort direction # @option opts [Integer] :delay Max milliseconds delay between calls # @return [Email] def wait_for_matching_first_email(inbox_id, match_options, opts = {}) data, _status_code, _headers = wait_for_matching_first_email_with_http_info(inbox_id, match_options, opts) data end # Wait for or return the first email that matches provided MatchOptions array # Perform a search of emails in an inbox with the given patterns. If a result if found then return or else retry the search until a result is found or timeout is reached. Match options allow simple CONTAINS or EQUALS filtering on SUBJECT, TO, BCC, CC, and FROM. See the `MatchOptions` object for options. An example payload is `{ matches: [{field: 'SUBJECT',should:'CONTAIN',value:'needle'}] }`. You can use an array of matches and they will be applied sequentially to filter out emails. If you want to perform matches and extractions of content using Regex patterns see the EmailController `getEmailContentMatch` method. # @param inbox_id [String] Id of the inbox we are matching an email for # @param match_options [MatchOptions] # @param [Hash] opts the optional parameters # @option opts [Integer] :timeout Max milliseconds to wait # @option opts [Boolean] :unread_only Optional filter for unread only # @option opts [DateTime] :since Filter for emails that were received after the given timestamp # @option opts [DateTime] :before Filter for emails that were received before the given timestamp # @option opts [String] :sort Sort direction # @option opts [Integer] :delay Max milliseconds delay between calls # @return [Array<(Email, Integer, Hash)>] Email data, response status code and response headers def wait_for_matching_first_email_with_http_info(inbox_id, match_options, opts = {}) if @api_client.config.debugging @api_client.config.logger.debug 'Calling API: WaitForControllerApi.wait_for_matching_first_email ...' 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 WaitForControllerApi.wait_for_matching_first_email" end # verify the required parameter 'match_options' is set if @api_client.config.client_side_validation && match_options.nil? fail ArgumentError, "Missing the required parameter 'match_options' when calling WaitForControllerApi.wait_for_matching_first_email" 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 = '/waitForMatchingFirstEmail' # query parameters query_params = opts[:query_params] || {} query_params[:'inboxId'] = inbox_id query_params[:'timeout'] = opts[:'timeout'] if !opts[:'timeout'].nil? query_params[:'unreadOnly'] = opts[:'unread_only'] if !opts[:'unread_only'].nil? query_params[:'since'] = opts[:'since'] if !opts[:'since'].nil? query_params[:'before'] = opts[:'before'] if !opts[:'before'].nil? query_params[:'sort'] = opts[:'sort'] if !opts[:'sort'].nil? query_params[:'delay'] = opts[:'delay'] if !opts[:'delay'].nil? # 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(match_options) # return_type return_type = opts[:return_type] || 'Email' # 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: WaitForControllerApi#wait_for_matching_first_email\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end # Wait for or fetch the email with a given index in the inbox specified. If index doesn't exist waits for it to exist or timeout to occur. # If nth email is already present in inbox then return it. If not hold the connection open until timeout expires or the nth email is received and returned. # @param [Hash] opts the optional parameters # @option opts [String] :inbox_id Id of the inbox you are fetching emails from # @option opts [Integer] :index Zero based index of the email to wait for. If an inbox has 1 email already and you want to wait for the 2nd email pass index=1 (default to 0) # @option opts [Integer] :timeout Max milliseconds to wait for the nth email if not already present # @option opts [Boolean] :unread_only Optional filter for unread only (default to false) # @option opts [DateTime] :since Filter for emails that were received after the given timestamp # @option opts [DateTime] :before Filter for emails that were received before the given timestamp # @option opts [String] :sort Sort direction # @option opts [Integer] :delay Max milliseconds delay between calls # @return [Email] def wait_for_nth_email(opts = {}) data, _status_code, _headers = wait_for_nth_email_with_http_info(opts) data end # Wait for or fetch the email with a given index in the inbox specified. If index doesn't exist waits for it to exist or timeout to occur. # If nth email is already present in inbox then return it. If not hold the connection open until timeout expires or the nth email is received and returned. # @param [Hash] opts the optional parameters # @option opts [String] :inbox_id Id of the inbox you are fetching emails from # @option opts [Integer] :index Zero based index of the email to wait for. If an inbox has 1 email already and you want to wait for the 2nd email pass index=1 # @option opts [Integer] :timeout Max milliseconds to wait for the nth email if not already present # @option opts [Boolean] :unread_only Optional filter for unread only # @option opts [DateTime] :since Filter for emails that were received after the given timestamp # @option opts [DateTime] :before Filter for emails that were received before the given timestamp # @option opts [String] :sort Sort direction # @option opts [Integer] :delay Max milliseconds delay between calls # @return [Array<(Email, Integer, Hash)>] Email data, response status code and response headers def wait_for_nth_email_with_http_info(opts = {}) if @api_client.config.debugging @api_client.config.logger.debug 'Calling API: WaitForControllerApi.wait_for_nth_email ...' end if @api_client.config.client_side_validation && !opts[:'index'].nil? && opts[:'index'] > 2147483647 fail ArgumentError, 'invalid value for "opts[:"index"]" when calling WaitForControllerApi.wait_for_nth_email, must be smaller than or equal to 2147483647.' end if @api_client.config.client_side_validation && !opts[:'index'].nil? && opts[:'index'] < 0 fail ArgumentError, 'invalid value for "opts[:"index"]" when calling WaitForControllerApi.wait_for_nth_email, must be greater than or equal to 0.' 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 = '/waitForNthEmail' # query parameters query_params = opts[:query_params] || {} query_params[:'inboxId'] = opts[:'inbox_id'] if !opts[:'inbox_id'].nil? query_params[:'index'] = opts[:'index'] if !opts[:'index'].nil? query_params[:'timeout'] = opts[:'timeout'] if !opts[:'timeout'].nil? query_params[:'unreadOnly'] = opts[:'unread_only'] if !opts[:'unread_only'].nil? query_params[:'since'] = opts[:'since'] if !opts[:'since'].nil? query_params[:'before'] = opts[:'before'] if !opts[:'before'].nil? query_params[:'sort'] = opts[:'sort'] if !opts[:'sort'].nil? query_params[:'delay'] = opts[:'delay'] if !opts[:'delay'].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] || 'Email' # 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: WaitForControllerApi#wait_for_nth_email\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end end end