Main Page   Modules   Namespace List   Class Hierarchy   Alphabetical List   Compound List   File List   Namespace Members   Compound Members   File Members   Related Pages  

HBCI::Transaction Class Reference

Holds all the data of a transaction in HBCI. More...

#include <transaction.h>

Inheritance diagram for HBCI::Transaction:

Inheritance graph
[legend]
List of all members.

Public Methods

 Transaction ()
virtual ~Transaction ()
bool operator== (const Transaction &tda) const
unique id
virtual unsigned int id () const
virtual void setId (unsigned int i)
Our account
int ourCountryCode () const
void setOurCountryCode (int i)
const string & ourBankCode () const
void setOurBankCode (const string &code)
const string & ourAccountId () const
void setOurAccountId (const string &id)
const string & ourSuffix () const
void setOurSuffix (const string &id)
Date
const Date & valutaDate () const
void setValutaDate (const Date &d)
const Date & date () const
void setDate (const Date &d)
Value
const Value & value () const
void setValue (const Value &v)
Type of Transaction
const string & transactionKey () const
void setTransactionKey (const string &s)
Reference String
const string & customerReference () const
void setCustomerReference (const string &s)
const string & bankReference () const
void setBankReference (const string &s)
Currency exchange
const Value & originalValue () const
void setOriginalValue (const Value &v)
const Value & charge () const
void setCharge (const Value &v)
Transaction Description
int transactionCode () const
void setTransactionCode (int c)
const string & transactionText () const
void setTransactionText (const string &s)
const string & primanota () const
void setPrimanota (const string &s)
const list< string > & description () const
void addDescription (const string &s)
Other account
int otherCountryCode () const
void setOtherCountryCode (int i)
const string & otherBankCode () const
void setOtherBankCode (const string &s)
const string & otherAccountId () const
void setOtherAccountId (const string &s)
const string & otherSuffix () const
void setOtherSuffix (const string &id)
const list< string > & otherName () const
void addOtherName (const string &s)

Detailed Description

Holds all the data of a transaction in HBCI.

This class represents a transaction. It therefore implements two different specifications:

  1. If this transaction comes from the bank and you retrieved it with the "get transactions" job, then the data in this class comes from the SWIFT MT 940 specification.

  2. If you prepare this transaction by yourself in order to send it to the bank as a "bank transfer" job, then the data in this class is interpreted according to the DTAUS0 specification.
It is intended to document each member of this class with a reference to the corresponding fields in those two specifications. FIXME: Unfortunately so far only the references to the SWIFT MT940 fields have been added, but DTAUS0 comments will be added soon.

The data getters/setters are ordered in the order in which they appear in the SWIFT MT940 Specification (HBCI Spec. chapter IX.2.8). That specification is therefore the authoritative source of what precisely each data element means. (Unfortunately sometimes the spec is not so precise...)

Note that a whole lot of important information wasn't specified in the MT940 itself but only as an additional structure of the "misc. field" Number 86. Those data fields are specified by the ZKA but not SWIFT itself, and therefore it is noted where that field No. 86 comes into play.

Author:
Martin Preuss<openhbci@aquamaniac.de>


Constructor & Destructor Documentation

HBCI::Transaction::Transaction (    ) 
 

virtual HBCI::Transaction::~Transaction (    )  [virtual]
 


Member Function Documentation

void HBCI::Transaction::addDescription (  const string &    s )  [inline, virtual]
 

Description of what this transaction is for, and how the Bank describes this transaction.

Note: Every single string represents one line, and each line is going to be truncated to have at most 27 characters.

According to HBCI Spec chapter IX.2.8, somewhere in these lines this might contain the equivalent transaction value in DEM vs. EUR or vice versa. Also, if the originalValue() and charge() above was unused but this in fact had a original value and charges, then that information might be contained somewhere in these description lines. (Good luck.)

-- Verwendungszweck; fields 20-29 and 60-63 in field :86:

Implements HBCI::AbstractTrans.

void HBCI::Transaction::addOtherName (  const string &    s )  [inline, virtual]
 

Name of the other party -- fields 32 and 33 in field :86: Each single string (there are two strings allowed) is going to be truncated to have at most 27 characters.

Implements HBCI::AbstractTrans.

const string& HBCI::Transaction::bankReference (    )  const [inline]
 

Reference string for this transaction given by the bank, if it has given one. Otherwise empty. -- Bankreferenz in :61:

const Value& HBCI::Transaction::charge (    )  const [inline]
 

NOT IMPLEMENTED. If this transaction was in a different currency than your account is in, then this is the extra amount charged for currency exchange. Currently NOT IMPLEMENTED in the MT940 parser. -- Gebührenbetrag (charges) in :61:

const string& HBCI::Transaction::customerReference (    )  const [inline]
 

Reference string, if the customer (you) has specified one. (E.g. the cheque number.) Otherwise "NONREF". -- Kundenreferenz in :61:

const Date& HBCI::Transaction::date (    )  const [inline]
 

The date when the transaction was booked. In MT940 spec this has only four characters (no year), so we take the year from the valutaDate(). -- Buchungsdatum in :61:

const list<string>& HBCI::Transaction::description (    )  const [inline, virtual]
 

Description of what this transaction is for, and how the Bank describes this transaction.

According to HBCI Spec chapter IX.2.8, somewhere in these lines this might contain the equivalent transaction value in DEM vs. EUR or vice versa. Also, if the originalValue() and charge() above was unused but this in fact had a original value and charges, then that information might be contained somewhere in these description lines. (Good luck.)

-- Verwendungszweck; fields 20-29 and 60-63 in field :86:

Implements HBCI::AbstractTrans.

virtual unsigned int HBCI::Transaction::id (    )  const [inline, virtual]
 

unique id of the transaction

bool HBCI::Transaction::operator== (  const Transaction &    tda )  const
 

Compares this Transaction to the given one.

Author:
Martin Preuss<openhbci@aquamaniac.de>

const Value& HBCI::Transaction::originalValue (    )  const [inline]
 

NOT IMPLEMENTED. If this transaction was in a different currency than your account is in, then this is the transaction value in the original currency. Otherwise zero. Currently NOT IMPLEMENTED in the MT940 parser. -- Ursprungsbetrag in :61:

const string& HBCI::Transaction::otherAccountId (    )  const [inline, virtual]
 

Account number of the other party -- Kontonummer; field 31 in field :86:

Implements HBCI::AbstractTrans.

const string& HBCI::Transaction::otherBankCode (    )  const [inline, virtual]
 

Institute code (BLZ) of the other party's institute -- BLZ; field 30 in field :86:

Implements HBCI::AbstractTrans.

int HBCI::Transaction::otherCountryCode (    )  const [inline, virtual]
 

Country code (BLZ) of the other party's institute -- not in MT940/field :86:

Implements HBCI::AbstractTrans.

const list<string>& HBCI::Transaction::otherName (    )  const [inline, virtual]
 

Name of the other party -- fields 32 and 33 in field :86:

Implements HBCI::AbstractTrans.

const string& HBCI::Transaction::otherSuffix (    )  const [inline, virtual]
 

If the account of the other party has subaccounts which are distinguished by different suffixes, then this is that suffix of the other party. Otherwise it's empty. -- *not* in MT940 / field :86:

Implements HBCI::AbstractTrans.

const string& HBCI::Transaction::ourAccountId (    )  const [inline, virtual]
 

Your account number; up to 23 characters. Note: possibly including the currency (yes, that's what MT940 says) -- Kontonummer in :25:

Implements HBCI::AbstractTrans.

const string& HBCI::Transaction::ourBankCode (    )  const [inline, virtual]
 

bank code of your institute (BLZ or S.W.I.F.T. code) -- BLZ in :25:

Implements HBCI::AbstractTrans.

int HBCI::Transaction::ourCountryCode (    )  const [inline, virtual]
 

country code of your institute -- not in MT940

Implements HBCI::AbstractTrans.

const string& HBCI::Transaction::ourSuffix (    )  const [inline, virtual]
 

If your account has subaccounts which are distinguished by different suffixes, then this is that suffix. Otherwise it's empty. -- not in MT940

Implements HBCI::AbstractTrans.

const string& HBCI::Transaction::primanota (    )  const [inline]
 

Primanoten-Number (no idea what this means) -- Primanoten-Nummer; field 10 in field :86:

void HBCI::Transaction::setBankReference (  const string &    s )  [inline]
 

Reference string for this transaction given by the bank, if it has given one. Otherwise empty. -- Bankreferenz in :61:

void HBCI::Transaction::setCharge (  const Value &    v )  [inline]
 

NOT IMPLEMENTED. If this transaction was in a different currency than your account is in, then this is the extra amount charged for currency exchange. Currently NOT IMPLEMENTED in the MT940 parser. -- Gebührenbetrag (charges) in :61:

void HBCI::Transaction::setCustomerReference (  const string &    s )  [inline]
 

Reference string, if the customer (you) has specified one. (E.g. the cheque number.) Otherwise "NONREF". -- Kundenreferenz in :61:

void HBCI::Transaction::setDate (  const Date &    d )  [inline]
 

The date when the transaction was booked. In MT940 spec this has only four characters (no year), so we take the year from the valutaDate(). -- Buchungsdatum in :61:

virtual void HBCI::Transaction::setId (  unsigned int    i )  [inline, virtual]
 

set unique id of the transaction

void HBCI::Transaction::setOriginalValue (  const Value &    v )  [inline]
 

NOT IMPLEMENTED. If this transaction was in a different currency than your account is in, then this is the transaction value in the original currency. Otherwise zero. Currently NOT IMPLEMENTED in the MT940 parser. -- Ursprungsbetrag in :61:

void HBCI::Transaction::setOtherAccountId (  const string &    s )  [inline, virtual]
 

Account number of the other party -- Kontonummer; field 31 in field :86:

Implements HBCI::AbstractTrans.

void HBCI::Transaction::setOtherBankCode (  const string &    s )  [inline, virtual]
 

Institute code (BLZ) of the other party's institute -- BLZ; field 30 in field :86:

Implements HBCI::AbstractTrans.

void HBCI::Transaction::setOtherCountryCode (  int    i )  [inline, virtual]
 

Country code (BLZ) of the other party's institute -- not in MT940/field :86:

Implements HBCI::AbstractTrans.

void HBCI::Transaction::setOtherSuffix (  const string &    id )  [inline, virtual]
 

If the account of the other party has subaccounts which are distinguished by different suffixes, then this is that suffix of the other party. Otherwise it's empty. -- *not* in MT940 / field :86:

Implements HBCI::AbstractTrans.

void HBCI::Transaction::setOurAccountId (  const string &    id )  [inline, virtual]
 

Your account number; up to 23 characters. Note: possibly including the currency (yes, that's what MT940 says) -- Kontonummer in :25:

Implements HBCI::AbstractTrans.

void HBCI::Transaction::setOurBankCode (  const string &    code )  [inline, virtual]
 

bank code of your institute (BLZ or S.W.I.F.T. code) -- BLZ in :25:

Implements HBCI::AbstractTrans.

void HBCI::Transaction::setOurCountryCode (  int    i )  [inline, virtual]
 

country code of your institute -- not in MT940

Implements HBCI::AbstractTrans.

void HBCI::Transaction::setOurSuffix (  const string &    id )  [inline, virtual]
 

If your account has subaccounts which are distinguished by different suffixes, then this is that suffix. Otherwise it's empty. -- not in MT940

Implements HBCI::AbstractTrans.

void HBCI::Transaction::setPrimanota (  const string &    s )  [inline]
 

Primanoten-Number (no idea what this means) -- Primanoten-Nummer; field 10 in field :86:

void HBCI::Transaction::setTransactionCode (  int    c )  [inline, virtual]
 

A 3 digit numerical transaction code, defined for all kinds of different HBCI actions. -- Geschaeftsvorfallcode, first field in field :86: For a normal transfer you should set it to 51. For debit notes the values 05 or 06 may be used. For other values please refer to your credit institute.

Implements HBCI::AbstractTrans.

void HBCI::Transaction::setTransactionKey (  const string &    s )  [inline]
 

this is the transaction id that tells you more about the type of transaction (3 character code) -- Buchungsschluessel in :61:

void HBCI::Transaction::setTransactionText (  const string &    s )  [inline]
 

Transaction text (e.g. STANDING ORDER) -- Buchungstext; field 00 in field :86:

void HBCI::Transaction::setValue (  const Value &    v )  [inline, virtual]
 

The value of this transaction in the account's currency. -- Betrag in :61:

Implements HBCI::AbstractTrans.

void HBCI::Transaction::setValutaDate (  const Date &    d )  [inline]
 

A date "Valuta" when the transaction was (really?) executed -- Datum Valuta/Wertstellung in :61:

int HBCI::Transaction::transactionCode (    )  const [inline, virtual]
 

A 3 digit numerical transaction code, defined for all kinds of different HBCI actions. -- Geschaeftsvorfallcode, first field in field :86: For a normal transfer you should set it to 51. For debit notes the values 05 or 06 may be used. For other values please refer to your credit institute.

Implements HBCI::AbstractTrans.

const string& HBCI::Transaction::transactionKey (    )  const [inline]
 

this is the transaction id that tells you more about the type of transaction (3 character code) -- Buchungsschluessel in :61:

const string& HBCI::Transaction::transactionText (    )  const [inline]
 

Transaction text (e.g. STANDING ORDER) -- Buchungstext; field 00 in field :86:

const Value& HBCI::Transaction::value (    )  const [inline, virtual]
 

The value of this transaction in the account's currency. -- Betrag in :61:

Implements HBCI::AbstractTrans.

const Date& HBCI::Transaction::valutaDate (    )  const [inline]
 

A date "Valuta" when the transaction was (really?) executed -- Datum Valuta/Wertstellung in :61:


The documentation for this class was generated from the following file:
Generated on Mon Jun 23 13:41:18 2003 for openhbci by doxygen1.2.17