/*
  This file is part of Anastasis
  Copyright (C) 2020-2022 Anastasis SARL

  Anastasis is free software; you can redistribute it and/or modify it under the
  terms of the GNU Affero General Public License as published by the Free Software
  Foundation; either version 3, or (at your option) any later version.

  Anastasis is distributed in the hope that it will be useful, but WITHOUT ANY
  WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR
  A PARTICULAR PURPOSE.  See the GNU Affero General Public License for more details.

  You should have received a copy of the GNU Affero General Public License along with
  Anastasis; see the file COPYING.GPL.  If not, see <http://www.gnu.org/licenses/>
*/
/**
 * @file include/anastasis/anastasis-database/insert_auth_iban_in.h
 * @brief Anastasis database: insert auth iban in
 * @author Christian Grothoff
 */
#ifndef ANASTASIS_DATABASE_INSERT_AUTH_IBAN_IN_H
#define ANASTASIS_DATABASE_INSERT_AUTH_IBAN_IN_H

#include <gnunet/gnunet_util_lib.h>
#include <gnunet/gnunet_db_lib.h>
#include "anastasis_service.h"
#include "anastasis/anastasis-database/common.h"

/**
 * Store inbound IBAN payment made for authentication.
 *
 * @param wire_reference unique identifier inside LibEuFin/Nexus
 * @param wire_subject subject of the wire transfer
 * @param amount how much was transferred
 * @param debit_account account that was debited
 * @param credit_account Anastasis operator account credited
 * @param execution_date when was the transfer made
 * @return transaction status
 */
enum GNUNET_DB_QueryStatus
ANASTASIS_DB_insert_auth_iban_in (
  uint64_t wire_reference,
  const char *wire_subject,
  const struct TALER_Amount *amount,
  const char *debit_account,
  const char *credit_account,
  struct GNUNET_TIME_Timestamp execution_date);

#endif
