summaryrefslogtreecommitdiff
path: root/src/include/taler_merchant_service.h
diff options
context:
space:
mode:
authorChristian Grothoff <christian@grothoff.org>2021-05-18 12:06:29 +0200
committerChristian Grothoff <christian@grothoff.org>2021-05-18 12:06:29 +0200
commit031e2fed3aae424bc47f6634fa52415729c75ed3 (patch)
tree32596be3167b78bd14634a207e56f73bdd6d68cb /src/include/taler_merchant_service.h
parent3e60ebd5c0e535a2dbfee765477f582e3a2b37e7 (diff)
downloadmerchant-031e2fed3aae424bc47f6634fa52415729c75ed3.tar.gz
merchant-031e2fed3aae424bc47f6634fa52415729c75ed3.tar.bz2
merchant-031e2fed3aae424bc47f6634fa52415729c75ed3.zip
add C client API for DELETE /transfers/ID operation (#6876)
Diffstat (limited to 'src/include/taler_merchant_service.h')
-rw-r--r--src/include/taler_merchant_service.h55
1 files changed, 54 insertions, 1 deletions
diff --git a/src/include/taler_merchant_service.h b/src/include/taler_merchant_service.h
index 1b7ccc54..9e7cf8f8 100644
--- a/src/include/taler_merchant_service.h
+++ b/src/include/taler_merchant_service.h
@@ -2008,7 +2008,7 @@ struct TALER_MERCHANT_OrderDeleteHandle;
/**
- * Function called with the result of the DELETE /order/$ID operation.
+ * Function called with the result of the DELETE /orders/$ID operation.
*
* @param cls closure
* @param hr HTTP response details
@@ -2781,6 +2781,57 @@ TALER_MERCHANT_transfers_post_cancel (
/**
+ * Handle for a DELETE /transfers/ID operation.
+ */
+struct TALER_MERCHANT_TransferDeleteHandle;
+
+
+/**
+ * Function called with the result of the DELETE /transfers/$ID operation.
+ *
+ * @param cls closure
+ * @param hr HTTP response details
+ */
+typedef void
+(*TALER_MERCHANT_TransferDeleteCallback)(
+ void *cls,
+ const struct TALER_MERCHANT_HttpResponse *hr);
+
+
+/**
+ * Delete an incoming wire transfer at an instance of a backend. This
+ * will only succeed if the exchange did not respond to the inquiry
+ * about the transfer.
+ *
+ * @param ctx the context
+ * @param backend_url HTTP base URL for the backend (top-level "default" instance
+ * or base URL of an instance if @a instance_id is NULL)
+ * @param wire_transfer_serial unique number that identifies the transfer
+ * @param td_cb function to call with the backend's result
+ * @param td_cb_cls closure for @a td_cb
+ * @return the request handle; NULL upon error
+ */
+struct TALER_MERCHANT_TransferDeleteHandle *
+TALER_MERCHANT_transfer_delete (
+ struct GNUNET_CURL_Context *ctx,
+ const char *backend_url,
+ uint64_t wire_transfer_serial,
+ TALER_MERCHANT_TransferDeleteCallback td_cb,
+ void *td_cb_cls);
+
+
+/**
+ * Cancel deletion operation. Note that the operation may still
+ * succeed.
+ *
+ * @param tdh operation to cancel
+ */
+void
+TALER_MERCHANT_transfer_delete_cancel (
+ struct TALER_MERCHANT_TransferDeleteHandle *tdh);
+
+
+/**
* @brief Handle to a GET /transfers operation at a merchant's backend.
*/
struct TALER_MERCHANT_GetTransfersHandle;
@@ -2815,6 +2866,8 @@ struct TALER_MERCHANT_TransferData
/**
* Serial number of the credit operation in the merchant backend.
+ * Needed, for example, to delete the transfer using
+ * #TALER_MERCHANT_transfer_delete().
*/
uint64_t credit_serial;