async waitForNthEmail(opts) {
      opts = opts || {};
      let postBody = null;

      let pathParams = {
      };
      let queryParams = {
        'inboxId': opts['inboxId'],
        'index': opts['index'],
        'timeout': opts['timeout'],
        'unreadOnly': opts['unreadOnly']
      };
      let headerParams = {
      };
      let formParams = {
      };

      let authNames = ['API_KEY'];
      let contentTypes = [];
      let accepts = ['application/json'];
      let returnType = Email;

      return this.callApi(
        '/waitForNthEmail', 'GET',
        pathParams, queryParams, headerParams, formParams, postBody,
        authNames, contentTypes, accepts, returnType
      );
    }
/**
     * Wait for or fetch the email with a given index in the inbox specified
     * 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 {Object} opts Optional parameters
     * @param {String} opts.inboxId Id of the inbox you are fetching emails from
     * @param {Number} opts.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)
     * @param {Number} opts.timeout Max milliseconds to wait for the nth email if not already present
     * @param {Boolean} opts.unreadOnly Optional filter for unread only (default to false)
     * @return {Promise<Email>}
     */
Wait for or fetch the email with a given index in the inbox specified
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 {Object} opts Optional parameters
@param {String} opts.inboxId Id of the inbox you are fetching emails from
@param {Number} opts.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)
@param {Number} opts.timeout Max milliseconds to wait for the nth email if not already present
@param {Boolean} opts.unreadOnly Optional filter for unread only (default to false)
@return {Promise}
Wait for or fetch the email with a given index in the inbox specified 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 { Object } opts Optional parameters @param { String } opts . inboxId Id of the inbox you are fetching emails from @param { Number } opts . 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 ) @param { Number } opts . timeout Max milliseconds to wait for the nth email if not already present @param { Boolean } opts . unreadOnly Optional filter for unread only ( default to false ) @return { Promise }
async waitForNthEmail(opts) {
      opts = opts || {};
      let postBody = null;
      let pathParams = {
      };
      let queryParams = {
        'inboxId': opts['inboxId'],
        'index': opts['index'],
        'timeout': opts['timeout'],
        'unreadOnly': opts['unreadOnly']
      };
      let headerParams = {
      };
      let formParams = {
      };
      let authNames = ['API_KEY'];
      let contentTypes = [];
      let accepts = ['application/json'];
      let returnType = Email;
      return this.callApi(
        '/waitForNthEmail', 'GET',
        pathParams, queryParams, headerParams, formParams, postBody,
        authNames, contentTypes, accepts, returnType
      );
    }
async waitForNthEmail ( opts ) { opts = opts || { } ; let postBody = null ; let pathParams = { } ; let queryParams = { 'inboxId' : opts [ 'inboxId' ] , 'index' : opts [ 'index' ] , 'timeout' : opts [ 'timeout' ] , 'unreadOnly' : opts [ 'unreadOnly' ] } ; let headerParams = { } ; let formParams = { } ; let authNames = [ 'API_KEY' ] ; let contentTypes = [ ] ; let accepts = [ 'application/json' ] ; let returnType = Email ; return this . callApi ( '/waitForNthEmail' , 'GET' , pathParams , queryParams , headerParams , formParams , postBody , authNames , contentTypes , accepts , returnType ) ; }
Wait for or fetch the email with a given index in the inbox specified
 If nth email is already present in inbox then return it.
Wait for or fetch the email with a given index in the inbox specified If nth email is already present in inbox then return it .