Main Page | Class Hierarchy | Data Structures | File List | Data Fields | Globals

OfxTransactionData Struct Reference


Detailed Description

An abstraction of a transaction in an account.

The OfxTransactionData stucture contains all available information about an actual transaction in an account.

Definition at line 260 of file inc/libofx.h.

OFX mandatory elements

The OFX spec defines the following elements as mandatory. The associated variables should all contain valid data but you should not trust the servers. Check if the associated *_valid is true before using them.

enum  TransactionType {
  OFX_CREDIT, OFX_DEBIT, OFX_INT, OFX_DIV,
  OFX_FEE, OFX_SRVCHG, OFX_DEP, OFX_ATM,
  OFX_POS, OFX_XFER, OFX_CHECK, OFX_PAYMENT,
  OFX_CASH, OFX_DIRECTDEP, OFX_DIRECTDEBIT, OFX_REPEATPMT,
  OFX_OTHER
}
enum  InvTransactionType {
  OFX_BUYDEBT, OFX_BUYMF, OFX_BUYOPT, OFX_BUYOTHER,
  OFX_BUYSTOCK, OFX_CLOSUREOPT, OFX_INCOME, OFX_INVEXPENSE,
  OFX_JRNLFUND, OFX_JRNLSEC, OFX_MARGININTEREST, OFX_REINVEST,
  OFX_RETOFCAP, OFX_SELLDEBT, OFX_SELLMF, OFX_SELLOPT,
  OFX_SELLOTHER, OFX_SELLSTOCK, OFX_SPLIT, OFX_TRANSFER
}
char account_id [OFX_ACCOUNT_ID_LENGTH]
OfxAccountDataaccount_ptr
int account_id_valid
enum OfxTransactionData::TransactionType transactiontype
int transactiontype_valid
enum OfxTransactionData::InvTransactionType invtransactiontype
int invtransactiontype_valid
double units
int units_valid
double unitprice
int unitprice_valid
double amount
int amount_valid
char fi_id [256]
int fi_id_valid

OFX optional elements

The OFX spec defines the following elements as optional. If the associated *_valid is true, the corresponding element is present and the associated variable contains valid data.

enum  FiIdCorrectionAction { DELETE, REPLACE }
char unique_id [OFX_UNIQUE_ID_LENGTH]
int unique_id_valid
char unique_id_type [OFX_UNIQUE_ID_TYPE_LENGTH]
int unique_id_type_valid
OfxSecurityDatasecurity_data_ptr
int security_data_valid
time_t date_posted
int date_posted_valid
time_t date_initiated
int date_initiated_valid
time_t date_funds_available
int date_funds_available_valid
char fi_id_corrected [256]
int fi_id_corrected_valid
enum OfxTransactionData::FiIdCorrectionAction fi_id_correction_action
int fi_id_correction_action_valid
char server_transaction_id [OFX_SVRTID2_LENGTH]
int server_transaction_id_valid
char check_number [OFX_CHECK_NUMBER_LENGTH]
int check_number_valid
char reference_number [OFX_REFERENCE_NUMBER_LENGTH]
int reference_number_valid
long int standard_industrial_code
int standard_industrial_code_valid
char payee_id [OFX_SVRTID2_LENGTH]
int payee_id_valid
char name [OFX_TRANSACTION_NAME_LENGTH]
int name_valid
char memo [OFX_MEMO2_LENGTH]
int memo_valid

OFX mandatory elements

The OFX spec defines the following elements as mandatory. The associated variables should all contain valid data but you should not trust the servers. Check if the associated *_valid is true before using them.

enum  TransactionType {
  OFX_CREDIT, OFX_DEBIT, OFX_INT, OFX_DIV,
  OFX_FEE, OFX_SRVCHG, OFX_DEP, OFX_ATM,
  OFX_POS, OFX_XFER, OFX_CHECK, OFX_PAYMENT,
  OFX_CASH, OFX_DIRECTDEP, OFX_DIRECTDEBIT, OFX_REPEATPMT,
  OFX_OTHER
}
enum  InvTransactionType {
  OFX_BUYDEBT, OFX_BUYMF, OFX_BUYOPT, OFX_BUYOTHER,
  OFX_BUYSTOCK, OFX_CLOSUREOPT, OFX_INCOME, OFX_INVEXPENSE,
  OFX_JRNLFUND, OFX_JRNLSEC, OFX_MARGININTEREST, OFX_REINVEST,
  OFX_RETOFCAP, OFX_SELLDEBT, OFX_SELLMF, OFX_SELLOPT,
  OFX_SELLOTHER, OFX_SELLSTOCK, OFX_SPLIT, OFX_TRANSFER
}
OfxAccountDataaccount_ptr
enum OfxTransactionData::TransactionType transactiontype
enum OfxTransactionData::InvTransactionType invtransactiontype

OFX optional elements

The OFX spec defines the following elements as optional. If the associated *_valid is true, the corresponding element is present and the associated variable contains valid data.

enum  FiIdCorrectionAction { DELETE, REPLACE }
OfxSecurityDatasecurity_data_ptr
enum OfxTransactionData::FiIdCorrectionAction fi_id_correction_action

Public Types


Member Enumeration Documentation

enum OfxTransactionData::FiIdCorrectionAction
 

The OfxTransactionData::FiIdCorrectionAction enum contains the action to be taken

Enumeration values:
DELETE  The transaction with a fi_id matching fi_id_corrected should be deleted
REPLACE  The transaction with a fi_id matching fi_id_corrected should be replaced with this one

Definition at line 382 of file libofx-0.6.5/inc/libofx.h.

enum OfxTransactionData::FiIdCorrectionAction
 

The OfxTransactionData::FiIdCorrectionAction enum contains the action to be taken

Enumeration values:
DELETE  The transaction with a fi_id matching fi_id_corrected should be deleted
REPLACE  The transaction with a fi_id matching fi_id_corrected should be replaced with this one

Definition at line 382 of file inc/libofx.h.

enum OfxTransactionData::InvTransactionType
 

Enumeration values:
OFX_BUYDEBT  Buy debt security
OFX_BUYMF  Buy mutual fund
OFX_BUYOPT  Buy option
OFX_BUYOTHER  Buy other security type
OFX_BUYSTOCK  Buy stock
OFX_CLOSUREOPT  Close a position for an option
OFX_INCOME  Investment income is realized as cash into the investment account
OFX_INVEXPENSE  Misc investment expense that is associated with a specific security
OFX_JRNLFUND  Journaling cash holdings between subaccounts within the same investment account
OFX_JRNLSEC  Journaling security holdings between subaccounts within the same investment account
OFX_MARGININTEREST  Margin interest expense
OFX_REINVEST  Reinvestment of income
OFX_RETOFCAP  Return of capital
OFX_SELLDEBT  Sell debt security. Used when debt is sold, called, or reached maturity
OFX_SELLMF  Sell mutual fund
OFX_SELLOPT  Sell option
OFX_SELLOTHER  Sell other type of security
OFX_SELLSTOCK  Sell stock
OFX_SPLIT  Stock or mutial fund split
OFX_TRANSFER  Transfer holdings in and out of the investment account

Definition at line 297 of file libofx-0.6.5/inc/libofx.h.

enum OfxTransactionData::InvTransactionType
 

Enumeration values:
OFX_BUYDEBT  Buy debt security
OFX_BUYMF  Buy mutual fund
OFX_BUYOPT  Buy option
OFX_BUYOTHER  Buy other security type
OFX_BUYSTOCK  Buy stock
OFX_CLOSUREOPT  Close a position for an option
OFX_INCOME  Investment income is realized as cash into the investment account
OFX_INVEXPENSE  Misc investment expense that is associated with a specific security
OFX_JRNLFUND  Journaling cash holdings between subaccounts within the same investment account
OFX_JRNLSEC  Journaling security holdings between subaccounts within the same investment account
OFX_MARGININTEREST  Margin interest expense
OFX_REINVEST  Reinvestment of income
OFX_RETOFCAP  Return of capital
OFX_SELLDEBT  Sell debt security. Used when debt is sold, called, or reached maturity
OFX_SELLMF  Sell mutual fund
OFX_SELLOPT  Sell option
OFX_SELLOTHER  Sell other type of security
OFX_SELLSTOCK  Sell stock
OFX_SPLIT  Stock or mutial fund split
OFX_TRANSFER  Transfer holdings in and out of the investment account

Definition at line 297 of file inc/libofx.h.

enum OfxTransactionData::TransactionType
 

Enumeration values:
OFX_CREDIT  Generic credit
OFX_DEBIT  Generic debit
OFX_INT  Interest earned or paid (Note: Depends on signage of amount)
OFX_DIV  Dividend
OFX_FEE  FI fee
OFX_SRVCHG  Service charge
OFX_DEP  Deposit
OFX_ATM  ATM debit or credit (Note: Depends on signage of amount)
OFX_POS  Point of sale debit or credit (Note: Depends on signage of amount)
OFX_XFER  Transfer
OFX_CHECK  Check
OFX_PAYMENT  Electronic payment
OFX_CASH  Cash withdrawal
OFX_DIRECTDEP  Direct deposit
OFX_DIRECTDEBIT  Merchant initiated debit
OFX_REPEATPMT  Repeating payment/standing order
OFX_OTHER  Somer other type of transaction

Definition at line 273 of file libofx-0.6.5/inc/libofx.h.

enum OfxTransactionData::TransactionType
 

Enumeration values:
OFX_CREDIT  Generic credit
OFX_DEBIT  Generic debit
OFX_INT  Interest earned or paid (Note: Depends on signage of amount)
OFX_DIV  Dividend
OFX_FEE  FI fee
OFX_SRVCHG  Service charge
OFX_DEP  Deposit
OFX_ATM  ATM debit or credit (Note: Depends on signage of amount)
OFX_POS  Point of sale debit or credit (Note: Depends on signage of amount)
OFX_XFER  Transfer
OFX_CHECK  Check
OFX_PAYMENT  Electronic payment
OFX_CASH  Cash withdrawal
OFX_DIRECTDEP  Direct deposit
OFX_DIRECTDEBIT  Merchant initiated debit
OFX_REPEATPMT  Repeating payment/standing order
OFX_OTHER  Somer other type of transaction

Definition at line 273 of file inc/libofx.h.


Field Documentation

char OfxTransactionData::account_id
 

Use this for matching with the relevant account in your application

Definition at line 267 of file libofx-0.6.5/inc/libofx.h.

Referenced by ofx_proc_transaction_cb().

struct OfxAccountData* OfxTransactionData::account_ptr
 

Pointer to the full account structure, see OfxAccountData

Definition at line 270 of file libofx-0.6.5/inc/libofx.h.

struct OfxAccountData* OfxTransactionData::account_ptr
 

Pointer to the full account structure, see OfxAccountData

Definition at line 270 of file inc/libofx.h.

double OfxTransactionData::amount
 

Total monetary amount of the transaction, signage will determine if money went in or out. amount is the total amount: -(units) * unitprice - various fees

Definition at line 332 of file libofx-0.6.5/inc/libofx.h.

Referenced by OfxInvestmentTransactionContainer::add_attribute(), OfxBankTransactionContainer::add_attribute(), and ofx_proc_transaction_cb().

char OfxTransactionData::check_number
 

The check number is most likely an integer and can probably be converted properly with atoi(). However the spec allows for up to 12 digits, so it is not garanteed to work

Definition at line 397 of file libofx-0.6.5/inc/libofx.h.

Referenced by OfxBankTransactionContainer::add_attribute(), and ofx_proc_transaction_cb().

time_t OfxTransactionData::date_funds_available
 

Date the funds are available (not always provided) (ex: the date you are allowed to withdraw a deposit

Definition at line 371 of file libofx-0.6.5/inc/libofx.h.

Referenced by OfxTransactionContainer::add_attribute(), and ofx_proc_transaction_cb().

time_t OfxTransactionData::date_initiated
 

Date the transaction was initiated (ex: date you bought something in a store for credit card; trade date for stocks; day of record for stock split)

Mandatory for investment transactions

Definition at line 364 of file libofx-0.6.5/inc/libofx.h.

Referenced by OfxInvestmentTransactionContainer::add_attribute(), OfxTransactionContainer::add_attribute(), and ofx_proc_transaction_cb().

time_t OfxTransactionData::date_posted
 

Date the transaction took effect (ex: date it appeared on your credit card bill). Setlement date; for stock split, execution date.

Mandatory for bank and credit card transactions

Definition at line 357 of file libofx-0.6.5/inc/libofx.h.

Referenced by OfxInvestmentTransactionContainer::add_attribute(), OfxTransactionContainer::add_attribute(), and ofx_proc_transaction_cb().

char OfxTransactionData::fi_id
 

Generated by the financial institution (fi), unique id of the transaction, to be used to detect duplicate downloads

Definition at line 337 of file libofx-0.6.5/inc/libofx.h.

Referenced by OfxTransactionContainer::add_attribute(), and ofx_proc_transaction_cb().

char OfxTransactionData::fi_id_corrected
 

IMPORTANT: if fi_id_corrected is present, this transaction is meant to replace or delete the transaction with this fi_id. See OfxTransactionData::fi_id_correction_action to know what to do.

Definition at line 378 of file libofx-0.6.5/inc/libofx.h.

Referenced by OfxTransactionContainer::add_attribute(), and ofx_proc_transaction_cb().

enum OfxTransactionData::FiIdCorrectionAction OfxTransactionData::fi_id_correction_action
 

The OfxTransactionData::FiIdCorrectionAction enum contains the action to be taken

enum OfxTransactionData::FiIdCorrectionAction OfxTransactionData::fi_id_correction_action
 

The OfxTransactionData::FiIdCorrectionAction enum contains the action to be taken

Referenced by OfxTransactionContainer::add_attribute(), and ofx_proc_transaction_cb().

char OfxTransactionData::memo
 

Extra information not included in name

Definition at line 411 of file libofx-0.6.5/inc/libofx.h.

Referenced by OfxTransactionContainer::add_attribute(), and ofx_proc_transaction_cb().

char OfxTransactionData::name
 

Can be the name of the payee or the description of the transaction

Definition at line 408 of file libofx-0.6.5/inc/libofx.h.

Referenced by OfxBankTransactionContainer::add_attribute(), and ofx_proc_transaction_cb().

char OfxTransactionData::payee_id
 

The identifier of the payee

Definition at line 406 of file libofx-0.6.5/inc/libofx.h.

Referenced by OfxBankTransactionContainer::add_attribute(), and ofx_proc_transaction_cb().

char OfxTransactionData::reference_number
 

Might present in addition to or instead of a check_number. Not necessarily a number

Definition at line 401 of file libofx-0.6.5/inc/libofx.h.

Referenced by OfxBankTransactionContainer::add_attribute(), and ofx_proc_transaction_cb().

int OfxTransactionData::security_data_valid
 

A pointer to the security's data.

Definition at line 355 of file libofx-0.6.5/inc/libofx.h.

Referenced by OfxTransactionContainer::gen_event(), and ofx_proc_transaction_cb().

char OfxTransactionData::server_transaction_id
 

Used for user initiated transaction such as payment or funds transfer. Can be seen as a confirmation number.

Definition at line 392 of file libofx-0.6.5/inc/libofx.h.

Referenced by OfxTransactionContainer::add_attribute(), and ofx_proc_transaction_cb().

long int OfxTransactionData::standard_industrial_code
 

The standard industrial code can have at most 6 digits

Definition at line 403 of file libofx-0.6.5/inc/libofx.h.

Referenced by OfxBankTransactionContainer::add_attribute(), and ofx_proc_transaction_cb().

int OfxTransactionData::transactiontype_valid
 

Investment transaction type. You should read this if transactiontype == OFX_OTHER. See OFX spec 1.6 p.442 to 445 for details

Definition at line 294 of file libofx-0.6.5/inc/libofx.h.

Referenced by OfxBankTransactionContainer::add_attribute(), and ofx_proc_transaction_cb().

char OfxTransactionData::unique_id
 

The id of the security being traded. Mandatory for investment transactions

Definition at line 349 of file libofx-0.6.5/inc/libofx.h.

Referenced by OfxInvestmentTransactionContainer::add_attribute(), OfxTransactionContainer::gen_event(), and ofx_proc_transaction_cb().

char OfxTransactionData::unique_id_type
 

Usially "CUSIP" for FIs in north america

Definition at line 351 of file libofx-0.6.5/inc/libofx.h.

Referenced by OfxInvestmentTransactionContainer::add_attribute(), and ofx_proc_transaction_cb().

double OfxTransactionData::unitprice
 

Value of each unit, 1.00 if the commodity is money

Definition at line 329 of file libofx-0.6.5/inc/libofx.h.

Referenced by OfxInvestmentTransactionContainer::add_attribute(), OfxBankTransactionContainer::add_attribute(), and ofx_proc_transaction_cb().

double OfxTransactionData::units
 

Variation of the number of units of the commodity Suppose units is -10, ave unitprice is 1. If the commodity is stock, you have 10 less stock, but 10 more dollars in you amccount (fees not considered, see amount). If commodity is money, you have 10 less dollars in your pocket, but 10 more in your account

Definition at line 322 of file libofx-0.6.5/inc/libofx.h.

Referenced by OfxInvestmentTransactionContainer::add_attribute(), OfxBankTransactionContainer::add_attribute(), and ofx_proc_transaction_cb().


The documentation for this struct was generated from the following files:
Generated on Fri Sep 12 00:35:47 2003 for LibOFX by doxygen 1.3.3