Skip to content

Instantly share code, notes, and snippets.

@ChrisGrigg
Created January 24, 2018 01:05
Show Gist options
  • Save ChrisGrigg/8a15c30c5d8a3b203e25454abf360537 to your computer and use it in GitHub Desktop.
Save ChrisGrigg/8a15c30c5d8a3b203e25454abf360537 to your computer and use it in GitHub Desktop.
xeroClient.core.invoices.getInvoice(req.body.invoiceID, null, null, null, null, "application/pdf")
.then((data) => {
console.log(`data ${JSON.stringify(data)}`);
fs.writeFile(data.FileName, data.PdfContentRaw, 'binary', function(){
// Do something with the file
});
});
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment