As described here: https://developer.intuit.com/app/developer/qbo/docs/api/accounting/all-entities/invoice#get-an-invoice-as-pdf
I've drafted a PoC in my fork: master...tuarrep:patch-2
Basically I allowed overriding headers (Accept must be application/pdf) and added an option to get result as Array Buffer instead of JSON.
It's not wrapped in a method, I use doFetch like this:
await QuickBooks.doFetch("GET", `/invoice/${id}/pdf`, {}, null,
{
asBuffer: true,
headers: { Accept: "application/pdf" },
}
)
As described here: https://developer.intuit.com/app/developer/qbo/docs/api/accounting/all-entities/invoice#get-an-invoice-as-pdf
I've drafted a PoC in my fork: master...tuarrep:patch-2
Basically I allowed overriding headers (Accept must be application/pdf) and added an option to get result as Array Buffer instead of JSON.
It's not wrapped in a method, I use
doFetchlike this: