Finance-Bank-Bundesschatz

 view release on metacpan or  search on metacpan

lib/Finance/Bank/Bundesschatz.pod  view on Meta::CPAN

=head1 NAME

Finance::Bank::Bundesschatz - check your Bundesschatz accounts from Perl

=head1 SYNOPSIS

  # look for this script in the examples directory of the
  # tar ball (balance.pl).
  use Finance::Bank::Bundesschatz;
  
  use strict;
  use warnings;
  
  my $agent = Finance::Bank::Bundesschatz->new(
          account       => 'XXX',
          pass          => 'XXX',
          return_floats => 1,
  );
  
  my $balance  = $agent->check_balance;
  my $details  = $agent->get_details;
  
  printf("%11s: %25s\n", 'Kontonummer', $agent->account);
  printf("%11s: %25s\n", $_->[0], $balance->{$_->[1]})
  	for(( [ qw/ Kontostand balance / ],
  	      [ qw/ Verzinsung interest / ],
  ));
  print "\n";
  
  foreach my $detail (@$details) {
  	printf("%11s: %25s\n", $_->[0], $detail->{$_->[1]})
  		for(( [ qw/ Produkt product / ],
  		      [ qw/ Von from / ],
  		      [ qw/ Bis to / ],
  		      [ qw/ Verzinsung interest / ],
  		      [ qw/ Betrag amount / ],
  		      [ qw/ Zinsen interest_amount / ],
  		      [ qw/ KESt tax / ],
  		      [ qw/ Gesamt amount_after_tax / ],
  	));
  	print "\n";
  }

=head1 DESCRIPTION

This module provides a basic interface to the online banking system of
Bundeschatz.at at C<http://www.bundesschatz.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 accounts and extracts various informations about the account
status and returns it as a hashref:

  $VAR1 = {
          'balance'  => account balance
          'interest' => the interest average
          };

=item get_details

Queries and parses the 'Kontodetails' page of the account.

Returns an arrayref of hashrefs containing all fetched information:

  $VAR1 = [
            {
              'from'             => begin of booking
                                    (format: DD.MM.YYYY)
              'to'               => end of booking
                                    (format: DD.MM.YYYY)
              'currency'         => currency
              'amount'           => amount
              'interest'         => interest
              'amount_after_tax' => amount minus tax
              'tax'              => tax
              'interest_amount'  => amount of interest
            },
          ];

=item get_interest

Queries and parses the 'Zinsentwicklung' page and returns the results
as arrayref of hashrefs:

  $VAR1 = [
            {
              'published'    => publishing date
                                (format: DD.MM.YYYY)
              'valid_on'     => date the interest where valid
                                (format: DD.MM.YYYY)
              'interest_bs1' => interest for fiscal period
              'interest_bs2' => interest for fiscal period
              'interest_bs3' => interest for fiscal period
            },
          ];

=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



( run in 2.735 seconds using v1.01-cache-2.11-cpan-364913b4093 )