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

      let pathParams = {
      };
      let queryParams = {
        'inboxId': opts['inboxId'],
        '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(
        '/waitForLatestEmail', 'GET',
        pathParams, queryParams, headerParams, formParams, postBody,
        authNames, contentTypes, accepts, returnType
      );
    }
/**
     * 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 {Object} opts Optional parameters
     * @param {String} opts.inboxId Id of the inbox we are fetching emails from
     * @param {Number} opts.timeout Max milliseconds to wait
     * @param {Boolean} opts.unreadOnly Optional filter for unread only. (default to false)
     * @return {Promise<Email>}
     */
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.
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 .
async waitForLatestEmail(opts) {
      opts = opts || {};
      let postBody = null;
      let pathParams = {
      };
      let queryParams = {
        'inboxId': opts['inboxId'],
        '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(
        '/waitForLatestEmail', 'GET',
        pathParams, queryParams, headerParams, formParams, postBody,
        authNames, contentTypes, accepts, returnType
      );
    }
async waitForLatestEmail ( opts ) { opts = opts || { } ; let postBody = null ; let pathParams = { } ; let queryParams = { 'inboxId' : opts [ 'inboxId' ] , '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 ( '/waitForLatestEmail' , 'GET' , pathParams , queryParams , headerParams , formParams , postBody , authNames , contentTypes , accepts , returnType ) ; }
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.
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 .