merchant

Merchant backend to process payments, run by merchants
Log | Files | Refs | Submodules | README | LICENSE

patch-private-orders-ORDER_ID-forget.h (3639B)


      1 /*
      2   This file is part of TALER
      3   Copyright (C) 2014-2026 Taler Systems SA
      4 
      5   TALER is free software; you can redistribute it and/or modify it under the
      6   terms of the GNU Lesser General Public License as published by the Free Software
      7   Foundation; either version 2.1, or (at your option) any later version.
      8 
      9   TALER is distributed in the hope that it will be useful, but WITHOUT ANY
     10   WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR
     11   A PARTICULAR PURPOSE.  See the GNU Lesser General Public License for more details.
     12 
     13   You should have received a copy of the GNU Lesser General Public License along with
     14   TALER; see the file COPYING.LGPL.  If not, see
     15   <http://www.gnu.org/licenses/>
     16 */
     17 /**
     18  * @file src/include/taler/merchant/patch-private-orders-ORDER_ID-forget.h
     19  * @brief C interface for PATCH /private/orders/$ORDER_ID/forget
     20  * @author Christian Grothoff
     21  */
     22 #ifndef _TALER_MERCHANT__PATCH_PRIVATE_ORDERS_ORDER_ID_FORGET_H
     23 #define _TALER_MERCHANT__PATCH_PRIVATE_ORDERS_ORDER_ID_FORGET_H
     24 
     25 #include <taler/merchant/common.h>
     26 
     27 
     28 /**
     29  * Handle for a PATCH /private/orders/$ORDER_ID/forget operation.
     30  */
     31 struct TALER_MERCHANT_PatchPrivateOrdersForgetHandle;
     32 
     33 
     34 /**
     35  * Set up PATCH /private/orders/$ORDER_ID/forget operation.
     36  * Note that you must explicitly start the operation after setup.
     37  *
     38  * @param ctx the context
     39  * @param url base URL of the merchant backend
     40  * @param order_id identifier of the order
     41  * @param fields_length number of field paths in @a fields
     42  * @param fields array of JSON pointer paths to redact
     43  * @return handle to operation, NULL on error
     44  */
     45 struct TALER_MERCHANT_PatchPrivateOrdersForgetHandle *
     46 TALER_MERCHANT_patch_private_orders_forget_create (
     47   struct GNUNET_CURL_Context *ctx,
     48   const char *url,
     49   const char *order_id,
     50   unsigned int fields_length,
     51   const char *fields[static fields_length]);
     52 
     53 
     54 /**
     55  * Response details for a PATCH /private/orders/$ORDER_ID/forget request.
     56  */
     57 struct TALER_MERCHANT_PatchPrivateOrdersForgetResponse
     58 {
     59   /**
     60    * HTTP response details.
     61    */
     62   struct TALER_MERCHANT_HttpResponse hr;
     63 };
     64 
     65 
     66 #ifndef TALER_MERCHANT_PATCH_PRIVATE_ORDERS_FORGET_RESULT_CLOSURE
     67 /**
     68  * Type of the closure used by
     69  * the #TALER_MERCHANT_PatchPrivateOrdersForgetCallback.
     70  */
     71 #define TALER_MERCHANT_PATCH_PRIVATE_ORDERS_FORGET_RESULT_CLOSURE void
     72 #endif /* TALER_MERCHANT_PATCH_PRIVATE_ORDERS_FORGET_RESULT_CLOSURE */
     73 
     74 /**
     75  * Callback for a PATCH /private/orders/$ORDER_ID/forget request.
     76  *
     77  * @param cls closure
     78  * @param result response details
     79  */
     80 typedef void
     81 (*TALER_MERCHANT_PatchPrivateOrdersForgetCallback)(
     82   TALER_MERCHANT_PATCH_PRIVATE_ORDERS_FORGET_RESULT_CLOSURE *cls,
     83   const struct TALER_MERCHANT_PatchPrivateOrdersForgetResponse *result);
     84 
     85 
     86 /**
     87  * Start PATCH /private/orders/$ORDER_ID/forget operation.
     88  *
     89  * @param[in,out] handle operation to start
     90  * @param cb function to call with the result
     91  * @param cb_cls closure for @a cb
     92  * @return status code, #TALER_EC_NONE on success
     93  */
     94 enum TALER_ErrorCode
     95 TALER_MERCHANT_patch_private_orders_forget_start (
     96   struct TALER_MERCHANT_PatchPrivateOrdersForgetHandle *handle,
     97   TALER_MERCHANT_PatchPrivateOrdersForgetCallback cb,
     98   TALER_MERCHANT_PATCH_PRIVATE_ORDERS_FORGET_RESULT_CLOSURE *cb_cls);
     99 
    100 
    101 /**
    102  * Cancel PATCH /private/orders/$ORDER_ID/forget operation.
    103  * This function must not be called by clients after the
    104  * callback has been invoked.
    105  *
    106  * @param[in] handle operation to cancel
    107  */
    108 void
    109 TALER_MERCHANT_patch_private_orders_forget_cancel (
    110   struct TALER_MERCHANT_PatchPrivateOrdersForgetHandle *handle);
    111 
    112 
    113 #endif /* _TALER_MERCHANT__PATCH_PRIVATE_ORDERS_ORDER_ID_FORGET_H */