Skip to content

be: read every transaction of an e-mail with readAll, and csob's ceb notice from public samples - #44

Merged
landsman merged 1 commit into
mainfrom
csob-cz
Nov 10, 2026
Merged

landsman merged 1 commit into
mainfrom
csob-cz

Conversation

@landsman

Copy link
Copy Markdown
Owner

ČSOB's CEB notification can report several booked transactions in one e-mail, which read() could not return. This adds readAll() and ČSOB.

readAll(rawMessage) returns every transaction, in order, once the signature verified; for any other bank, a list of one. read() is now readAll() with exactly one expected, and refuses several rather than return one of them. Bank.parseAll defaults to List.of(parse(...)); only ČSOB overrides it. The transactions share one messageId(), so the docs say to deduplicate on it and the position in the list.

ČSOB CEB, from tomaj/bank-mails-parser's fixtures (MIT), samples only: no key pinned (the 2020 selector alpha is gone), synthetic fixtures with valid fake accounts.

  • The balances chain: with several blocks, each balance must be the previous plus the block's amount, and every block needs its balance. A block forged in a payer's message takes the real block's balance away, which this refuses; tomaj's parser lists the no-balance case as a known limitation.
  • Per block: the sentence's account is the Účet line's (/0300 added), the currency is the account's, the sign the direction, an incoming kind with a minus refused; nothing labelled may follow Zpráva příjemci.
  • Kinds: Došlá platba, Došlá úhrada, Příchozí úhrada (okamžitá too), and the card sentence transakce platební kartou. SEPA, foreign and cash payments have sentences of their own and IBANs, and stay Unparsed. A first draft claimed SEPA and matched the card sentence wrongly; checked against the fixtures and corrected before this PR.
  • ČSOB's newer own-banking notification (labels on their own lines, as in myinvoice) is not read yet.

Each of five guards was broken in turn and a test failed for each; the one for a symbol after the message was missing at first and is added. make build: green.

@landsman
landsman merged commit 11aacc1 into main Nov 10, 2026
5 checks passed
@landsman
landsman deleted the csob-cz branch November 10, 2026 22:25
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant