Skip to content
Snippets Groups Projects
Unverified Commit 4a3fe1d9 authored by Jed Fox's avatar Jed Fox Committed by GitHub
Browse files

node-libofx: add transaction_acct_name function (#670)

I am currently not working on adding support for importing to multiple
accounts, but I wanted to give anyone who takes that on a starting point
by updating the underlying C library to provide access to the account
name field.
parent c5c4cbbe
No related branches found
No related tags found
No related merge requests found
......@@ -69,6 +69,13 @@ extern "C" {
// Transaction accessors
char *transaction_acct_name(OfxTransactionData *trans) {
if (trans->account_ptr && trans->account_ptr->account_id_valid) {
return trans->account_ptr->account_id;
}
return "";
}
double transaction_amount(OfxTransactionData *trans) {
return trans->amount;
}
......
......@@ -8,11 +8,14 @@ function create(libofx) {
ofx_set_transaction_cb: libofx.cwrap('ofx_set_transaction_cb', null, [
'number',
'number',
'number'
'number',
]),
transaction_acct_name: libofx.cwrap('transaction_acct_name', 'string', [
'number',
]),
transaction_amount: libofx.cwrap('transaction_amount', 'number', [
'number'
'number',
]),
transaction_fi_id: libofx.cwrap('transaction_fi_id', 'string', ['number']),
transaction_date: libofx.cwrap('transaction_date', 'number', ['number']),
......@@ -22,10 +25,13 @@ function create(libofx) {
set_ofx_version: libofx.cwrap('set_ofx_version', null, [
'number',
'string'
'string',
]),
set_app_id: libofx.cwrap('set_app_id', null, ['number', 'string']),
set_app_version: libofx.cwrap('set_app_version', null, ['number', 'string'])
set_app_version: libofx.cwrap('set_app_version', null, [
'number',
'string',
]),
};
}
......
---
category: Maintenance
authors: [j-f1]
---
`node-libofx`: add transaction_acct_name function
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment