Skip to content

Latest commit

 

History

History
144 lines (94 loc) · 7.97 KB

types.md

File metadata and controls

144 lines (94 loc) · 7.97 KB

Types


Type aliases

Type alias: Language

Defined in: src/shared/types.ts

Type

"DE" | "EN" | "FR" | "IT"


Type alias: FontName

Defined in: src/shared/types.ts

Type

"Arial" | "Frutiger" | "Helvetica" | "Liberation Sans"


Type alias: Currency

Defined in: src/shared/types.ts

Type

"CHF" | "EUR"


Interface: Data

Defined in: src/shared/types.ts

  • creditor Creditor Creditor related data.

  • currency "CHF" | "EUR" The currency to be used. 3 characters..

  • additionalInformation string Additional information. Max 140 characters..

    Bill information contain coded information for automated booking of the payment. The data is not forwarded with the payment. optional

  • amount number The amount. Max. 12 digits.. optional

  • av1 string Alternative scheme. Max. 100 characters..

    Parameter character chain of the alternative scheme according to the syntax definition in the “Alternative scheme” section. optional

  • av2 string Alternative scheme. Max. 100 characters..

    Parameter character chain of the alternative scheme according to the syntax definition in the “Alternative scheme” section. optional

  • debtor Debtor Debtor related data. optional

  • message string A message. Max. 140 characters..

    Message can be used to indicate the payment purpose or for additional textual information about payments with a structured reference. optional

  • reference string A reference number. Max 27 characters..

    QR-IBAN: Maximum 27 characters. Must be filled if a QR-IBAN is used. Creditor Reference (ISO 11649): Maximum 25 characters. optional


Interface: Debtor

Defined in: src/shared/types.ts

  • address string Address. Max 70 characters..
  • city string City. Max 35 characters..
  • country string Country code. 2 characters..
  • name string Name. Max. 70 characters..
  • zip number | string Postal code. Max 16 characters..
  • buildingNumber number | string Building number. Max 16 characters.. optional

Interface: Creditor

Defined in: src/shared/types.ts

  • address string Address. Max 70 characters..
  • city string City. Max 35 characters..
  • country string Country code. 2 characters..
  • name string Name. Max. 70 characters..
  • zip number | string Postal code. Max 16 characters..
  • buildingNumber number | string Building number. Max 16 characters.. optional
  • account string The IBAN. 21 characters..

Interface: PDFOptions

Defined in: src/shared/types.ts

  • fontName "Arial" | "Frutiger" | "Helvetica" | "Liberation Sans" Font used for the QR-Bill. Fonts other than Helvetica must be registered in the PDFKit document. http://pdfkit.org/docs/text.html#fonts . optional

    Example:

    // Register the font
    pdf.registerFont("Liberation-Sans", "path/to/LiberationSans-Regular.ttf");
    pdf.registerFont("Liberation-Sans-Bold", "path/to/LiberationSans-Bold.ttf");
    const qrBill = new SwissQRBill(data, { fontName: "Liberation-Sans" });
  • language "DE" | "EN" | "FR" | "IT" The language with which the bill is rendered. optional

  • outlines boolean Whether you want render the outlines. This option may be disabled if you use perforated paper. optional

  • scissors boolean Whether you want to show the scissors icons or the text Separate before paying in optional

  • separate boolean Whether you want to show the text Separate before paying in optional


Interface: SVGOptions

Defined in: src/shared/types.ts

  • fontName "Arial" | "Frutiger" | "Helvetica" | "Liberation Sans" Font used for the QR-Bill. Fonts other than Helvetica must be registered in the PDFKit document. http://pdfkit.org/docs/text.html#fonts . optional

    Example:

    // Register the font
    pdf.registerFont("Liberation-Sans", "path/to/LiberationSans-Regular.ttf");
    pdf.registerFont("Liberation-Sans-Bold", "path/to/LiberationSans-Bold.ttf");
    const qrBill = new SwissQRBill(data, { fontName: "Liberation-Sans" });
  • language "DE" | "EN" | "FR" | "IT" The language with which the bill is rendered. optional

  • outlines boolean Whether you want render the outlines. This option may be disabled if you use perforated paper. optional

  • scissors boolean Whether you want to show the scissors icons or the text Separate before paying in optional