e-invoice-api
Version:
The official TypeScript library for the e-invoice API
23 lines • 896 B
JavaScript
;
// File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
Object.defineProperty(exports, "__esModule", { value: true });
exports.Ubl = void 0;
const resource_1 = require("../../core/resource.js");
const uploads_1 = require("../../internal/uploads.js");
const path_1 = require("../../internal/utils/path.js");
class Ubl extends resource_1.APIResource {
/**
* Create a new invoice or credit note from a UBL file
*/
createFromUbl(body, options) {
return this._client.post('/api/documents/ubl', (0, uploads_1.multipartFormRequestOptions)({ body, ...options }, this._client));
}
/**
* Get the UBL for an invoice or credit note
*/
get(documentID, options) {
return this._client.get((0, path_1.path) `/api/documents/${documentID}/ubl`, options);
}
}
exports.Ubl = Ubl;
//# sourceMappingURL=ubl.js.map