UNPKG

@softvision/webpdf-wsclient-typescript

Version:

A simplified and optimized API client library for the webPDF server

54 lines 3.52 kB
"use strict"; Object.defineProperty(exports, "__esModule", { value: true }); exports.ZugferdFileData = void 0; class ZugferdFileData { constructor(data) { let sourceDefault = "value"; this.source = typeof (data === null || data === void 0 ? void 0 : data.source) !== "undefined" ? data === null || data === void 0 ? void 0 : data.source : sourceDefault; let uriDefault = ""; this.uri = typeof (data === null || data === void 0 ? void 0 : data.uri) !== "undefined" ? data === null || data === void 0 ? void 0 : data.uri : uriDefault; this.value = data === null || data === void 0 ? void 0 : data.value; let versionDefault = "v10Comfort"; this.version = typeof (data === null || data === void 0 ? void 0 : data.version) !== "undefined" ? data === null || data === void 0 ? void 0 : data.version : versionDefault; } static getSourceDefault() { return "value"; } static getSourceDescription() { return "Selects the data source for the hereby expressed resource. Possible values are:\n\n* value = The element's value shall contain the BASE64 encoded data.\n* uri = The data shall be located at the given uri."; } static getUriDefault() { return ""; } static getUriDescription() { return "The uri the data shall be located at. (This shall only have effect, if the \"source\" is \"uri\".)"; } static getValueDescription() { return ""; } static getVersionDefault() { return "v10Comfort"; } static getVersionDescription() { return "Used to define the version of the ZUGFeRD XML file that should be embedded with \"xmlFile\". Versions from 1.0 to 2.3 are supported. Only the \"Comfort\" profile is available for version 1.0. Meanwhile, the \"Minimum\", \"Basic WL\", \"Basic\", \"EN16931\" (Comfort), and \"Extended\" profiles are supported for version 2.0.\n\n**Note:** Since version 2.x, the referenced profile \"XRECHNUNG\" is additionally available. This profile has been included specifically to include invoices for Germany, based on and under the sole responsibility of KoSIT, Germany's central coordination agency for IT's e-invoice CIUS \"XRechnung\". It is defined as the Standard for electronic invoices issued to public administrations, and essentially adds specific business rules to EN 16931 in order to comply with national laws and regulations.\n\n**Note:** Since version 2.1.1 ZUGFeRD and Factur-X are technically identical, and both formats use Factur-X as common identification.\n\nList of versions with the corresponding profiles:\n\n* v10Comfort\n* v20Minimum\n* v20BasicWL\n* v20Basic\n* v20EN16931\n* v20Extended\n* v21Minimum\n* v21BasicWL\n* v21Basic\n* v21EN16931\n* v21Extended\n* v21XRechnung\n* v22Minimum\n* v22BasicWL\n* v22Basic\n* v22EN16931\n* v22Extended\n* v22XRechnung\n* v23Minimum\n* v23BasicWL\n* v23Basic\n* v23EN16931\n* v23Extended\n* v23XRechnung"; } static fromJson(data) { if (data === undefined || data === null) { return data; } return new ZugferdFileData(data); } toJson() { return { 'source': this.source, 'uri': this.uri, 'value': this.value, 'version': this.version, }; } clone() { return ZugferdFileData.fromJson(this.toJson()); } } exports.ZugferdFileData = ZugferdFileData; //# sourceMappingURL=ZugferdFileData.js.map