e-invoice-api
Version:
The official TypeScript library for the e-invoice API
33 lines • 1.47 kB
JavaScript
;
// File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
Object.defineProperty(exports, "__esModule", { value: true });
exports.Validate = void 0;
const resource_1 = require("../core/resource.js");
const uploads_1 = require("../internal/uploads.js");
class Validate extends resource_1.APIResource {
/**
* Validate if the JSON document can be converted to a valid UBL document
*/
validateJson(body, options) {
return this._client.post('/api/validate/json', { body, ...options });
}
/**
* Validate if a Peppol ID exists in the Peppol network and retrieve supported
* document types. The peppol_id must be in the form of `<scheme>:<id>`. The scheme
* is a 4-digit code representing the identifier scheme, and the id is the actual
* identifier value. For example, for a Belgian company it is `0208:0123456789`
* (where 0208 is the scheme for Belgian enterprises, followed by the 10 digits of
* the official BTW / KBO number).
*/
validatePeppolID(query, options) {
return this._client.get('/api/validate/peppol-id', { query, ...options });
}
/**
* Validate the correctness of a UBL document
*/
validateUbl(body, options) {
return this._client.post('/api/validate/ubl', (0, uploads_1.multipartFormRequestOptions)({ body, ...options }, this._client));
}
}
exports.Validate = Validate;
//# sourceMappingURL=validate.js.map