aqbanking  5.7.8
Modules

Modules

 
 Online Banking Tasks
 

User Management Functions

AqBanking controls a list of users. You can ask it for the full list (AB_Banking_GetUsers) or directly request a specific user (AB_Banking_GetUser). AB_USERs contain all information needed to identify a user to the bank's server.

AB_USER_LIST2AB_Banking_GetUsers (const AB_BANKING *ab)
 
AB_USERAB_Banking_GetUser (const AB_BANKING *ab, uint32_t uniqueId)
 
AB_USERAB_Banking_FindUser (const AB_BANKING *ab, const char *backendName, const char *country, const char *bankId, const char *userId, const char *customerId)
 
AB_USER_LIST2AB_Banking_FindUsers (const AB_BANKING *ab, const char *backendName, const char *country, const char *bankId, const char *userId, const char *customerId)
 
AB_USERAB_Banking_CreateUser (AB_BANKING *ab, const char *backendName)
 
int AB_Banking_AddUser (AB_BANKING *ab, AB_USER *u)
 
AB_ACCOUNTAB_Banking_FindFirstAccountOfUser (AB_BANKING *ab, AB_USER *u)
 
int AB_Banking_DeleteUser (AB_BANKING *ab, AB_USER *u)
 

Account Management Functions

AqBanking controls a list of accounts. You can ask it for the full list (AB_Banking_GetAccounts) or directly request a specific account (AB_Banking_GetAccount).

AB_ACCOUNT_LIST2AB_Banking_GetAccounts (const AB_BANKING *ab)
 
AB_ACCOUNTAB_Banking_GetAccount (const AB_BANKING *ab, uint32_t uniqueId)
 
AB_ACCOUNTAB_Banking_GetAccountByCodeAndNumber (const AB_BANKING *ab, const char *bankCode, const char *accountId)
 
AB_ACCOUNTAB_Banking_GetAccountByIban (const AB_BANKING *ab, const char *iban)
 
AB_ACCOUNTAB_Banking_FindAccount (const AB_BANKING *ab, const char *backendName, const char *country, const char *bankId, const char *accountId, const char *subAccountId)
 
AB_ACCOUNT_LIST2AB_Banking_FindAccounts (const AB_BANKING *ab, const char *backendName, const char *country, const char *bankId, const char *accountId, const char *subAccountId)
 
AB_ACCOUNTAB_Banking_FindAccount2 (const AB_BANKING *ab, const char *backendName, const char *country, const char *bankId, const char *accountId, const char *subAccountId, const char *iban, AB_ACCOUNT_TYPE ty)
 
AB_ACCOUNT_LIST2AB_Banking_FindAccounts2 (const AB_BANKING *ab, const char *backendName, const char *country, const char *bankId, const char *accountId, const char *subAccountId, const char *iban, AB_ACCOUNT_TYPE ty)
 
AB_ACCOUNTAB_Banking_CreateAccount (AB_BANKING *ab, const char *backendName)
 
int AB_Banking_AddAccount (AB_BANKING *ab, AB_ACCOUNT *a)
 
int AB_Banking_DeleteAccount (AB_BANKING *ab, AB_ACCOUNT *a)
 

Executing Jobs

int AB_Banking_ExecuteJobs (AB_BANKING *ab, AB_JOB_LIST2 *jl2, AB_IMEXPORTER_CONTEXT *ctx)
 

Detailed Description

Function Documentation

◆ AB_Banking_AddAccount()

int AB_Banking_AddAccount ( AB_BANKING ab,
AB_ACCOUNT a 
)

Adds the given account to the internal list of accounts. Only now it gets a unique id assigned to it. AqBanking takes over the ownership of the given account, so you MUST NOT call AB_Account_free on it!

◆ AB_Banking_AddUser()

int AB_Banking_AddUser ( AB_BANKING ab,
AB_USER u 
)

Enqueues the given user with AqBanking.

◆ AB_Banking_CreateAccount()

AB_ACCOUNT* AB_Banking_CreateAccount ( AB_BANKING ab,
const char *  backendName 
)

Creates an account and shows it to the backend (which might want to extend the newly created account in order to associate some data with it). The newly created account does not have a unique id yet. This id is assigned upon AB_Banking_AddAccount. The caller becomes the owner of the object returned, so you must either call AB_Banking_AddAccount or AB_Account_free on it. This function does not add the user to AqBankings internal list.

◆ AB_Banking_CreateUser()

AB_USER* AB_Banking_CreateUser ( AB_BANKING ab,
const char *  backendName 
)

Creates a user and presents it to the backend (which might want to extend the newly created user in order to associate some data with it). This function does not add the user to AqBanking, please use AB_Banking_AddUser for that purpose.

◆ AB_Banking_DeleteAccount()

int AB_Banking_DeleteAccount ( AB_BANKING ab,
AB_ACCOUNT a 
)

Removes the given account from all internal lists and deletes the object. The caller must not use the AB_ACCOUNT pointer anymore after calling this function.

Returns
Zero on success, nonzero on error.

New in aqbanking-2.2.9.

◆ AB_Banking_DeleteUser()

int AB_Banking_DeleteUser ( AB_BANKING ab,
AB_USER u 
)

Removes the given user from all internal lists and deletes the object. The caller must not use the AB_USER pointer anymore after calling this function.

Watch out: Before this can succeed, this user must be removed from all AB_Accounts that it was added to. Otherwise this operation will fail. So before you call this operation, make sure you either removed the user from its accounts, or delete the accounts in question.

Returns
Zero on success, nonzero on error. In particular, if the user still belongs to any account, "-10" is returned and no operation is done.

New in aqbanking-2.2.9.

◆ AB_Banking_ExecuteJobs()

int AB_Banking_ExecuteJobs ( AB_BANKING ab,
AB_JOB_LIST2 jl2,
AB_IMEXPORTER_CONTEXT ctx 
)

This function sends all jobs from the given list to their respective backend. The results will be stored in the given im-/exporter context.

This function does not take over or free the jobs.

Returns
0 if ok, error code otherwise (see Error Codes)
Parameters
abpointer to the AB_BANKING object
jl2list of enqueued jobs to execute

◆ AB_Banking_FindAccount()

AB_ACCOUNT* AB_Banking_FindAccount ( const AB_BANKING ab,
const char *  backendName,
const char *  country,
const char *  bankId,
const char *  accountId,
const char *  subAccountId 
)

This function returns the first account which matches the given parameters. For all parameters wildcards ("*") and joker ("?") are allowed.

◆ AB_Banking_FindAccount2()

AB_ACCOUNT* AB_Banking_FindAccount2 ( const AB_BANKING ab,
const char *  backendName,
const char *  country,
const char *  bankId,
const char *  accountId,
const char *  subAccountId,
const char *  iban,
AB_ACCOUNT_TYPE  ty 
)

This function returns the first account which matches the given parameters. For all parameters wildcards ("*") and joker ("?") are allowed. This function also takes the account type into account.

◆ AB_Banking_FindAccounts()

AB_ACCOUNT_LIST2* AB_Banking_FindAccounts ( const AB_BANKING ab,
const char *  backendName,
const char *  country,
const char *  bankId,
const char *  accountId,
const char *  subAccountId 
)

This function returns a list of accounts which match the given parameters. For all parameters wildcards ("*") and joker ("?") are allowed. If no account matches (or there simply are no accounts) then NULL is returned. The caller is responsible for freeing the list returned (ifany) by calling AB_Account_List2_free. AqBanking still remains the owner of every account reported via this function, so you MUST NOT call AB_Account_List2_FreeAll.

◆ AB_Banking_FindAccounts2()

AB_ACCOUNT_LIST2* AB_Banking_FindAccounts2 ( const AB_BANKING ab,
const char *  backendName,
const char *  country,
const char *  bankId,
const char *  accountId,
const char *  subAccountId,
const char *  iban,
AB_ACCOUNT_TYPE  ty 
)

This function returns a list of accounts which match the given parameters. For all parameters wildcards ("*") and joker ("?") are allowed. If no account matches (or there simply are no accounts) then NULL is returned. The caller is responsible for freeing the list returned (ifany) by calling AB_Account_List2_free. AqBanking still remains the owner of every account reported via this function, so you MUST NOT call AB_Account_List2_FreeAll. This function also takes the account type into account.

◆ AB_Banking_FindFirstAccountOfUser()

AB_ACCOUNT* AB_Banking_FindFirstAccountOfUser ( AB_BANKING ab,
AB_USER u 
)

Searches all accounts for one that contains the given user. Returns the first of these accounts, or NULL if this user does not belong to any account.

It is a prerequisite of AB_Banking_DeleteUser() that the user must not belong to any account anymore. Use this function to check whether this is the case (i.e. this function returns NULL), or if it is not the case, you know at least one account that this user still belongs to.

Returns
The first account that this user belongs to, or NULL if this user does not belong to any account.

New in aqbanking-2.2.9.

◆ AB_Banking_FindUser()

AB_USER* AB_Banking_FindUser ( const AB_BANKING ab,
const char *  backendName,
const char *  country,
const char *  bankId,
const char *  userId,
const char *  customerId 
)

This function returns the first user which matches the given parameters. For all parameters wildcards ("*") and joker ("?") are allowed.

◆ AB_Banking_FindUsers()

AB_USER_LIST2* AB_Banking_FindUsers ( const AB_BANKING ab,
const char *  backendName,
const char *  country,
const char *  bankId,
const char *  userId,
const char *  customerId 
)

This function returns a list of users which match the given parameters. For all parameters wildcards ("*") and joker ("?") are allowed. If no user matches (or there simply are no users) then NULL is returned. The caller is responsible for freeing the list returned (if any) by calling AB_User_List2_free. AqBanking still remains the owner of every user reported via this function, so you MUST NOT call AB_User_List2_freeAll.

◆ AB_Banking_GetAccount()

AB_ACCOUNT* AB_Banking_GetAccount ( const AB_BANKING ab,
uint32_t  uniqueId 
)

This function does an account lookup based on the given unique id. This id is assigned by AqBanking when an account is added to AqBanking via AB_Banking_AddAccount.

AqBanking remains the owner of the object returned (if any), so you must not free it.

Please also note that the object returned is only valid until AB_Banking_Fini() has been called (or until the corresponding backend for this particular account has been deactivated).

Returns
The account, or NULL if it is not found.
Parameters
abpointer to the AB_BANKING object
uniqueIdunique id of the account assigned by AqBanking

◆ AB_Banking_GetAccountByCodeAndNumber()

AB_ACCOUNT* AB_Banking_GetAccountByCodeAndNumber ( const AB_BANKING ab,
const char *  bankCode,
const char *  accountId 
)

This function does an account lookup based on the given bank code and account number. No wildards or jokers allowed.

AqBanking remains the owner of the object returned (if any), so you must not free it.

Please also note that the object returned is only valid until AB_Banking_Fini() has been called (or until the corresponding backend for this particular account has been deactivated).

Returns
The account, or NULL if it is not found.
Parameters
abpointer to the AB_BANKING object
bankCodebank code (use 0 if your country does not use bank codes)
accountIdaccount number

◆ AB_Banking_GetAccountByIban()

AB_ACCOUNT* AB_Banking_GetAccountByIban ( const AB_BANKING ab,
const char *  iban 
)

This function does an account lookup based on the given IBAN. No wildards or jokers allowed.

AqBanking remains the owner of the object returned (if any), so you must not free it.

Please also note that the object returned is only valid until AB_Banking_Fini() has been called (or until the corresponding backend for this particular account has been deactivated).

Returns
The account, or NULL if it is not found.
Parameters
abpointer to the AB_BANKING object
bankCodebank code (use 0 if your country does not use bank codes)
accountIdaccount number

◆ AB_Banking_GetAccounts()

AB_ACCOUNT_LIST2* AB_Banking_GetAccounts ( const AB_BANKING ab)

Returns a list of currently known accounts, or NULL if there are no accounts. The returned list is owned by the caller, so he is responsible for freeing it (using AB_Account_List2_free).

Please note that even while the list is owned by the caller the accounts in that list are not! Sou you may not free any of those accounts in the list (e.g. by calling AB_Account_List2_FreeAll).

Returns
The list of accounts, or NULL if there are none.
Parameters
abpointer to the AB_BANKING object

◆ AB_Banking_GetUser()

AB_USER* AB_Banking_GetUser ( const AB_BANKING ab,
uint32_t  uniqueId 
)

Returns the user with the given unique id.

◆ AB_Banking_GetUsers()

AB_USER_LIST2* AB_Banking_GetUsers ( const AB_BANKING ab)

Returns a list of currently known users, or NULL if there are no users. The returned list is owned by the caller, so he is responsible for freeing it (using AB_User_List2_free).

Please note that even while the list is owned by the caller the users in that list are not! So you may not free any of those users in the list (e.g. by calling AB_User_List2_FreeAll).

Returns
The list of users, or NULL if there are none.
Parameters
abpointer to the AB_BANKING object