IA-976 : `feat: Add cardLast4 enrichment to InvoiceDTO`
MR Description
Summary
Extends InvoiceDTO with the parent's default card last 4 digits, fetched from the local PaymentDetailsRepository during DTO enrichment.
Changes
InvoiceDTO
- Added
cardLast4field (String)InvoiceDTOEnricher - Injected
PaymentDetailsRepository - Added a second enrichment block that looks up the parent's default active card (
defaultCard = true,active = true) and setscardLast4on the DTO - Each enrichment block is independently wrapped in
try/catchto prevent a card lookup failure from breaking parent info enrichmentPaymentDetailsRepository - Added derived query method:
Optional<PaymentDetails> findByParentUuidAndDefaultCardTrueAndActiveTrue(String parentUuid);