gnunet-svn
[Top][All Lists]
Advanced

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

[taler-docs] branch master updated: Update


From: gnunet
Subject: [taler-docs] branch master updated: Update
Date: Tue, 15 Nov 2022 10:44:42 +0100

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

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

The following commit(s) were added to refs/heads/master by this push:
     new 413eec8  Update
413eec8 is described below

commit 413eec8c76b83214270d40382bdb6f0863583e70
Author: priscilla <priscilla.huang@efrei.net>
AuthorDate: Tue Nov 15 04:44:28 2022 -0500

    Update
---
 core/api-merchant.rst | 110 +++++++++++++++++++++++++++++++++++++++++++++-----
 1 file changed, 101 insertions(+), 9 deletions(-)

diff --git a/core/api-merchant.rst b/core/api-merchant.rst
index 8a935cc..1276a3c 100644
--- a/core/api-merchant.rst
+++ b/core/api-merchant.rst
@@ -3056,13 +3056,18 @@ Adding templates
 
    This is used to create template.
 
+   **Request:**
+
+   The request must be a `TemplateAddDetail`.
+   
+
    **Response:**
 
-   :http:statuscode:`200 Ok`:
+   :http:statuscode:`200 No content`:
      The creation of the template is successfull.
 
    :http:statuscode:`404 Not found`
-     The merchant instance is unknown.This is used to edit the template.
+     The merchant instance is unknown or it is not in our data.
 
 
  .. ts:def:: TemplateAddDetail
@@ -3072,12 +3077,12 @@ Adding templates
       // Template ID to use.
       tenplate_id: string;
 
+      // Name of the store.
+      name_store: string;
+
       // Human-readable summary for the template.
       summary: string;
 
-      // Map from IETF BCP 47 language tags to localized descriptions.
-      description_i18n?: { [lang_tag: string]: string };
-
       // The price is imposed by the merchant and cannot be changed by the 
customer.
       // This parametrer is optional.
       price_imposed?: Amount;
@@ -3102,16 +3107,50 @@ Editing templates
 
    This is used to update template.
 
+   **Request:**
+
+   The request must be a `TemplatePatchDetail`.
+
    **Response:**
 
-   :http:statuscode:`200 Ok`:
+   :http:statuscode:`200 No content`:
      The templates has successfully modififed.
 
    :http:statuscode:`404 Not found`:
      The templates(ID) is unknown to the backend.
 
    :http:statuscode:`409 Conflict`:
-     The provided information is inconsistent with the current state of the 
template.
+     The provided information is inconsistent with the current state of the 
template. Changes made is the same with
+     another store.
+
+
+ .. ts:def:: TemplatePatchDetail
+
+    interface TemplatePatchDetail {
+
+      // Template ID to use.
+      tenplate_id: string;
+
+      // Name of the store.
+      name_store: string;
+
+      // Human-readable summary for the template.
+      summary: string;
+
+      // The price is imposed by the merchant and cannot be changed by the 
customer.
+      // This parametrer is optional.
+      price_imposed?: Amount;
+
+      // A base64-encoded image selected by the merchant.
+      image: ImageDataUrl;
+
+      // Identifies where the store is.
+      address_store: Location;
+
+      // Minimum age buyer must have (in years). Default is 0.
+      minimum_age: Integer;
+
+    }  
 
 
 
@@ -3120,18 +3159,38 @@ Inspecting template
 
 .. http:get:: [/instances/$INSTANCE]/private/templates
 
-   This is used to return the list of all the template.
+   This is used to return the list of all the templates.
 
 
    **Response:**
 
    :http:statuscode:`200 OK`:
-     The backend has successfully returned all the template.
+     The backend has successfully returned all the templates. Returns a 
`TemplateSummaryResponse`.
 
    :http:statuscode:`404 Not found`:
      The backend has does not know about the instance.
 
 
+ .. ts:def:: TemplateSummaryResponse
+
+    interface TemplateSummaryResponse {
+
+      // List of templates that are present in our backend.
+      templates: TemplateEntry[];
+
+    }
+
+
+    The `TemplatesEntry` object describes an template. It has the following 
structure:
+
+ .. ts:def:: TemplateEntry
+
+    interface TemplateEntry {
+
+     // Template identifier, as found in the template.
+     template_id: string;
+
+
 
 .. http:get:: [/instances/$INSTANCE]/private/templates/$TEMPLATE_ID
 
@@ -3142,9 +3201,42 @@ Inspecting template
 
    :http:statuscode:`200 OK`:
      The backend has successfully returned the detailed information about a 
specific template.
+     Returns a TemplateDetail.
 
    :http:statuscode:`404 Not found`:
      The template(ID) is unknown to the backend.
+     
+
+ .. ts:def:: TemplateDetail
+
+    interface TemplateDetail {
+
+      // Template ID to use.
+      tenplate_id: string;
+
+      // Name of the store.
+      name_store: string;
+
+      // Name of the owner.
+      name_owner: string;
+
+      // Human-readable summary for the template.
+      summary: string;
+
+      // The price is imposed by the merchant and cannot be changed by the 
customer.
+      // This parametrer is optional.
+      price_imposed: Amount;
+
+      // A base64-encoded image selected by the merchant.
+      image: ImageDataUrl;
+
+      // Identifies where the store is.
+      address_store: Location;
+
+      // Minimum age buyer must have (in years). Default is 0.
+      minimum_age: Integer;
+
+    }  
 
 
 

-- 
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]