Repository navigation
feat: cascade account deletion to transaction requests, challenges and double-entry rows - #2958
Merged
simonredfern merged 2 commits intoNov 3, 2026
Conversation
…llenges and double-entry rows Deleting an account by cascade now removes the transaction requests it paid from, including ones without a transaction yet, the expected challenge answers of those requests, and the double-entry book rows on either side of the account. Bank cascade deletion inherits this, since it deletes each account through DeleteAccountCascade.
…into feature/cascade-delete-double-entry-and-challenges # Conflicts: # obp-api/src/main/scala/deletion/DeleteAccountCascade.scala
|
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.



DELETE /obp/v4.0.0/management/cascading/banks/{BANK_ID}/accounts/{ACCOUNT_ID}now also removes the account's payment records: every transaction request the account paid from (including requests that never produced a transaction, such as ones still waiting for a challenge answer), the expected challenge answers of those requests, and the double-entry book rows whose debit or credit side is on the account. Because a double-entry row describes both sides of one payment, deleting either account removes the row.DELETE /obp/v4.0.0/management/cascading/banks/{BANK_ID}deletes each account through the same code and so removes the same records.New scenarios in
DeleteAccountCascadeTestandDeleteBankCascadeTestmake one payment below the challenge threshold (completed, booked in the double-entry book) and one above it (INITIATED, with a challenge), run the cascade, and check that no double-entry row, transaction request or challenge of the account is left. Not covered yet: transaction request attributes and reasons, and challenges of requests removed by the single-transaction cascade.