gnunet-svn
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[taler-merchant] 242/277: also parse and return timestamp and row_id


From: gnunet
Subject: [taler-merchant] 242/277: also parse and return timestamp and row_id
Date: Sun, 05 Jul 2020 20:52:35 +0200

This is an automated email from the git hooks/post-receive script.

grothoff pushed a commit to branch master
in repository merchant.

commit 3e5a21a6178a3aaeccb0c098f01847ef04238544
Author: Christian Grothoff <christian@grothoff.org>
AuthorDate: Tue Jun 23 10:48:27 2020 +0200

    also parse and return timestamp and row_id
---
 src/include/taler_merchant_service.h | 12 ++++++++++++
 src/lib/merchant_api_get_orders.c    |  6 ++++--
 2 files changed, 16 insertions(+), 2 deletions(-)

diff --git a/src/include/taler_merchant_service.h 
b/src/include/taler_merchant_service.h
index b6cd681..44da221 100644
--- a/src/include/taler_merchant_service.h
+++ b/src/include/taler_merchant_service.h
@@ -1221,6 +1221,18 @@ struct TALER_MERCHANT_OrderEntry
    */
   const char *order_id;
 
+  /**
+   * Time when the order was created. Useful for filtering by
+   * 'date' (in #TALER_MERCHANT_orders_get2()).
+   */
+  struct GNUNET_TIME_Absolute timestamp;
+
+  /**
+   * Serial ID of the order. Useful for filtering by 'start_row'
+   * (in #TALER_MERCHANT_orders_get2()).
+   */
+  uint64_t order_serial;
+
 };
 
 
diff --git a/src/lib/merchant_api_get_orders.c 
b/src/lib/merchant_api_get_orders.c
index 92d3142..df96c57 100644
--- a/src/lib/merchant_api_get_orders.c
+++ b/src/lib/merchant_api_get_orders.c
@@ -86,8 +86,10 @@ parse_orders (const json_t *ia,
     struct GNUNET_JSON_Specification spec[] = {
       GNUNET_JSON_spec_string ("order_id",
                                &ie->order_id),
-      // FIXME: also parse and return row_id and timestamp fields!
-      // (=> needed to enable client to filter by those!)
+      GNUNET_JSON_spec_absolute_time ("timestamp",
+                                      &ie->timestamp),
+      GNUNET_JSON_spec_uint64 ("row_id",
+                               &ie->order_serial),
       GNUNET_JSON_spec_end ()
     };
 

-- 
To stop receiving notification emails like this one, please contact
gnunet@gnunet.org.



reply via email to

[Prev in Thread] Current Thread [Next in Thread]