TransactionParser
    Preparing search index...

    Interface ITransaction

    ITransaction is a helper interface for the representation of a transaction

    A transaction represents one entity in a TransactionPackage and uses a copybook to determine which elements a transaction has

    interface ITransaction {
        getCopybookItem(name: string): ICopybookItem | undefined;
        getCopybookItems(): ICopybookItem[];
        getValue(name: string): string | undefined;
        setValue(name: string, value: string): void;
        toBuffer(): Buffer;
        toJson(): string;
    }

    Implemented by

    Index

    Methods

    • Set the value of a specific ICopybookItem based on the name of the item.

      Parameters

      • name: string

        Name of the copybook item

      • value: string

        String representation of the value

      Returns void

    • Convert the transaction to a Buffer that can be used to write contents of the transaction to a file

      Returns Buffer

      {Buffer}