Finance-Bank-PSK
view release on metacpan or search on metacpan
lib/Finance/Bank/PSK.pod view on Meta::CPAN
=head1 SYNOPSIS
# look for this script in the examples directory of the
# tar ball.
use Finance::Bank::PSK;
use strict;
use warnings;
my $agent = Finance::Bank::PSK->new(
account => 'xxx',
user => 'xxx',
pass => 'xxx',
return_floats => 1,
newline => '; ',
);
my $result = $agent->check_balance;
my @entries = $agent->get_entries;
foreach my $account (@{$result->{accounts}}) {
printf("%11s: %25s\n", $_->[0], $account->{$_->[1]})
for(( [ qw/ Kontonummer account / ],
[ qw/ Bezeichnung name / ],
[ qw/ Waehrung currency / ]
));
printf("%11s: %25.2f\n", $_->[0], $account->{$_->[1]})
for(( [ qw/ Saldo balance / ],
[ qw/ Dispo final / ]
));
print "\n";
}
foreach my $fund (@{$result->{funds}}) {
printf("%11s: %25s\n", $_->[0], $fund->{$_->[1]})
for(( [ qw/ Depotnummer fund / ],
[ qw/ Bezeichnung name / ],
[ qw/ Waehrung currency / ]
));
printf("%11s: %25.2f\n", 'Saldo', $fund->{balance});
print "\n";
}
if(scalar @entries) {
printf("Buchungszeilen:\n\n");
foreach my $row (@entries) {
$row->{text} =~ s/(.{50}).*/$1.../;
printf("%7s %5s %53s %9.2f\n",
@{$row}{qw/nr value text ammount/}
);
}
}
=head1 DESCRIPTION
This module provides a basic interface to the online banking system of
the P.S.K. at C<https://wwwtb.psk.at>.
Please note, that you will need either C<Crypt::SSLeay> or C<IO::Socket::SSL>
installed for working HTTPS support of C<LWP>.
=head1 METHODS
=over
=item check_balance
Queries the via user and pass defined accounts and mutual funds and
returns a reference to a list of hashes containing all fetched
information:
$VAR1 = {
'accounts' => [
{
'name' => name of the account
'account' => account number
'currency' => currency
'balance' => account balance
'final' => final account balance
}
],
'funds' => [
{
'name' => name of the mutual fund
'fund' => mutual fund number
'currency' => currency
'balance' => mutual fund balance
}
],
};
=item get_entries
Queries and parses the Umsatzarchiv page for the defined account.
Returns an array of hashes containing all fetched information:
$VAR = [
{
'nr' => nr of the bank statement
'text' => posting text
'value' => value date (format: DD.MM)
'amount' => transfer amount
},
];
=back
=head1 ATTRIBUTES
All attributes are implemented by C<Class::MethodMaker>, so please take a
look at its man page for further information about the created accessor
methods.
=over
=item account
Account to connect with (Teilnehmernummer).
( run in 0.769 second using v1.01-cache-2.11-cpan-5a3173703d6 )