OpenBankProject / OpenBankProject/OBP-API
override def getTransactions. No need for database lookups for params
Open
@simonredfern is already working on this.
Since Nov 21, 2017.
- Dominant language
- Scala
- Stars
- 1.7k
- Forks
- 482
- Avg merge
- 1d 12h
- Merged PRs (30d)
- 15
Description
override def getTransactions(bankId: BankId, accountId: AccountId, queryParams: OBPQueryParam*): Box[List[Transaction]] = {
// TODO Refactor this. No need for database lookups etc.
val limit = queryParams.collect { case OBPLimit(value) => MaxRows[MappedTransaction](value) }.headOption
val offset = queryParams.collect { case OBPOffset(value) => StartAt[MappedTransaction](value) }.headOption
val fromDate = queryParams.collect { case OBPFromDate(date) => By_>=(MappedTransaction.tFinishDate, date) }.headOption
val toDate = queryParams.collect { case OBPToDate(date) => By_<=(MappedTransaction.tFinishDate, date) }.headOption
val ordering = queryParams.collect {
.....
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Assessment
This issue has not been assessed yet.