diff options
author | Christian Grothoff <christian@grothoff.org> | 2024-03-22 14:05:42 +0100 |
---|---|---|
committer | Christian Grothoff <christian@grothoff.org> | 2024-03-22 14:05:42 +0100 |
commit | 6d41df4ffbc0d921aecb265ecb49b15df5c7178e (patch) | |
tree | c0423a7df97f57a41ab3dc2ea620b22d1cb133b0 /src/include/taler_merchant_service.h | |
parent | 110b61ff12208ffbb022296097b85d28cc1cfe7e (diff) | |
download | merchant-6d41df4ffbc0d921aecb265ecb49b15df5c7178e.tar.gz merchant-6d41df4ffbc0d921aecb265ecb49b15df5c7178e.tar.bz2 merchant-6d41df4ffbc0d921aecb265ecb49b15df5c7178e.zip |
add logic to preserve and possibly update minimum_age in contract terms
Diffstat (limited to 'src/include/taler_merchant_service.h')
-rw-r--r-- | src/include/taler_merchant_service.h | 44 |
1 files changed, 44 insertions, 0 deletions
diff --git a/src/include/taler_merchant_service.h b/src/include/taler_merchant_service.h index 6ddf3ee4..263a6fec 100644 --- a/src/include/taler_merchant_service.h +++ b/src/include/taler_merchant_service.h @@ -1663,6 +1663,50 @@ TALER_MERCHANT_products_post ( /** + * Make a POST /products request to add a product to the + * inventory. + * + * @param ctx the context + * @param backend_url HTTP base URL for the backend + * @param product_id identifier to use for the product + * @param description description of the product + * @param description_i18n Map from IETF BCP 47 language tags to localized descriptions + * @param unit unit in which the product is measured (liters, kilograms, packages, etc.) + * @param price the price for one @a unit of the product, zero is used to imply that + * this product is not sold separately or that the price is not fixed and + * must be supplied by the front-end. If non-zero, price must include + * applicable taxes. + * @param image base64-encoded product image + * @param taxes list of taxes paid by the merchant + * @param total_stock in @a units, -1 to indicate "infinite" (i.e. electronic books) + * @param address where the product is in stock + * @param next_restock when the next restocking is expected to happen, 0 for unknown, + * #GNUNET_TIME_UNIT_FOREVER_ABS for 'never'. + * @param minimum_age minimum age the buyer must have + * @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_ProductsPostHandle * +TALER_MERCHANT_products_post2 ( + struct GNUNET_CURL_Context *ctx, + const char *backend_url, + const char *product_id, + const char *description, + const json_t *description_i18n, + const char *unit, + const struct TALER_Amount *price, + const char *image, + const json_t *taxes, + int64_t total_stock, + const json_t *address, + struct GNUNET_TIME_Timestamp next_restock, + uint32_t minimum_age, + TALER_MERCHANT_ProductsPostCallback cb, + void *cb_cls); + + +/** * Cancel POST /products operation. * * @param pph operation to cancel |