aboutsummaryrefslogtreecommitdiff
path: root/src/include/taler_merchant_service.h
diff options
context:
space:
mode:
authorpriscilla <priscilla.huang@efrei.net>2022-12-21 09:31:36 -0500
committerpriscilla <priscilla.huang@efrei.net>2022-12-21 09:31:59 -0500
commit97ccd1b689b0ce5980d76ffb9c5624bc7f6c6723 (patch)
tree554fa0355f3bf64e3458c8a7f9a3d20adfc0848c /src/include/taler_merchant_service.h
parentac4225f09f31dd59135c874f8658e3c514b9d131 (diff)
api using template
Diffstat (limited to 'src/include/taler_merchant_service.h')
-rw-r--r--src/include/taler_merchant_service.h41
1 files changed, 41 insertions, 0 deletions
diff --git a/src/include/taler_merchant_service.h b/src/include/taler_merchant_service.h
index 09292c18..c5bef549 100644
--- a/src/include/taler_merchant_service.h
+++ b/src/include/taler_merchant_service.h
@@ -4370,6 +4370,47 @@ void
TALER_MERCHANT_template_delete_cancel (
struct TALER_MERCHANT_TemplateDeleteHandle *tdh);
+/**
+ * Function called with the result of the POST /using-templates operation.
+ *
+ * @param cls closure
+ * @param hr HTTP response details
+ */
+typedef void
+(*TALER_MERCHANT_UsingTemplatesPostCallback)(
+ void *cls,
+ const struct TALER_MERCHANT_HttpResponse *hr);
+
+/**
+ * Make a POST /using-templates request to add an using template
+ *
+ * @param ctx the context
+ * @param backend_url HTTP base URL for the backend
+ * @param summary summary of the using template
+ * @param amount to pay given by the customer
+ * @param cb function to call with the backend's result
+ * @param cb_cls closure for @a cb
+ * @return the request handle; NULL upon error
+ */
+struct TALER_MERCHANT_UsingTemplatesPostHandle *
+TALER_MERCHANT_using_templates_post (
+ struct GNUNET_CURL_Context *ctx,
+ const char *backend_url,
+ const char *summary,
+ struct TALER_Amount amount,
+ TALER_MERCHANT_UsingTemplatesPostCallback cb,
+ void *cb_cls);
+
+
+/**
+ * Cancel POST /using-templates operation.
+ *
+ * @param utph operation to cancel
+ */
+void
+TALER_MERCHANT_using_templates_post_cancel (
+ struct TALER_MERCHANT_UsingTemplatesPostHandle *utph);
+
/* ********************* /webhooks *********************** */