summaryrefslogtreecommitdiff
path: root/src/include
diff options
context:
space:
mode:
authorMarcello Stanisci <stanisci.m@gmail.com>2019-04-09 17:14:13 +0200
committerMarcello Stanisci <stanisci.m@gmail.com>2019-04-10 17:07:13 +0200
commitf3d80b58f68e308a6abac304994fd040ecb91eda (patch)
tree3177b4bebbde629bb521d5083edbc1245cd3eecc /src/include
parent074b011d012eb0a202ff59b6444b272a8224cbf5 (diff)
downloadexchange-f3d80b58f68e308a6abac304994fd040ecb91eda.tar.gz
exchange-f3d80b58f68e308a6abac304994fd040ecb91eda.tar.bz2
exchange-f3d80b58f68e308a6abac304994fd040ecb91eda.zip
Make the API-agnostic iterator work.
This allows to build local histories to be matched against the ones returned by the bank; in particular, this version builds those stories regardless of /history or /history-range being run.
Diffstat (limited to 'src/include')
-rw-r--r--src/include/taler_testing_bank_lib.h68
1 files changed, 68 insertions, 0 deletions
diff --git a/src/include/taler_testing_bank_lib.h b/src/include/taler_testing_bank_lib.h
index a3cc741e6..6bd1026f7 100644
--- a/src/include/taler_testing_bank_lib.h
+++ b/src/include/taler_testing_bank_lib.h
@@ -109,6 +109,74 @@ TALER_TESTING_cmd_bank_history
const char *start_row_reference,
long long num_results);
+
+/**
+ * Make a "history-range" CMD, picking dates from the arguments.
+ *
+ * @param label command label.
+ * @param bank_url base URL of the bank offering the "history"
+ * operation.
+ * @param account_no bank account number to ask the history for.
+ * @param direction which direction this operation is interested.
+ * @param ascending if GNUNET_YES, the bank will return the rows
+ * in ascending (= chronological) order.
+ * @param start_date value for the 'start' argument
+ * of "/history-range".
+ * @param end_date value for the 'end' argument
+ * of "/history-range".
+ * @param num_results how many results we want from the bank; NOTE,
+ * this value is NOT used to issue any "delta" parameter in
+ * the HTTP request. Rather, it is only checked against
+ * the results returned by the bank.
+ * @return the command.
+ */
+struct TALER_TESTING_Command
+TALER_TESTING_cmd_bank_history_range_with_dates
+ (const char *label,
+ const char *bank_url,
+ uint64_t account_no,
+ enum TALER_BANK_Direction direction,
+ unsigned int ascending,
+ struct GNUNET_TIME_Absolute start_date,
+ struct GNUNET_TIME_Absolute end_date,
+ long long num_results);
+
+
+/**
+ * Make a "history-range" CMD, picking dates from traits.
+ *
+ * @param label command label.
+ * @param bank_url base URL of the bank offering the "history"
+ * operation.
+ * @param account_no bank account number to ask the history for.
+ * @param direction which direction this operation is interested.
+ * @param ascending if GNUNET_YES, the bank will return the rows
+ * in ascending (= chronological) order.
+ * @param start_row_reference reference to a command that can
+ * offer a absolute time to use as the 'start' argument
+ * for "/history-range".
+ * @param end_row_reference reference to a command that can
+ * offer a absolute time to use as the 'end' argument
+ * for "/history-range".
+ * @param num_results how many results we want from the bank; NOTE,
+ * this value is NOT used to issue any "delta" parameter in
+ * the HTTP request. Rather, it is only checked against
+ * the results returned by the bank.
+ *
+ * @return the command.
+ */
+struct TALER_TESTING_Command
+TALER_TESTING_cmd_bank_history_range
+ (const char *label,
+ const char *bank_url,
+ uint64_t account_no,
+ enum TALER_BANK_Direction direction,
+ unsigned int ascending,
+ const char *start_row_reference,
+ const char *end_row_reference,
+ long long num_results);
+
+
/**
* Create a "reject" CMD.
*