merchant

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

report_deliveries.h (1773B)


      1 /*
      2    This file is part of TALER
      3    Copyright (C) 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 General Public License as published by the Free Software
      7    Foundation; either version 3, 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 General Public License for more details.
     12 
     13    You should have received a copy of the GNU General Public License along with
     14    TALER; see the file COPYING.  If not, see <http://www.gnu.org/licenses/>
     15  */
     16 #ifndef MERCHANT_DATABASE_REPORT_DELIVERIES_H
     17 #define MERCHANT_DATABASE_REPORT_DELIVERIES_H
     18 
     19 #include "merchantdb_lib.h"
     20 
     21 /* All operations use the currently selected merchant instance. */
     22 enum GNUNET_DB_QueryStatus
     23 TALER_MERCHANTDB_queue_report_test (
     24   struct TALER_MERCHANTDB_PostgresContext *pg,
     25   uint64_t schedule_id,
     26   const char *description,
     27   const char *program,
     28   const char *source,
     29   const char *target,
     30   const char *mime,
     31   uint64_t *delivery_id);
     32 
     33 enum GNUNET_DB_QueryStatus
     34 TALER_MERCHANTDB_claim_delivery (
     35   struct TALER_MERCHANTDB_PostgresContext *pg,
     36   uint64_t job,
     37   struct GNUNET_TIME_Absolute due,
     38   struct GNUNET_TIME_Absolute next,
     39   uint64_t *delivery_id);
     40 
     41 enum GNUNET_DB_QueryStatus
     42 TALER_MERCHANTDB_finish_delivery (
     43   struct TALER_MERCHANTDB_PostgresContext *pg,
     44   uint64_t delivery_id,
     45   uint32_t ec,
     46   const char *detail);
     47 
     48 enum GNUNET_DB_QueryStatus
     49 TALER_MERCHANTDB_read_deliveries (
     50   struct TALER_MERCHANTDB_PostgresContext *pg,
     51   uint64_t id,
     52   uint64_t schedule_id,
     53   uint64_t offset,
     54   int64_t limit,
     55   json_t **deliveries);
     56 
     57 #endif