mirror of
https://github.com/OpenBankProject/OBP-API.git
synced 2026-02-06 17:37:00 +00:00
docfix/Get rid of account balances hard coded values
This commit is contained in:
parent
10ce86132d
commit
150dabd528
@ -105,9 +105,9 @@ object JSONFactory_BERLIN_GROUP_1_3 extends CustomJsonFormats {
|
||||
case class AccountBalance(
|
||||
balanceAmount : AmountOfMoneyV13 = AmountOfMoneyV13("EUR","123"),
|
||||
balanceType: String = "closingBooked",
|
||||
lastChangeDateTime: String = "2020-07-02T10:23:57.814Z",
|
||||
lastCommittedTransaction: String = "string",
|
||||
referenceDate: String = "2020-07-02",
|
||||
lastChangeDateTime: Option[String] = None,
|
||||
lastCommittedTransaction: Option[String] = None,
|
||||
referenceDate: Option[String] = None,
|
||||
|
||||
)
|
||||
case class FromAccount(
|
||||
@ -401,9 +401,8 @@ object JSONFactory_BERLIN_GROUP_1_3 extends CustomJsonFormats {
|
||||
`balances` = accountBalances.balances.map(accountBalance => AccountBalance(
|
||||
balanceAmount = AmountOfMoneyV13(accountBalance.balance.currency, accountBalance.balance.amount),
|
||||
balanceType = accountBalance.balanceType,
|
||||
lastChangeDateTime = APIUtil.dateOrNull(bankAccount.lastUpdate),
|
||||
referenceDate = APIUtil.dateOrNull(bankAccount.lastUpdate),
|
||||
lastCommittedTransaction = "String"
|
||||
lastChangeDateTime = APIUtil.dateOrNone(bankAccount.lastUpdate),
|
||||
referenceDate = APIUtil.dateOrNone(bankAccount.lastUpdate),
|
||||
)
|
||||
))
|
||||
}
|
||||
|
||||
@ -930,11 +930,11 @@ object APIUtil extends MdcLoggable with CustomJsonFormats{
|
||||
case _ => OBPId
|
||||
}
|
||||
|
||||
def dateOrNull(date : Date) =
|
||||
def dateOrNone(date : Date): Option[String] =
|
||||
if(date == null)
|
||||
null
|
||||
None
|
||||
else
|
||||
APIUtil.DateWithMsRollback.format(date)
|
||||
Some(APIUtil.DateWithMsRollback.format(date))
|
||||
|
||||
def stringOrNull(text : String) =
|
||||
if(text == null || text.isEmpty)
|
||||
|
||||
Loading…
Reference in New Issue
Block a user