Finance::Bank::LloydsTSB - Check your bank accounts from Perl
use Finance::Bank::LloydsTSB; my @accounts = Finance::Bank::LloydsTSB->check_balance( username => $username, password => $password memorable => $memorable_phrase ); my $total = 0; my $format = "%20s : %21s : GBP %9.2f\n"; for my $acc (@accounts) { $total += $acc->balance; printf $format, $acc->name, $acc->descr_num, $acc->balance; } print "-" x 70, "\n"; printf $format, 'TOTAL', '', $total; my $statement = $accounts[0]->fetch_statement; # Retrieve QIF for all transactions in January 2008. my $qif = $accounts[1]->download_statement(2008, 01, 01, 5);
See fetch-statement.pl for a working example.
This module provides a rudimentary interface to the LloydsTSB online banking system at https://online.lloydstsb.co.uk/. You will need either Crypt::SSLeay or IO::Socket::SSL installed for HTTPS support to work with LWP.
https://online.lloydstsb.co.uk/
Crypt::SSLeay
IO::Socket::SSL
Return a list of Finance::Bank::LloydsTSB::Account objects, one for each of your bank accounts.
Converts the website's textual representation of a balance sum into numeric form.
Logs off, if you want to be nice and not bloat the sessions table they no doubt have in their backend database.
$ac->name
$ac->sort_code
$ac->account_no
Return the name of the account, the sort code formatted as the familiar XX-YY-ZZ, and the account number.
$ac->balance
Return the balance as a signed floating point value.
$ac->statement
Return a mini-statement as a line-separated list of transactions. Each transaction is a comma-separated list. WARNING: this interface is currently only useful for display, and hence may change in later versions of this module.
This is code for online banking, and that means your money, and that means BE CAREFUL. You are encouraged, nay, expected, to audit the source of this module yourself to reassure yourself that I am not doing anything untoward with your banking data. This software is useful to me, but is provided under NO GUARANTEE, explicit or implied.
Original by Simon Cozens <simon@cpan.org>
Improvements by Adam Spiers <aspiers@cpan.org>
To install Finance::Bank::LloydsTSB, copy and paste the appropriate command in to your terminal.
cpanm
cpanm Finance::Bank::LloydsTSB
CPAN shell
perl -MCPAN -e shell install Finance::Bank::LloydsTSB
For more information on module installation, please visit the detailed CPAN module installation guide.