Skip to content

Latest commit

 

History

History
1372 lines (865 loc) · 50.6 KB

index.md

File metadata and controls

1372 lines (865 loc) · 50.6 KB

Index


Namespaces

Namespace: pdf

Defined in: src/bundle/index.ts


Class: pdf.SwissQRBill

Defined in: src/pdf/swissqrbill.ts

Description

The SwissQRBill class creates the Payment Part with the QR Code. It can be attached to any PDFKit document instance using the attachTo method.

Example
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 pdf = new PDFDocument({ autoFirstPage: false });
const qrBill = new SwissQRBill(data);

const stream = createWriteStream("qr-bill.pdf");

qrBill.attachTo(pdf);
pdf.pipe(stream);
pdf.end();

Constructor: new pdf.SwissQRBill(data[, options])

Defined in: src/pdf/swissqrbill.ts

Parameters
  • data Data The data to be used for the QR Bill.
  • options PDFOptions Options to define how the QR Bill should be rendered. optional
Return Type

SwissQRBill

Throws
Description

Creates a new SwissQRBill instance.


Property: pdf.SwissQRBill.width

public static readonly

Defined in: src/pdf/swissqrbill.ts

Type

number

Description

The horizontal size of the QR Bill.


Property: pdf.SwissQRBill.height

public static readonly

Defined in: src/pdf/swissqrbill.ts

Type

number

Description

The vertical size of the QR Bill.


Method: pdf.SwissQRBill.attachTo(doc[, x][, y])

public

Defined in: src/pdf/swissqrbill.ts

Parameters
  • doc PDFDocument The PDFKit instance.
  • x number The horizontal position in points where the QR Bill will be placed. optional Default: 0
  • y number The vertical position in points where the QR Bill will be placed. optional Default: number
Return Type

void

Description

Attaches the QR-Bill to a PDFKit document instance. It will create a new page with the size of the QR-Slip if not enough space is left on the current page.


Method: pdf.SwissQRBill.isSpaceSufficient(doc, xPosition, yPosition)

public static

Defined in: src/pdf/swissqrbill.ts

Parameters
  • doc PDFDocument The PDFKit document instance.
  • xPosition number The horizontal position where the QR Bill will be placed.
  • yPosition number The vertical position where the QR Bill will be placed.
Return Type

boolean true if there is enough space, otherwise false

Description

Checks whether there is enough space on the current page to add the QR Bill.


Class: pdf.SwissQRCode

Defined in: src/pdf/swissqrcode.ts


Constructor: new pdf.SwissQRCode(data[, size])

Defined in: src/pdf/swissqrcode.ts

Parameters
  • data Data The data to be encoded in the QR code.
  • size number The size of the QR code in mm. optional Default: 46
Return Type

SwissQRCode

Throws
Description

Creates a Swiss QR Code.


Method: pdf.SwissQRCode.attachTo(doc[, x][, y])

public

Defined in: src/pdf/swissqrcode.ts

Parameters
  • doc PDFDocument The PDF document to attach the Swiss QR Code to.
  • x number The horizontal position in points where the Swiss QR Code will be placed. optional Default: number
  • y number The vertical position in points where the Swiss QR Code will be placed. optional Default: number
Return Type

void

Description

Attaches the Swiss QR Code to a PDF document.


Class: pdf.Table

Defined in: src/pdf/table.ts

Description

The Table class is used to create tables for PDFKit documents. A table can be attached to any PDFKit document instance using the attachTo method.

Example
const tableData = {
  rows: [
    {
      backgroundColor: "#ECF0F1",
      columns: [
        {
          text: "Row 1 cell 1"
        }, {
          text: "Row 1 cell 2"
        }, {
          text: "Row 1 cell 3"
        }
      ]
    }, {
      columns: [
        {
          text: "Row 2 cell 1"
        }, {
          text: "Row 2 cell 2"
        }, {
          text: "Row 2 cell 3"
        }
      ]
    }
  ]
};
const pdf = new PDFDocument();
const table = new Table(tableData);

const stream = createWriteStream("table.pdf");

table.attachTo(pdf);
pdf.pipe(stream);
pdf.end();

Constructor: new pdf.Table(data)

Defined in: src/pdf/table.ts

Parameter
  • data PDFTable The rows and columns for the table.
Return Type

Table The Table instance.

Description

Creates a new Table instance.


Method: pdf.Table.attachTo(doc[, x][, y])

public

Defined in: src/pdf/table.ts

Parameters
  • doc PDFDocument The PDFKit document instance.
  • x number The horizontal position in points where the table be placed. optional Default: number
  • y number The vertical position in points where the table will be placed. optional Default: number
Return Type

void

Throws
  • Error Throws an error if no table rows are provided.
Description

Attaches the table to a PDFKit document instance beginning on the current page. It will create a new page with for every row that no longer fits on a page.


Type alias: pdf.PDFBorderColor

Defined in: src/pdf/table.ts

Type

union

Description

Can be used to set the color of the border of a table, row or column.


Type alias: pdf.PDFBorderWidth

Defined in: src/pdf/table.ts

Type

union

Description

Can be used to set the width of the border of a table, row or column.


Type alias: pdf.PDFPadding

Defined in: src/pdf/table.ts

Type

union

Description

Can be used to set the padding of a table cell.


Interface: pdf.PDFTable

Defined in: src/pdf/table.ts

  • pdf.rows Array Table rows.

  • pdf.align "center" | "left" | "right" Horizontal alignment of texts inside the table. optional

  • pdf.backgroundColor string Background color of the table. optional

  • pdf.borderColor PDFBorderColor The colors of the border. optional

  • pdf.borderWidth PDFBorderWidth Width of the borders of the row. optional

  • pdf.fontName string Font of the text inside the table. optional

  • pdf.fontSize number Font size of the text inside the table. optional

  • pdf.padding PDFPadding Cell padding of the table cells. optional

  • pdf.textColor string Text color of texts inside table. optional

  • pdf.textOptions TextOptions Same as text PDFKit text options. optional

  • pdf.verticalAlign "bottom" | "center" | "top" Vertical alignment of texts inside the table. optional

  • pdf.width number Width of whole table. optional


Interface: pdf.PDFRow

Defined in: src/pdf/table.ts

  • pdf.columns Array Table columns.

  • pdf.align "center" | "left" | "right" Horizontal alignment of texts inside the row. optional

  • pdf.backgroundColor string Background color of the row. optional

  • pdf.borderColor PDFBorderColor The colors of the border. optional

  • pdf.borderWidth PDFBorderWidth Width of the borders of the row. optional

  • pdf.fontName string Font of the text inside the row. optional

  • pdf.fontSize number Font size of the text inside the row. optional

  • pdf.header boolean A header row gets inserted automatically on new pages. Only one header row is allowed. optional

  • pdf.height number Height of the row. Overrides minHeight and maxHeight. optional

  • pdf.maxHeight number Maximum height of the row. optional

  • pdf.minHeight number Minimum height of the row. optional

  • pdf.padding PDFPadding Cell padding of the table cells inside the row. optional

  • pdf.textColor string Text color of texts inside the row. optional

  • pdf.textOptions TextOptions Same as text PDFKit text options. optional

  • pdf.verticalAlign "bottom" | "center" | "top" Vertical alignment of texts inside the row. optional


Interface: pdf.PDFColumn

Defined in: src/pdf/table.ts

  • pdf.text boolean | number | string Cell text.
  • pdf.align "center" | "left" | "right" Horizontal alignment of the text inside the cell. optional
  • pdf.backgroundColor string Background color of the cell. optional
  • pdf.borderColor PDFBorderColor The colors of the border. optional
  • pdf.borderWidth PDFBorderWidth Width of the borders of the row. optional
  • pdf.fontName string Font of the text inside the cell. optional
  • pdf.fontSize number Font size of the text inside the cell. optional
  • pdf.padding PDFPadding Cell padding of the table cell. optional
  • pdf.textColor string Text color of texts inside the cell. optional
  • pdf.textOptions TextOptions Same as text PDFKit text options. optional
  • pdf.verticalAlign "bottom" | "center" | "top" Vertical alignment of the text inside the cell. optional
  • pdf.width number Width of the cell. optional

Namespace: svg

Defined in: src/bundle/index.ts


Class: svg.SwissQRBill

Defined in: src/svg/swissqrbill.ts

Description

The SwissQRBill class creates the Payment Part with the QR Code as an SVG.

Example
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());

Constructor: new svg.SwissQRBill(data[, options])

Defined in: src/svg/swissqrbill.ts

Parameters
Return Type

SwissQRBill


Property: svg.SwissQRBill.instance

public

Defined in: src/svg/swissqrbill.ts

Type

SVG


Method: svg.SwissQRBill.toString()

public

Defined in: src/svg/swissqrbill.ts

Return Type

string The outerHTML of the SVG.

Description

Outputs the SVG as a string.


Getter: svg.SwissQRBill.element()

public

Defined in: src/svg/swissqrbill.ts

Return Type

SVGElement The SVG element.

Description

Returns the SVG element.


Class: svg.SwissQRCode

Defined in: src/svg/swissqrcode.ts


Constructor: new svg.SwissQRCode(data[, size])

Defined in: src/svg/swissqrcode.ts

Parameters
  • data Data The data to be encoded in the QR code.
  • size number The size of the QR code in mm. optional Default: 46
Return Type

SwissQRCode

Throws
Description

Creates a Swiss QR Code.


Property: svg.SwissQRCode.instance

public

Defined in: src/svg/swissqrcode.ts

Type

SVG


Method: svg.SwissQRCode.toString()

public

Defined in: src/svg/swissqrcode.ts

Return Type

string The outerHTML of the SVG element.

Description

Outputs the SVG as a string.


Getter: svg.SwissQRCode.element()

public

Defined in: src/svg/swissqrcode.ts

Return Type

SVGElement The SVG element.

Description

Returns the SVG element.


Namespace: types

Defined in: src/bundle/index.ts


Type alias: types.Language

Defined in: src/shared/types.ts

Type

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


Type alias: types.FontName

Defined in: src/shared/types.ts

Type

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


Type alias: types.Currency

Defined in: src/shared/types.ts

Type

"CHF" | "EUR"


Interface: types.Data

Defined in: src/shared/types.ts

  • types.creditor Creditor Creditor related data.

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

  • types.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

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

  • types.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

  • types.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

  • types.debtor Debtor Debtor related data. optional

  • types.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

  • types.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: types.Debtor

Defined in: src/shared/types.ts

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

Interface: types.Creditor

Defined in: src/shared/types.ts

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

Interface: types.PDFOptions

Defined in: src/shared/types.ts

  • types.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" });
  • types.language "DE" | "EN" | "FR" | "IT" The language with which the bill is rendered. optional

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

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

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


Interface: types.SVGOptions

Defined in: src/shared/types.ts

  • types.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" });
  • types.language "DE" | "EN" | "FR" | "IT" The language with which the bill is rendered. optional

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

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


Namespace: utils

Defined in: src/bundle/index.ts


Function: utils.isQRIBAN(iban)

Defined in: src/shared/utils.ts

Parameter
  • iban string The IBAN to be checked.
Return Type

boolean true if the given IBAN is a QR-IBAN and false

Description

Checks whether the given iban is a QR-IBAN or not.


Function: utils.isIBANValid(iban)

Defined in: src/shared/utils.ts

Parameter
  • iban string The IBAN to be checked.
Return Type

boolean true if the checksum of the given IBAN is valid and false

Description

Validates the given IBAN.


Function: utils.formatIBAN(iban)

Defined in: src/shared/utils.ts

Parameter
  • iban string The IBAN to be formatted.
Return Type

string The formatted IBAN.

Description

Formats the given IBAN according the specifications to be easily readable.


Function: utils.isQRReference(reference)

Defined in: src/shared/utils.ts

Parameter
  • reference string The Reference to be checked.
Return Type

boolean true if the given reference is a QR-Reference and false

Description

Checks whether the given reference is a QR-Reference or not.

Remark

The QR-Reference is a 27 digits long string containing only digits. The last digit is the checksum.


Function: utils.isQRReferenceValid(reference)

Defined in: src/shared/utils.ts

Parameter
  • reference string The reference to be checked.
Return Type

boolean true if the given reference is valid and false

Description

Validates the given QR-Reference.


Function: utils.isSCORReference(reference)

Defined in: src/shared/utils.ts

Parameter
  • reference string The Reference to be checked.
Return Type

boolean true if the given reference is a SCOR-Reference and false

Description

Checks whether the given reference is a SCOR-Reference or not.

Remark

The SCOR-Reference is an alphanumeric string beginning with 'RF' and containing a 2 digit checksum and a max 21 digits long reference.


Function: utils.isSCORReferenceValid(reference)

Defined in: src/shared/utils.ts

Parameter
  • reference string The reference to be checked.
Return Type

boolean true if the given reference is valid and false

Description

Validates the given SCOR-Reference.


Function: utils.calculateSCORReferenceChecksum(reference)

Defined in: src/shared/utils.ts

Parameter
  • reference string The max 21 digits long reference (without the "RF" and the 2 digit checksum) whose checksum should be calculated.
Return Type

string The calculated checksum as 2 digit string.

Description

Calculates the checksum according to the ISO 11649 standard.


Function: utils.calculateQRReferenceChecksum(reference)

Defined in: src/shared/utils.ts

Parameter
  • reference string The 26 digits long reference (without the checksum) whose checksum should be calculated.
Return Type

string The calculated checksum.

Description

Calculates the checksum according the specifications.


Function: utils.formatQRReference(reference)

Defined in: src/shared/utils.ts

Parameter
  • reference string The QR-Reference to be formatted.
Return Type

string The formatted QR-Reference.

Description

Formats the given QR-Reference according the specifications to be easily readable.


Function: utils.formatSCORReference(reference)

Defined in: src/shared/utils.ts

Parameter
  • reference string The SCOR-Reference to be formatted.
Return Type

string The formatted SCOR-Reference.

Description

Formats the given SCOR-Reference according the specifications to be easily readable.


Function: utils.formatReference(reference)

Defined in: src/shared/utils.ts

Parameter
  • reference string The reference to be formatted.
Return Type

string The formatted reference.

Description

Detects the type of the given reference and formats it according the specifications to be easily readable.


Function: utils.formatAmount(amount)

Defined in: src/shared/utils.ts

Parameter
  • amount number Containing the amount to be formatted.
Return Type

string The formatted amount.

Description

Formats the given amount according the specifications to be easily readable.


Function: utils.mm2pt(millimeters)

Defined in: src/shared/utils.ts

Parameter
  • millimeters number The millimeters you want to convert to points.
Return Type

number The converted millimeters in points.

Description

Converts millimeters to points.


Function: utils.pt2mm(points)

Defined in: src/shared/utils.ts

Parameter
  • points number The points you want to convert to millimeters.
Return Type

number The converted points in millimeters.

Description

Converts points to millimeters.


Function: utils.mm2px(millimeters)

Defined in: src/shared/utils.ts

Parameter
  • millimeters number The millimeters you want to convert to pixels.
Return Type

number The converted millimeters in pixels.

Description

Converts millimeters to pixels.


Function: utils.px2mm(pixels)

Defined in: src/shared/utils.ts

Parameter
  • pixels number Containing the pixels you want to convert to millimeters.
Return Type

number The converted pixels in millimeters.

Description

Converts pixels to millimeters.


Function: utils.getReferenceType(reference)

Defined in: src/shared/utils.ts

Parameter
Return Type

"NON" | "QRR" | "SCOR" The type of the given reference.

Description

Detects the type of the given reference.


Namespace: errors

Defined in: src/bundle/index.ts


Class: errors.ValidationError

Defined in: src/shared/errors.ts

Description

A ValidationError is thrown when the data provided to swissqrbill is invalid.


Property: errors.ValidationError.code

public

Defined in: src/shared/errors.ts

Type

union

  • "ACCOUNT_IS_QR_IBAN_BUT_REFERENCE_IS_MISSING"
  • "ACCOUNT_IS_QR_IBAN_BUT_REFERENCE_IS_REGULAR"
  • "ACCOUNT_IS_REGULAR_IBAN_BUT_REFERENCE_IS_QR"
  • "ACCOUNT_LENGTH_IS_INVALID"
  • "ADDITIONAL_INFORMATION_LENGTH_IS_INVALID"
  • "ADDITIONAL_INFORMATION_TYPE_IS_INVALID"
  • "ALTERNATIVE_SCHEME_LENGTH_IS_INVALID"
  • "ALTERNATIVE_SCHEME_TYPE_IS_INVALID"
  • "AMOUNT_LENGTH_IS_INVALID"
  • "AMOUNT_TYPE_IS_INVALID"
  • "CREDITOR_ACCOUNT_COUNTRY_IS_INVALID"
  • "CREDITOR_ACCOUNT_IS_INVALID"
  • "CREDITOR_ACCOUNT_IS_UNDEFINED"
  • "CREDITOR_ADDRESS_IS_UNDEFINED"
  • "CREDITOR_ADDRESS_LENGTH_IS_INVALID"
  • "CREDITOR_ADDRESS_TYPE_IS_INVALID"
  • "CREDITOR_BUILDING_NUMBER_LENGTH_IS_INVALID"
  • "CREDITOR_BUILDING_NUMBER_TYPE_IS_INVALID"
  • "CREDITOR_CITY_IS_UNDEFINED"
  • "CREDITOR_CITY_LENGTH_IS_INVALID"
  • "CREDITOR_CITY_TYPE_IS_INVALID"
  • "CREDITOR_COUNTRY_IS_UNDEFINED"
  • "CREDITOR_COUNTRY_LENGTH_IS_INVALID"
  • "CREDITOR_COUNTRY_TYPE_IS_INVALID"
  • "CREDITOR_IS_UNDEFINED"
  • "CREDITOR_NAME_IS_UNDEFINED"
  • "CREDITOR_NAME_LENGTH_IS_INVALID"
  • "CREDITOR_NAME_TYPE_IS_INVALID"
  • "CREDITOR_ZIP_IS_UNDEFINED"
  • "CREDITOR_ZIP_LENGTH_IS_INVALID"
  • "CREDITOR_ZIP_TYPE_IS_INVALID"
  • "CURRENCY_IS_UNDEFINED"
  • "CURRENCY_LENGTH_IS_INVALID"
  • "CURRENCY_STRING_IS_INVALID"
  • "CURRENCY_TYPE_IS_INVALID"
  • "DEBTOR_ADDRESS_IS_UNDEFINED"
  • "DEBTOR_ADDRESS_LENGTH_IS_INVALID"
  • "DEBTOR_ADDRESS_TYPE_IS_INVALID"
  • "DEBTOR_BUILDING_NUMBER_LENGTH_IS_INVALID"
  • "DEBTOR_BUILDING_NUMBER_TYPE_IS_INVALID"
  • "DEBTOR_CITY_IS_UNDEFINED"
  • "DEBTOR_CITY_LENGTH_IS_INVALID"
  • "DEBTOR_CITY_TYPE_IS_INVALID"
  • "DEBTOR_COUNTRY_IS_UNDEFINED"
  • "DEBTOR_COUNTRY_LENGTH_IS_INVALID"
  • "DEBTOR_COUNTRY_TYPE_IS_INVALID"
  • "DEBTOR_IS_UNDEFINED"
  • "DEBTOR_NAME_IS_UNDEFINED"
  • "DEBTOR_NAME_LENGTH_IS_INVALID"
  • "DEBTOR_NAME_TYPE_IS_INVALID"
  • "DEBTOR_ZIP_IS_UNDEFINED"
  • "DEBTOR_ZIP_LENGTH_IS_INVALID"
  • "DEBTOR_ZIP_TYPE_IS_INVALID"
  • "MESSAGE_AND_ADDITIONAL_INFORMATION_LENGTH_IS_INVALID"
  • "MESSAGE_LENGTH_IS_INVALID"
  • "MESSAGE_TYPE_IS_INVALID"
  • "QR_REFERENCE_IS_INVALID"
  • "QR_REFERENCE_LENGTH_IS_INVALID"
  • "REFERENCE_TYPE_IS_INVALID"
  • "REGULAR_REFERENCE_LENGTH_IS_INVALID"
Description

A stable error code that can be used to identify the error programmatically.


Enum: errors.ValidationErrors

Defined in: src/shared/errors.ts

  • ACCOUNT_IS_QR_IBAN_BUT_REFERENCE_IS_MISSING "If there is no reference, a conventional IBAN must be used."
  • ACCOUNT_IS_QR_IBAN_BUT_REFERENCE_IS_REGULAR "QR-IBAN requires the use of a QR-Reference."
  • ACCOUNT_IS_REGULAR_IBAN_BUT_REFERENCE_IS_QR "QR-Reference requires the use of a QR-IBAN."
  • ACCOUNT_LENGTH_IS_INVALID "The provided IBAN number '{iban}' is either too long or too short."
  • ADDITIONAL_INFORMATION_LENGTH_IS_INVALID "Additional information must be a maximum of 140 characters."
  • ADDITIONAL_INFORMATION_TYPE_IS_INVALID "Additional information must be a string."
  • ALTERNATIVE_SCHEME_LENGTH_IS_INVALID "{scheme} must be a maximum of 100 characters."
  • ALTERNATIVE_SCHEME_TYPE_IS_INVALID "{scheme} must be a string."
  • AMOUNT_LENGTH_IS_INVALID "Amount must be a maximum of 12 digits."
  • AMOUNT_TYPE_IS_INVALID "Amount must be a number."
  • CREDITOR_ACCOUNT_COUNTRY_IS_INVALID "Only CH and LI IBAN numbers are allowed."
  • CREDITOR_ACCOUNT_IS_INVALID "The provided IBAN number '{iban}' is not valid."
  • CREDITOR_ACCOUNT_IS_UNDEFINED "Creditor account cannot be undefined."
  • CREDITOR_ADDRESS_IS_UNDEFINED "Creditor address cannot be undefined."
  • CREDITOR_ADDRESS_LENGTH_IS_INVALID "Creditor address must be a maximum of 70 characters."
  • CREDITOR_ADDRESS_TYPE_IS_INVALID "Creditor address TYPE must be a string."
  • CREDITOR_BUILDING_NUMBER_LENGTH_IS_INVALID "Creditor buildingNumber must be a maximum of 16 characters."
  • CREDITOR_BUILDING_NUMBER_TYPE_IS_INVALID "Creditor buildingNumber must be either a string or a number."
  • CREDITOR_CITY_IS_UNDEFINED "Creditor city cannot be undefined."
  • CREDITOR_CITY_LENGTH_IS_INVALID "Creditor city must be a maximum of 35 characters."
  • CREDITOR_CITY_TYPE_IS_INVALID "Creditor city must be a string."
  • CREDITOR_COUNTRY_IS_UNDEFINED "Creditor country cannot be undefined."
  • CREDITOR_COUNTRY_LENGTH_IS_INVALID "Creditor country must be 2 characters."
  • CREDITOR_COUNTRY_TYPE_IS_INVALID "Creditor country must be a string."
  • CREDITOR_IS_UNDEFINED "Creditor cannot be undefined."
  • CREDITOR_NAME_IS_UNDEFINED "Creditor name cannot be undefined."
  • CREDITOR_NAME_LENGTH_IS_INVALID "Creditor name must be a maximum of 70 characters."
  • CREDITOR_NAME_TYPE_IS_INVALID "Creditor name must be a string."
  • CREDITOR_ZIP_IS_UNDEFINED "Creditor zip cannot be undefined."
  • CREDITOR_ZIP_LENGTH_IS_INVALID "Creditor zip must be a maximum of 16 characters."
  • CREDITOR_ZIP_TYPE_IS_INVALID "Creditor zip must be either a string or a number."
  • CURRENCY_IS_UNDEFINED "Currency cannot be undefined."
  • CURRENCY_LENGTH_IS_INVALID "Currency must be a length of 3 characters."
  • CURRENCY_STRING_IS_INVALID "Currency must be either 'CHF' or 'EUR'"
  • CURRENCY_TYPE_IS_INVALID "Currency must be a string."
  • DEBTOR_ADDRESS_IS_UNDEFINED "Debtor address cannot be undefined."
  • DEBTOR_ADDRESS_LENGTH_IS_INVALID "Debtor address must be a maximum of 70 characters."
  • DEBTOR_ADDRESS_TYPE_IS_INVALID "Debtor address TYPE must be a string."
  • DEBTOR_BUILDING_NUMBER_LENGTH_IS_INVALID "Debtor buildingNumber must be a maximum of 16 characters."
  • DEBTOR_BUILDING_NUMBER_TYPE_IS_INVALID "Debtor buildingNumber must be either a string or a number."
  • DEBTOR_CITY_IS_UNDEFINED "Debtor city cannot be undefined."
  • DEBTOR_CITY_LENGTH_IS_INVALID "Debtor city must be a maximum of 35 characters."
  • DEBTOR_CITY_TYPE_IS_INVALID "Debtor city must be a string."
  • DEBTOR_COUNTRY_IS_UNDEFINED "Debtor country cannot be undefined."
  • DEBTOR_COUNTRY_LENGTH_IS_INVALID "Debtor country must be 2 characters."
  • DEBTOR_COUNTRY_TYPE_IS_INVALID "Debtor country must be a string."
  • DEBTOR_IS_UNDEFINED "Debtor cannot be undefined."
  • DEBTOR_NAME_IS_UNDEFINED "Debtor name cannot be undefined."
  • DEBTOR_NAME_LENGTH_IS_INVALID "Debtor name must be a maximum of 70 characters."
  • DEBTOR_NAME_TYPE_IS_INVALID "Debtor name must be a string."
  • DEBTOR_ZIP_IS_UNDEFINED "Debtor zip cannot be undefined."
  • DEBTOR_ZIP_LENGTH_IS_INVALID "Debtor zip must be a maximum of 16 characters."
  • DEBTOR_ZIP_TYPE_IS_INVALID "Debtor zip must be either a string or a number."
  • MESSAGE_AND_ADDITIONAL_INFORMATION_LENGTH_IS_INVALID "Message and additionalInformation combined must be a maximum of 140 characters."
  • MESSAGE_LENGTH_IS_INVALID "Message must be a maximum of 140 characters."
  • MESSAGE_TYPE_IS_INVALID "Message must be a string."
  • QR_REFERENCE_IS_INVALID "The provided QR-Reference '{reference}' is not valid."
  • QR_REFERENCE_LENGTH_IS_INVALID "QR-Reference must be a must be exactly 27 characters."
  • REFERENCE_TYPE_IS_INVALID "Reference must be a string."
  • REGULAR_REFERENCE_LENGTH_IS_INVALID "Creditor reference must be a maximum of 25 characters."