1 /*************************************************************************** 2 begin : Wed Nov 28 2018 3 copyright : (C) 2018 by Martin Preuss 4 email : martin@libchipcard.de 5 6 *************************************************************************** 7 * This file is part of the project "AqBanking". * 8 * Please see toplevel file COPYING of that project for license details. * 9 ***************************************************************************/ 10 11 12 #ifndef AQBANKING_BANKING_TRANSACTION_H 13 #define AQBANKING_BANKING_TRANSACTION_H 14 15 #include <aqbanking/error.h> 16 #include <aqbanking/types/transaction.h> 17 #include <aqbanking/types/transactionlimits.h> 18 19 20 #ifdef __cplusplus 21 extern "C" { 22 #endif 23 24 25 26 /** @name Working with Transactions 27 * 28 */ 29 /*@{*/ 30 31 32 /** 33 * Check transaction against limits: Check purpose. 34 * @return 0 if okay, errorcode otherwise. 35 * @param t transaction to check 36 * @param lim limits to check against. 37 */ 38 AQBANKING_API int AB_Banking_CheckTransactionAgainstLimits_Purpose(const AB_TRANSACTION *t, 39 const AB_TRANSACTION_LIMITS *lim); 40 41 /** 42 * Check transaction against limits: Check local and remote name. 43 * @return 0 if okay, errorcode otherwise. 44 * @param t transaction to check 45 * @param lim limits to check against. 46 */ 47 AQBANKING_API int AB_Banking_CheckTransactionAgainstLimits_Names(const AB_TRANSACTION *t, 48 const AB_TRANSACTION_LIMITS *lim); 49 50 /** 51 * Check transaction against limits: Check recurrence. 52 * @return 0 if okay, errorcode otherwise. 53 * @param t transaction to check 54 * @param lim limits to check against. 55 */ 56 AQBANKING_API int AB_Banking_CheckTransactionAgainstLimits_Recurrence(const AB_TRANSACTION *t, 57 const AB_TRANSACTION_LIMITS *lim); 58 59 /** 60 * Check transaction against limits: Check execution date. 61 * @return 0 if okay, errorcode otherwise. 62 * @param t transaction to check 63 * @param lim limits to check against. 64 */ 65 AQBANKING_API int AB_Banking_CheckTransactionAgainstLimits_ExecutionDate(const AB_TRANSACTION *t, 66 const AB_TRANSACTION_LIMITS *lim); 67 68 /** 69 * Check transaction against limits: Check date. 70 * @return 0 if okay, errorcode otherwise. 71 * @param t transaction to check 72 * @param lim limits to check against. 73 */ 74 AQBANKING_API int AB_Banking_CheckTransactionAgainstLimits_Date(const AB_TRANSACTION *t, 75 const AB_TRANSACTION_LIMITS *lim); 76 77 /** 78 * Check transaction against limits: Check sequence setup (debit notes). 79 * @return 0 if okay, errorcode otherwise. 80 * @param t transaction to check 81 * @param lim limits to check against. 82 */ 83 AQBANKING_API int AB_Banking_CheckTransactionAgainstLimits_Sequence(const AB_TRANSACTION *t, 84 const AB_TRANSACTION_LIMITS *lim); 85 86 /** 87 * Check transaction for SEPA conformity (IBAN, BIC, names) 88 * @return 0 if okay, errorcode otherwise. 89 * @param t transaction to check 90 * @param lim limits to check against. 91 */ 92 AQBANKING_API int AB_Banking_CheckTransactionForSepaConformity(const AB_TRANSACTION *t, int restricted); 93 94 95 /** 96 * Fill local account info from account spec. 97 */ 98 AQBANKING_API void AB_Banking_FillTransactionFromAccountSpec(AB_TRANSACTION *t, const AB_ACCOUNT_SPEC *as); 99 100 101 /*@}*/ 102 103 104 #ifdef __cplusplus 105 } 106 #endif 107 108 #endif 109