UNPKG

mpp-sdk

Version:

SDK to talk to the Memento Payments Platform

24 lines (23 loc) 746 B
"use strict"; Object.defineProperty(exports, "__esModule", { value: true }); const tslib_1 = require("tslib"); const base_1 = require("./base"); class ServiceInvoicesEndpoint extends base_1.BaseEndpoint { /** * Downloads the PDF for a service invoice. * Returns the raw binary data as an ArrayBuffer. */ getPDF(id) { return tslib_1.__awaiter(this, void 0, void 0, function* () { return this.doRequest({ url: `/service_invoices/${id}/pdf`, method: "GET", responseType: "arraybuffer", headers: { Accept: "application/pdf", }, }); }); } } exports.default = ServiceInvoicesEndpoint;