Expose the credit card merchant as a separate field - #590
Open
jwtue wants to merge 1 commit into
Open
Conversation
GetCreditCardStatement so far exposed the Verwendungszweck only as a single joined string via getPurpose(), which concatenates the merchant name with the merchant location and the masked card number. That string is unsuitable as a counterparty name, because the same merchant yields a different purpose per location and per card. Keep the individual Verwendungszweck lines on CreditCardTransaction and add getPurposeLines() plus getMerchant() (the first line, usually the merchant). getPurpose() is unchanged.
jwtue
marked this pull request as ready for review
September 7, 2026 11:16
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Follow-up to #574.
GetCreditCardStatementexposes the Verwendungszweck only throughgetPurpose(), which joins all lines into a single string: the merchant name together with themerchant location and the masked card number, e.g.
EXAMPLE SHOP BERLIN 555500******2233.That string is a poor counterparty name. The same merchant yields a different purpose per location
and per card, so anything that groups by counterparty — for instance naming an expense account in a
bookkeeping tool — fragments one merchant into many.
Changes:
CreditCardTransactioninstead of discarding themafter joining
getPurposeLines()(the lines) andgetMerchant()(the first line, usually the merchant)getPurpose()is unchanged, so this is backwards compatiblegetMerchant()returns the first line verbatim. For bookings without a merchant, such as the monthlysettlement, that is the descriptive text the bank places there (e.g.
Ausgleich Kreditkartenabrechnung); it is null only when the record carries no Verwendungszweck at all. Theexisting
testMapsToModelfixture is extended to cover both the merchant and the settlement case.Developed with the assistance of Claude Code. The field semantics above were checked against the
DKKKU test fixtures introduced in #574, which mirror real BW-Bank/LBBW responses.