refactor/add pending transactions to account information response and update debtor name field

This commit is contained in:
hongwei 2025-06-16 09:28:41 +02:00
parent 3a2dd2ee7a
commit 8f390ad4d0
2 changed files with 16 additions and 1 deletions

View File

@ -933,6 +933,21 @@ The ASPSP might add balance information, if transaction lists without balances a
"remittanceInformationUnstructured": "Example 2"
}
],
"pending": [
{
"transactionId": "1234569",
"creditorName": "Claude Renault",
"creditorAccount": {
"iban": "FR7612345987650123456789014"
},
"transactionAmount": {
"currency": "EUR",
"amount": "-100.03"
},
"valueDate": "2017-10-26",
"remittanceInformationUnstructured": "Example 3"
}
],
"_links": {
"account": {
"href": "/v1.3/accounts/3dc3d5b3-7023-4848-9853-f5400a64e80f"

View File

@ -475,7 +475,7 @@ object JSONFactory_BERLIN_GROUP_1_3 extends CustomJsonFormats with MdcLoggable{
creditorAccount = Some(BgTransactionAccountJson(
transaction.otherBankAccount.map(_.iban.orNull).orNull
)),
debtorName = Some(bankAccount.label),
debtorName = Some(bankAccount.name),
debtorAccount = Some(BgTransactionAccountJson(iban)),
transactionAmount = AmountOfMoneyV13(APIUtil.stringOptionOrNull(transaction.currency), transaction.amount.get.toString().trim.stripPrefix("-")),
bookingDate = Some(BgSpecValidation.formatToISODate(bookingDate)) ,