Financ...nentTSB(3pm)
π Financ...nentTSB(3pm) π
okay bestie, so this is a page from the User Contributed Perl Documentation, and the module's actual name is Finance::Bank::IE::PermanentTSB π
β¨ NAME β¨
Finance::Bank::IE::PermanentTSB β it's a Perl Interface to the PermanentTSB Open24 homebanking, and the bank lives over at <http://www.open24.ie> π¦π¦
πΈ DESCRIPTION πΈ
So like. This is a lil set of functions you can drop into your Perl code to do actual operations with a Permanent TSB homebanking account. no cap, it's giving "I automated my banking" main character energy π
Features, bestie:
- account(s) balance: it pulls the balance for all the accounts you have set up (current account, visa card, etc.) π°
- account(s) statement: it pulls the statement for a particular account, across a range of dates π
- mobile phone top-up (to be implemented): top up your mobile phone! π±
- funds transfer (to be implemented): move money between your accounts or third party accounts πΈ
heads up: the top-up and the funds transfer are literally not built yet, so don't come for me π
π CONSTANTS π
These constants below are used with the account_statement() function:
"ALL"β shortcut for (WITHDRAWALandDEPOSIT); β¨"WITHDRAWAL"β shows only theWITHDRAWALs;"DEPOSIT"β shows only theDEPOSITs;"VISA_ACCOUNT"β the account refers to a Visa Card; π³"SWITCH_ACCOUNT"β the account is a normal Current Account;
π METHODS / FUNCTIONS π
Every single function in this module needs, as the first argument, a reference to a hash containing the configuration. it's giving "here's my whole identity, take it" π«Ά
my %config = (
"open24numba" => "your open24 number",
"password" => "your internet password",
"pan" => "your personal access number",
"debug" => 1,
);
π $boolean = login($config_ref) - private
This is a private function used by other functions within the module. You don't need to call it directly from your code! fr fr, hands off π
This function performs the login. It takes just one required argument, which is a hash reference for the configuration. The function returns true (1) if success, or undef for any other state. If debug => 1 then it will dump the html page on the current working directory. Please be aware that this has a security risk. The information will persist on your filesystem until you reboot your machine (and /var/tmp get clean at boot time). π
bestie. listen. debug => 1 literally dumps bank html into your cwd. it stays there until you reboot. that's a whole security risk, not me being dramatic π
π set_pan_fields($config_ref) - private
This is a private function used by other function within the module. You don't need to call it directly from you code!
This is used for the second step of the login process. The web interface ask you to insert 3 of the 6 digits that form the PAN code. The PAN is a secret code that only the PermanentTSB customer knows. If your PAN code is 123234 and the web interface is asking for this:
Digit no. 2:
Digit no. 5:
Digit no. 6:
The function will fill out the form providing 2,3,4 respectively.
This function doesn't return anything. it's giving silent but deadly π§
π @accounts_balance = check_balance($config_ref) - public
This function require the configuration hash reference as argument. It returns an reference to an array of hashes, one hash for each account. In case of error it return undef; Each hash has these keys:
'accname': account name, i.e."Switch Current A/C". β'accno': account number. An integer representing the last 4 digits of the account. π’'accbal': account balance. In EURO. πΆ
Here is an example:
$VAR1 = {
'availbal' => 'euro amount',
'accno' => '0223',
'accbal' => 'euro amount',
'accname' => 'Switch Current A/C'
};
$VAR2 = {
'availbal' => 'euro amount',
'accno' => '2337',
'accbal' => 'euro amount',
'accname' => 'Visa Card'
};
The array can be printed using, for example, a foreach loop like this one:
foreach my $acc (@$balance) {
printf ("%s ending with %s: %s\n",
$acc->{'accname'},
$acc->{'accno'},
$acc->{'accbal'}
);
}
π @account_statement = account_statement($config_ref, $acc_type, $acc_no, $from, $to, [$type]) - public
This function requires 4 mandatory arguments, the 5th is optional. okay so let's count them out:
$config_ref: the hash reference to the configuration$acc_type: this is a constant: can beVISA_ACCOUNTorSWITCH_ACCOUNT$acc_no: this is a 4 digits field representing the last 4 digits of the account number (or Visa card number)$from: from date, in formatdd/mm/yyyy$to: to date, in formatdd/mm/yyyy$type(optional): type of statement (optional). Default:ALL. It can beWITHDRAWAL,DEPOSITorALL.
The function returns an reference to an array of hashes, one hash for each row of the statement. The array of hashes can be printed using, for example, a foreach loop like this one:
foreach my $row (@$statement) {
printf("%s | %s | %s | %s \n",
$row->{date},
$row->{description},
$row->{euro_amount},
$row->{balance});
}
Undef is returned in case of error; π
π INSTALLATION π
To install this module type the following:
perl Makefile.PL
make
make test
make install
slay. that's it. four lines and you're iconic π
π§ DEPENDENCIES π§
This module requires these other modules and libraries:
WWW::Mechanize
HTML::TokeParser
Date::Calc
π MODULE HOMEPAGES π
- Project homepage on Google code (with SVN repository):
<http://code.google.com/p/finance-bank-ie-permanenttsb>
- Project homepage on CPAN.org:
<http://search.cpan.org/~pallotron/Finance-Bank-IE-PermanentTSB/>
π SYNOPSIS π
use Finance::Bank::IE::PermanentTSB;
my %config = (
"open24numba" => "your open24 number",
"password" => "your internet password",
"pan" => "your personal access number",
"debug" => 1, # <- enable debug messages
);
my $balance = Finance::Bank::IE::PermanentTSB->check_balance(\%config);
if(not defined $balance) {
print "Error!\n"
exit;
}
foreach my $acc (@$balance) {
printf ("%s ending with %s: %s\n",
$acc->{'accname'},
$acc->{'accno'},
$acc->{'accbal'}
);
}
my $statement = Finance::Bank::IE::PermanentTSB->account_statement(
\%config, SWITCH_ACCOUNT, '2667','2008/12/01','2008/12/31');
if(not defined $statement) {
print "Error!\n"
exit;
}
foreach my $row (@$statement) {
printf("%s | %s | %s | %s |\n",
$row->{date},
$row->{description},
$row->{euro_amount},
$row->{balance}
);
}
π¦ SEE ALSO π¦
ptsbβ CLI tool to interact with your home banking <http://search.cpan.org/~pallotron/Finance-Bank-IE-PermanentTSB/ptsb>- Ronan Waider's
"Finance::Bank::IE::BankOfIreland"β <http://search.cpan.org/~waider/Finance-Bank-IE/>
π AUTHOR π
Angelo "pallotron" Failla, <pallotron@freaknet.org> β <http://www.pallotron.net> β <http://www.vitadiunsysadmin.net>
π COPYRIGHT AND LICENSE π
Copyright (C) 2009 by Angelo "pallotron" Failla
This library is free software; you can redistribute it and/or modify it under the same terms as Perl itself, either Perl version 5.8.8 or, at your option, any later version of Perl 5 you may have available.
and that's the whole page bestie π«Ά this one was generated by perl v5.36.0 and dated 2022-11-20, and the manual it belongs to is Financ...nentTSB(3pm). go bank responsibly, mwah πβ¨
π¦ where this page comes from
- debian bookworm: libfinance-bank-ie-permanenttsb-perl 0.4-4 Β· Artistic-1.0-Perl OR GPL-1.0-or-later
- debian trixie: libfinance-bank-ie-permanenttsb-perl 0.4-4 Β· Artistic-1.0-Perl OR GPL-1.0-or-later
- ubuntu noble: libfinance-bank-ie-permanenttsb-perl 0.4-4 Β· Artistic-1.0-Perl OR GPL-1.0-or-later
- ubuntu resolute: libfinance-bank-ie-permanenttsb-perl 0.4-4 Β· Artistic-1.0-Perl OR GPL-1.0-or-later
- ubuntu stonking: libfinance-bank-ie-permanenttsb-perl 0.4-4 Β· Artistic-1.0-Perl OR GPL-1.0-or-later
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms