The Perl Toolchain Summit needs more sponsors. If your company depends on Perl, please support this very important event.

NAME

Finance::Bank::BR::Santander::Spreadsheet - Parse statement exported from Brazilian branch of Santander Internet Banking

SYNOPSIS

    use Finance::Bank::BR::Santander::Spreadsheet;

    my $spreadsheet = Finance::Bank::BR::Santander::Spreadsheet->new($filename);
    my $balance = $spreadsheet->balance;
    my @data = $spreadsheet->statement;
    foreach my $transaction (@data) {
        say "$transaction->{date}, $transaction->{name}, $transaction->{extra}, $transaction->{value}, $transaction->{balance}";
    }

Description

This module is an object-oriented interface that parses statements exported as XLS from the Internet Banking for the Brazilian branch of Santander.

Spreadsheet

new($filename)

The new() method creates a new Spreadsheet object containing the data parsed from $filename.

If an error occurs while loading the file, new() returns undef.

balance()

The balance() method returns the last balance found in the sheet.

statement()

The statement() method returns an array of transactions, described as below.

Transaction

The transaction is a hash containing the following keys:

name

A string with a name describing the transaction.

value

A floating number containing the credit (positive) or debit (negative) of the transaction.

date

A DateTime object representing the date when the transaction occurred.

balance

A floating number containing the balance resulting from the transaction.

extra

Data provided by the bank identifying the transaction. In this case, a number specific to the type of transaction. It can be used to help uniquely identify the transaction.

COPYRIGHT AND LICENSE

  Copyright (C) 2015 Thadeu Lima de Souza Cascardo <cascardo@cascardo.eti.br>

  This program is free software; you can redistribute it and/or modify it under
  the terms of the GNU General Public License; either version 2 of the License,
  or (at your option) any later version.

  This program is distributed in the hope that it will be useful, but WITHOUT
  ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
  FOR A PARTICULAR PURPOSE.