[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[libeufin] branch master updated: Make C52 return only today's entries.
From: |
gnunet |
Subject: |
[libeufin] branch master updated: Make C52 return only today's entries. |
Date: |
Sat, 11 Jan 2020 11:08:36 +0100 |
This is an automated email from the git hooks/post-receive script.
marcello pushed a commit to branch master
in repository libeufin.
The following commit(s) were added to refs/heads/master by this push:
new 1adadeb Make C52 return only today's entries.
1adadeb is described below
commit 1adadeb17f48509b8dff6f17e560d2ff5dce1686
Author: Marcello Stanisci <address@hidden>
AuthorDate: Sat Jan 11 11:08:04 2020 +0100
Make C52 return only today's entries.
---
nexus/src/main/kotlin/Helpers.kt | 20 +-------------------
.../tech/libeufin/sandbox/EbicsProtocolBackend.kt | 9 ++++-----
2 files changed, 5 insertions(+), 24 deletions(-)
diff --git a/nexus/src/main/kotlin/Helpers.kt b/nexus/src/main/kotlin/Helpers.kt
index f1819e4..ab60d65 100644
--- a/nexus/src/main/kotlin/Helpers.kt
+++ b/nexus/src/main/kotlin/Helpers.kt
@@ -37,7 +37,6 @@ fun createDownloadInitializationPhase(
)
}
-
fun createDownloadInitializationPhase(
subscriberData: EbicsContainer,
orderType: String,
@@ -61,7 +60,6 @@ fun createDownloadInitializationPhase(
)
}
-
fun createUploadInitializationPhase(
subscriberData: EbicsContainer,
orderType: String,
@@ -257,8 +255,6 @@ suspend inline fun <reified T, reified S>
HttpClient.postToBankSigned(
}
}
-
-
/**
* do NOT verify the bank's signature
*/
@@ -284,18 +280,4 @@ fun getNonce(size: Int): ByteArray {
val ret = ByteArray(size / 8)
sr.nextBytes(ret)
return ret
-}
-
-/* explicit point in time */
-fun getGregorianDate(year: Int, month: Int, day: Int): XMLGregorianCalendar {
- val gregorianCalendar = GregorianCalendar(year, month, day)
- val datatypeFactory = DatatypeFactory.newInstance()
- return datatypeFactory.newXMLGregorianCalendar(gregorianCalendar)
-}
-
-/* now */
-fun getGregorianDate(): XMLGregorianCalendar {
- val gregorianCalendar = GregorianCalendar()
- val datatypeFactory = DatatypeFactory.newInstance()
- return datatypeFactory.newXMLGregorianCalendar(gregorianCalendar)
-}
+}
\ No newline at end of file
diff --git
a/sandbox/src/main/kotlin/tech/libeufin/sandbox/EbicsProtocolBackend.kt
b/sandbox/src/main/kotlin/tech/libeufin/sandbox/EbicsProtocolBackend.kt
index c540615..69fa727 100644
--- a/sandbox/src/main/kotlin/tech/libeufin/sandbox/EbicsProtocolBackend.kt
+++ b/sandbox/src/main/kotlin/tech/libeufin/sandbox/EbicsProtocolBackend.kt
@@ -111,15 +111,13 @@ private suspend fun
ApplicationCall.respondEbicsKeyManagement(
respondText(text, ContentType.Application.Xml, HttpStatusCode.OK)
}
+/* intra-day account traffic */
private fun ApplicationCall.handleEbicsC52(header: EbicsRequest.Header):
ByteArray {
val userId = header.static.userID!!
val od = header.static.orderDetails ?: throw Exception("Need
'OrderDetails'")
val op = od.orderParams ?: throw Exception("Need 'StandardOrderParams'")
- /**
- * (StandardOrderParams (DateRange (Start, End)))
- */
val subscriber = transaction {
EbicsSubscriberEntity.find {
@@ -129,8 +127,9 @@ private fun ApplicationCall.handleEbicsC52(header:
EbicsRequest.Header): ByteArr
val history = extractHistoryForEach(
subscriber.bankCustomer.id.value,
- (op as EbicsRequest.StandardOrderParams).dateRange?.start.toString(),
- op.dateRange?.end.toString()) { println(it) }
+ getGregorianDate().toString(),
+ getGregorianDate().toString()
+ ) { println(it) }
val ret = constructXml(indent = true) {
namespace("foo", "bar")
--
To stop receiving notification emails like this one, please contact
address@hidden.
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [libeufin] branch master updated: Make C52 return only today's entries.,
gnunet <=