gnunet-svn
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[taler-merchant] branch master updated: template


From: gnunet
Subject: [taler-merchant] branch master updated: template
Date: Wed, 23 Nov 2022 15:34:45 +0100

This is an automated email from the git hooks/post-receive script.

priscilla-huang pushed a commit to branch master
in repository merchant.

The following commit(s) were added to refs/heads/master by this push:
     new 41fa5f3c template
41fa5f3c is described below

commit 41fa5f3c3c9f147b8d20c8d8659384e93fe0f985
Author: priscilla <priscilla.huang@efrei.net>
AuthorDate: Wed Nov 23 09:34:32 2022 -0500

    template
---
 src/include/taler_merchant_testing_lib.h | 133 ++++++++++++++++++++++++++++++-
 1 file changed, 132 insertions(+), 1 deletion(-)

diff --git a/src/include/taler_merchant_testing_lib.h 
b/src/include/taler_merchant_testing_lib.h
index 92ce1a0b..efcfd7f6 100644
--- a/src/include/taler_merchant_testing_lib.h
+++ b/src/include/taler_merchant_testing_lib.h
@@ -1487,6 +1487,133 @@ TALER_TESTING_cmd_merchant_kyc_get (const char *label,
                                     unsigned int expected_http_status);
 
 
+/* ****** Templates ******* */
+
+
+/**
+ * Define a "POST /templates" CMD.
+ *
+ * @param label command label.
+ * @param merchant_url base URL of the merchant serving the
+ *        POST /templates request.
+ * @param template_id the ID of the template to query
+ * @param template_description description of the template
+ * @param image base64-encoded template image
+ * @param template_contract where the contract of the company is
+ * @param http_status expected HTTP response code.
+ * @return the command.
+ */
+struct TALER_TESTING_Command
+TALER_TESTING_cmd_merchant_post_templates2 (
+  const char *label,
+  const char *merchant_url,
+  const char *template_id,
+  const char *template_description,
+  const char *image,
+  json_t *template_contract,
+  unsigned int http_status);
+
+
+/**
+ * Define a "POST /templates" CMD, simple version
+ *
+ * @param label command label.
+ * @param merchant_url base URL of the merchant serving the
+ *        POST /templates request.
+ * @param template_id the ID of the template to create
+ * @param template_description description of the template
+ * @param http_status expected HTTP response code.
+ * @return the command.
+ */
+struct TALER_TESTING_Command
+TALER_TESTING_cmd_merchant_post_templates (const char *label,
+                                          const char *merchant_url,
+                                          const char *template_id,
+                                          const char *template_description,
+                                           unsigned int http_status);
+
+
+/**
+ * Define a "PATCH /templates/$ID" CMD.
+ *
+ * @param label command label.
+ * @param merchant_url base URL of the merchant serving the
+ *        PATCH /template request.
+ * @param template_id the ID of the template to query
+ * @param template_description description of the template
+ * @param image base64-encoded template image
+ * @param template_contract contract of the company
+ * @param http_status expected HTTP response code.
+ * @return the command.
+ */
+struct TALER_TESTING_Command
+TALER_TESTING_cmd_merchant_patch_template (
+  const char *label,
+  const char *merchant_url,
+  const char *template_id,
+  const char *template_description,
+  const char *image,
+  json_t *template_contract,
+  unsigned int http_status);
+
+
+/**
+ * Define a "GET /templates" CMD.
+ *
+ * @param label command label.
+ * @param merchant_url base URL of the merchant serving the
+ *        GET /templates request.
+ * @param http_status expected HTTP response code.
+ * @param ... NULL-terminated list of labels (const char *) of
+ *        template (commands) we expect to be returned in the list
+ *        (assuming @a http_code is #MHD_HTTP_OK)
+ * @return the command.
+ */
+struct TALER_TESTING_Command
+TALER_TESTING_cmd_merchant_get_templates (const char *label,
+                                         const char *merchant_url,
+                                         unsigned int http_status,
+                                          ...);
+
+
+/**
+ * Define a "GET template" CMD.
+ *
+ * @param label command label.
+ * @param merchant_url base URL of the merchant serving the
+ *        GET /templates/$ID request.
+ * @param template_id the ID of the template to query
+ * @param http_status expected HTTP response code.
+ * @param template_reference reference to a "POST /templates" or "PATCH 
/templates/$ID" CMD
+ *        that will provide what we expect the backend to return to us
+ * @return the command.
+ */
+struct TALER_TESTING_Command
+TALER_TESTING_cmd_merchant_get_template (const char *label,
+                                        const char *merchant_url,
+                                        const char *template_id,
+                                        unsigned int http_status,
+                                         const char *template_reference);
+
+
+
+/**
+ * Define a "DELETE product" CMD.
+ *
+ * @param label command label.
+ * @param merchant_url base URL of the merchant serving the
+ *        DELETE /products/$ID request.
+ * @param product_id the ID of the product to query
+ * @param http_status expected HTTP response code.
+ * @return the command.
+ */
+struct TALER_TESTING_Command
+TALER_TESTING_cmd_merchant_delete_template (const char *label,
+                                           const char *merchant_url,
+                                           const char *template_id,
+                                            unsigned int http_status);
+
+
 /* ****** Specific traits supported by this component ******* */
 
 
@@ -1527,7 +1654,11 @@ TALER_TESTING_cmd_merchant_kyc_get (const char *label,
   op (order_terms, const json_t) \
   op (h_contract_terms, const struct TALER_PrivateContractHashP) \
   op (h_wire, const struct TALER_MerchantWireHashP) \
-  op (proposal_reference, const char *)
+  op (proposal_reference, const char *) \
+  op (template_description, const char *) \
+  op (template_image, const char *) \
+  op (template_id, const char *) \
+  op (template_contract, const json_t)
 
 
 /**

-- 
To stop receiving notification emails like this one, please contact
gnunet@gnunet.org.



reply via email to

[Prev in Thread] Current Thread [Next in Thread]