This gem can perform two tasks:
- Downloading transaction statements from the Rabobank website
- Parse each statement in these exports into a
Transaction
object
NOTE This gem logs into your bank account. I strongly recommend you to clone / vendorize this gem, and make sure that it performs the steps you expect before using it with your personal data.
-
Create a instance
downloader = RabobankTransactionDownloader.new(account_nr, card_nr, icode)
Where
account_nr
is your bank account number,card_nr
is the 4-digit number on your card andicode
is the I-number generated by the Random Reader. -
Download either csv output, or parse the output directly into
Transaction
objects.downloader.download_csv(accounts, since, up_to_and_including) # returns a multi-line CSV string downloader.download_transactions(accounts, since, up_to_and_including) # returns an array of Transaction objects.
Where
accounts
is either:all
, to download transactions from all your accounts, or an array of accountnumbers that you'd like to download. These accountnumbers can be be retrieved withdownloader.available_accounts
.
See the demo for a working example.
Based Rabobank documentation.
Each transaction object has the following methods, which map directly to the columns specified in the documentation:
- owner_account_nr
- currency
- interest_date
- type
- amount
- contra_account_number
- contra_account_name
- entry_date
- transaction_type
- filler
- description1
- description2
- description3
- description4
- description5
- description6
- sepa_end_to_end_id
- sepa_contra_account_id
- sepa_mandate_id
There are several additional helper methods:
debit?
which returnstrue
if this is a debit transactioncredit?
which returnstrue
if this is a credit transactiondescription
which returns the concatonation of the 6 description fields.transaction_type_name
which returns a human readable name (in dutch) of the transaction type (see wikipedia for a list of these types)