Finance-Bank-Cahoot

 view release on metacpan or  search on metacpan

README  view on Meta::CPAN

NAME
    Finance::Bank::Cahoot - Check your Cahoot bank accounts from Perl

DESCRIPTION
    This module provides a rudimentary interface to the Cahoot online
    banking system at "https://www.cahoot.com/". You will need either
    "Crypt::SSLeay" or "IO::Socket::SSL" installed for HTTPS support to work
    with WWW::Mechanize.

SYNOPSIS
      my $cahoot = Finance::Bank::Cahoot->new(credentials => 'Constant',
                                              credentials_options => {
                                                 account => '12345678',
                                                 password => 'verysecret',
                                                 place => 'London',
                                                 date => '01/01/1906',
                                                 username => 'dummy',
                                                 maiden => 'Smith' } );

      my $accounts = $cahoot->accounts;
      $cahoot->set_account($accounts->[0]->{account});
      my $snapshot = $cahoot->snapshot;
      foreach my $row (@$snapshot) {
        print join ',', @$row; print "\n";
      }

METHODS
    new Create a new instance of a connection to the Cahoot server.

        "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::Cahoot::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.

        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.

        If any errors occur then "new" will "croak".

          my $cahoot = Finance::Bank::Cahoot->new(credentials => 'Constant',
                                                  credentials_options => {
                                                     account => '12345678',
                                                     password => 'verysecret',
                                                     place => 'London',
                                                     date => '01/01/1906',
                                                     username => 'dummy',
                                                     maiden => 'Smith' } );

          # Or create the credentials object ourselves
          my $credentials = Finance::Bank::Cahoot::CredentialsProvider::Constant->new(
             account => '12345678', password => 'verysecret', place => 'London',
             date => '01/01/1906', username => 'dummy', maiden => 'Smith' } );
          my $cahoot = Finance::Bank::Cahoot->new(credentials => $credentials);

    login
        Login to the Cahoot server using the credentials supplied to "new".
        This method is implicit for all data access methods, so typically
        does not need to be called explicitly. The method takes no arguments
        and will only call one of memorable place, date or mother's maiden
        name as expected by the Cahoot portal.

    accounts



( run in 1.918 second using v1.01-cache-2.11-cpan-8f98c5d2c55 )