commit 3e5a21a6178a3aaeccb0c098f01847ef04238544
parent ae52368483af8b18ac3a3b68d30d4aca1871b067
Author: Christian Grothoff <christian@grothoff.org>
Date: Tue, 23 Jun 2020 10:48:27 +0200
also parse and return timestamp and row_id
Diffstat:
2 files changed, 16 insertions(+), 2 deletions(-)
diff --git 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
@@ -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 ()
};