-
Classes
-
- Constructor
- Property
- Method
- Getter
-
- Constructor
- Property
- Method
- Getter
-
Defined in: src/svg/swissqrbill.ts
The SwissQRBill class creates the Payment Part with the QR Code as an SVG.
const data = {
amount: 1994.75,
creditor: {
account: "CH44 3199 9123 0008 8901 2",
address: "Musterstrasse",
buildingNumber: 7,
city: "Musterstadt",
country: "CH",
name: "SwissQRBill",
zip: 1234
},
currency: "CHF",
debtor: {
address: "Musterstrasse",
buildingNumber: 1,
city: "Musterstadt",
country: "CH",
name: "Peter Muster",
zip: 1234
},
reference: "21 00000 00003 13947 14300 09017"
};
const svg = new SwissQRBill(data);
writeFileSync("qr-bill.svg", svg.toString());
Defined in: src/svg/swissqrbill.ts
- data
Data
- options
SVGOptions
optional
public
Defined in: src/svg/swissqrbill.ts
SVG
public
Defined in: src/svg/swissqrbill.ts
string
The outerHTML of the SVG.
Outputs the SVG as a string.
public
Defined in: src/svg/swissqrbill.ts
SVGElement
The SVG element.
Returns the SVG element.
Defined in: src/svg/swissqrcode.ts
Defined in: src/svg/swissqrcode.ts
- data
Data
The data to be encoded in the QR code. - size
number
The size of the QR code in mm.optional
Default:46
ValidationError
Throws an error if the data is invalid.
Creates a Swiss QR Code.
public
Defined in: src/svg/swissqrcode.ts
SVG
public
Defined in: src/svg/swissqrcode.ts
string
The outerHTML of the SVG element.
Outputs the SVG as a string.
public
Defined in: src/svg/swissqrcode.ts
SVGElement
The SVG element.
Returns the SVG element.