Finance::Bank::Natwest - Check your Natwest bank accounts from Perl
This module provides a rudimentary interface to the Natwest online banking system at https://www.nwolb.com/. You will need either Crypt::SSLeay or IO::Socket::SSL installed for HTTPS support to work with LWP.
https://www.nwolb.com/
Crypt::SSLeay
IO::Socket::SSL
my $nw = Finance::Bank::Natwest->new( credentials => 'Constant', credentials_options => { dob => '010179', uid => '0001', password => 'Password', pin => '4321' } ); my @accounts = $nw->accounts; foreach (@accounts) { printf "%25s : %6s / %8s : GBP %8.2f\n", $_->{name}, $_->{sortcode}, $_->{account}, $_->{available}; }
my $nw = Finance::Bank::Natwest->new( credentials => 'Constant', credentials_options => { dob => '010179', uid => '0001', password => 'Password', pin => '4321' } ); # Or create the credentials object ourselves my $credentials = Finance::Bank::Natwest::CredentialsProvider::Constant->new( dob => '010179', uid => '0001', password => 'Password', pin => '4321' ); my $nw = Finance::Bank::Natwest->new( credentials => $credentials );
new can be called in two different ways. It can take a single parameter, credentials, which will accept an already created credentials object, of type Finance::Bank::Natwest::CredentialsProvider::*. Alternatively, it can take two parameters, credentials and credentials_options. In this case credentials is the name of a credentials class to create an instance of, and credentials_options is a hash of the options to pass-through to the constructor of the chosen class.
new
credentials
Finance::Bank::Natwest::CredentialsProvider::*
credentials_options
If the second form of new is being used, and the chosen class is not one of the ones supplied as standard then it will need to be required first.
required
If any errors occur then new will croak.
croak
my @accounts = $nw->accounts; # Or get a list ref instead my $accounts = $nw->accounts;
Returns a list containing a summary of any accounts available from the supplied credentials. Each item in the list is a hash reference that holds summary information for a single account, and contains this data:
This warning is from Simon Cozens' Finance::Bank::LloydsTSB, and seems just as apt here.
Finance::Bank::LloydsTSB
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.
This has only been tested on my own accounts. I imagine it should work on any account types, but I can't guarantee this.
I still have ministatement, direct debit and standing order functionality to copy over from my earlier, unreleased version of this code, along with ways of accessing accounts by name or account/sortcode alongside the list layout.
There are sure to be some bugs lurking in here somewhere. If you find one, please report it via RT
Simon Cozens for Finance::Bank::LloydsTSB. Various members of London.pm for prodding me occasionally to come back to this and do some more on it.
Jody Belka knew@cpan.org
knew@cpan.org
Copyright 2003 by Jody Belka
This library is free software; you can redistribute it and/or modify it under the same terms as Perl itself.
To install Finance::Bank::Natwest, copy and paste the appropriate command in to your terminal.
cpanm
cpanm Finance::Bank::Natwest
CPAN shell
perl -MCPAN -e shell install Finance::Bank::Natwest
For more information on module installation, please visit the detailed CPAN module installation guide.