async downloadAttachment(attachmentId, emailId, opts) {
      opts = opts || {};
      let postBody = null;
      // verify the required parameter 'attachmentId' is set
      if (attachmentId === undefined || attachmentId === null) {
        throw new Error("Missing the required parameter 'attachmentId' when calling downloadAttachment");
      }
      // verify the required parameter 'emailId' is set
      if (emailId === undefined || emailId === null) {
        throw new Error("Missing the required parameter 'emailId' when calling downloadAttachment");
      }

      let pathParams = {
        'attachmentId': attachmentId,
        'emailId': emailId
      };
      let queryParams = {
        'apiKey': opts['apiKey']
      };
      let headerParams = {
      };
      let formParams = {
      };

      let authNames = ['API_KEY'];
      let contentTypes = [];
      let accepts = ['application/octet-stream'];
      let returnType = 'Blob';

      return this.callApi(
        '/emails/{emailId}/attachments/{attachmentId}', 'GET',
        pathParams, queryParams, headerParams, formParams, postBody,
        authNames, contentTypes, accepts, returnType
      );
    }
/**
     * Get email attachment bytes. If you have trouble with byte responses try the `downloadAttachmentBase64` response endpoints.
     * Returns the specified attachment for a given email as a stream / array of bytes. You can find attachment ids in email responses endpoint responses. The response type is application/octet-stream.
     * @param {String} attachmentId ID of attachment
     * @param {String} emailId ID of email
     * @param {Object} opts Optional parameters
     * @param {String} opts.apiKey Can pass apiKey in url for this request if you wish to download the file in a browser. Content type will be set to original content type of the attachment file. This is so that browsers can download the file correctly.
     * @return {Promise<Blob>}
     */
Get email attachment bytes. If you have trouble with byte responses try the `downloadAttachmentBase64` response endpoints.
Returns the specified attachment for a given email as a stream / array of bytes. You can find attachment ids in email responses endpoint responses. The response type is application/octet-stream.
@param {String} attachmentId ID of attachment
@param {String} emailId ID of email
@param {Object} opts Optional parameters
@param {String} opts.apiKey Can pass apiKey in url for this request if you wish to download the file in a browser. Content type will be set to original content type of the attachment file. This is so that browsers can download the file correctly.
@return {Promise}
Get email attachment bytes . If you have trouble with byte responses try the ` downloadAttachmentBase64 ` response endpoints . Returns the specified attachment for a given email as a stream / array of bytes . You can find attachment ids in email responses endpoint responses . The response type is application / octet - stream . @param { String } attachmentId ID of attachment @param { String } emailId ID of email @param { Object } opts Optional parameters @param { String } opts . apiKey Can pass apiKey in url for this request if you wish to download the file in a browser . Content type will be set to original content type of the attachment file . This is so that browsers can download the file correctly . @return { Promise }
async downloadAttachment(attachmentId, emailId, opts) {
      opts = opts || {};
      let postBody = null;
      if (attachmentId === undefined || attachmentId === null) {
        throw new Error("Missing the required parameter 'attachmentId' when calling downloadAttachment");
      }
      if (emailId === undefined || emailId === null) {
        throw new Error("Missing the required parameter 'emailId' when calling downloadAttachment");
      }
      let pathParams = {
        'attachmentId': attachmentId,
        'emailId': emailId
      };
      let queryParams = {
        'apiKey': opts['apiKey']
      };
      let headerParams = {
      };
      let formParams = {
      };
      let authNames = ['API_KEY'];
      let contentTypes = [];
      let accepts = ['application/octet-stream'];
      let returnType = 'Blob';
      return this.callApi(
        '/emails/{emailId}/attachments/{attachmentId}', 'GET',
        pathParams, queryParams, headerParams, formParams, postBody,
        authNames, contentTypes, accepts, returnType
      );
    }
async downloadAttachment ( attachmentId , emailId , opts ) { opts = opts || { } ; let postBody = null ; if ( attachmentId === undefined || attachmentId === null ) { throw new Error ( "Missing the required parameter 'attachmentId' when calling downloadAttachment" ) ; } if ( emailId === undefined || emailId === null ) { throw new Error ( "Missing the required parameter 'emailId' when calling downloadAttachment" ) ; } let pathParams = { 'attachmentId' : attachmentId , 'emailId' : emailId } ; let queryParams = { 'apiKey' : opts [ 'apiKey' ] } ; let headerParams = { } ; let formParams = { } ; let authNames = [ 'API_KEY' ] ; let contentTypes = [ ] ; let accepts = [ 'application/octet-stream' ] ; let returnType = 'Blob' ; return this . callApi ( '/emails/{emailId}/attachments/{attachmentId}' , 'GET' , pathParams , queryParams , headerParams , formParams , postBody , authNames , contentTypes , accepts , returnType ) ; }
Get email attachment bytes.
Get email attachment bytes .
// verify the required parameter 'attachmentId' is set // verify the required parameter 'emailId' is set