summaryrefslogtreecommitdiff
path: root/src/include/taler_merchant_testing_lib.h
diff options
context:
space:
mode:
Diffstat (limited to 'src/include/taler_merchant_testing_lib.h')
-rw-r--r--src/include/taler_merchant_testing_lib.h37
1 files changed, 32 insertions, 5 deletions
diff --git a/src/include/taler_merchant_testing_lib.h b/src/include/taler_merchant_testing_lib.h
index ac500766..8b53c324 100644
--- a/src/include/taler_merchant_testing_lib.h
+++ b/src/include/taler_merchant_testing_lib.h
@@ -575,6 +575,13 @@ TALER_TESTING_cmd_merchant_get_orders (const char *label,
/**
* Start a long poll for GET /private/orders.
+ *
+ * FIXME: needs additional arguments to specify range to long poll for!
+ *
+ * @param label the command label
+ * @param merchant_url base URL of the merchant which will
+ * serve the request.
+ * @param timeout how long to wait for the request to complete
*/
struct TALER_TESTING_Command
TALER_TESTING_cmd_poll_orders_start (const char *label,
@@ -584,6 +591,10 @@ TALER_TESTING_cmd_poll_orders_start (const char *label,
/**
* Complete a long poll for GET /private/orders.
+ *
+ * @param label the command label
+ * @param http_status expected HTTP response code
+ * @param poll_start_reference reference to the #TALER_TESTING_cmd_poll_orders_start command
*/
struct TALER_TESTING_Command
TALER_TESTING_cmd_poll_orders_conclude (const char *label,
@@ -614,23 +625,39 @@ TALER_TESTING_cmd_wallet_get_order (const char *label,
/**
- * Start a long poll for GET /private/orders/$ORDER_ID.
+ * Start a long poll for GET /orders/$ORDER_ID.
+ *
+ * @param label the command label
+ * @param merchant_url base URL of the merchant which will
+ * serve the request.
+ * @param order_ref reference to a command that created an order.
+ * @param timeout how long to wait for the request to complete
+ * @param await_refund NULL to not wait for refund, amount of value
+ * zero to wait for any refund amount, non-zero to poll
+ * for refund exceeding the given amount
*/
struct TALER_TESTING_Command
TALER_TESTING_cmd_wallet_poll_order_start (
const char *label,
const char *merchant_url,
- const char *order_id,
- struct GNUNET_TIME_Relative timeout);
+ const char *order_ref,
+ struct GNUNET_TIME_Relative timeout,
+ const struct TALER_Amount *await_refund);
/**
- * Complete a long poll for GET /private/orders/$ORDER_ID.
+ * Complete a long poll for GET /orders/$ORDER_ID.
+ *
+ * @param label the command label
+ * @param expected_http_status expected HTTP response code
+ * @param expected_refund_amount refund expected, NULL for no refund expected
+ * @param poll_start_reference reference to the #TALER_TESTING_cmd_wallet_poll_order_start command
*/
struct TALER_TESTING_Command
TALER_TESTING_cmd_wallet_poll_order_conclude (
const char *label,
- unsigned int http_status,
+ unsigned int expected_http_status,
+ const char *expected_refund_amount,
const char *poll_start_reference);