NAME

Finance::PaycheckRecords::Fetcher - Fetch paystubs from PaycheckRecords.com

VERSION

This document describes version 1.000 of Finance::PaycheckRecords::Fetcher, released July 12, 2014.

SYNOPSIS

use Finance::PaycheckRecords::Fetcher;

my $fetcher = Finance::PaycheckRecords::Fetcher->new(
  $username, $password
);

my @fetched = $fetcher->mirror;

DESCRIPTION

Finance::PaycheckRecords can download paystubs from PaycheckRecords.com, so you can save them for your records. You can use Finance::PaycheckRecords (available separately) to extract information from the stored paystubs.

METHODS

new

$fetcher = Finance::PaycheckRecords::Fetcher->new(
             $username, $password
           );

This constructor creates a new Finance::PaycheckRecords::Fetcher object. $username and $password are your login information for PaycheckRecords.com.

available_paystubs

$paystubs = $fetcher->available_paystubs;

This connects to PaycheckRecords.com and downloads a list of available paystubs. It returns a hashref where the keys are paystub dates in YYYY-MM-DD format and the values are URI objects to the printer-friendly paystub for that date.

Currently, it lists only the paystubs shown on the initial page after you log in. For me, this is the last 6 paystubs.

It throws an error if it is unable to get the list of available paystubs. See "DIAGNOSTICS".

mirror

@new_paystubs = $fetcher->mirror;

This connects to PaycheckRecords.com and downloads all paystubs listed by available_paystubs that haven't already been downloaded. It returns a list of filenames of newly downloaded paystubs, or the empty list if there are no new paystubs. Each paystub is saved to the current directory under the name Paycheck-YYYY-MM-DD.html. If a file by that name already exists, then it assumes that paystub has already been downloaded (and is not included in the return value).

In scalar context, it returns the number of paystubs downloaded.

It throws an error if it is unable to mirror the paystubs. See "DIAGNOSTICS".

SEE ALSO

Finance::PaycheckRecords can be used to extract information from the downloaded paystubs.

DIAGNOSTICS

Error GETing %s

WWW::Mechanize encountered an error getting the specified URL.

Expected date= in %s

This indicates that the specified URL does not look like it was expected to. Perhaps PaycheckRecords.com has changed their website. Look for an updated version of Finance::PaycheckRecords::Fetcher. If no update is available, report a bug.

PaycheckRecords: login failed

The fetcher was unable to login to PaycheckRecords.com. You probably supplied the wrong username or password to the constructor.

CONFIGURATION AND ENVIRONMENT

Finance::PaycheckRecords::Fetcher requires no configuration files or environment variables.

DEPENDENCIES

Finance::PaycheckRecords::Fetcher requires File::Slurp, LWP::UserAgent (6 or later), URI, and WWW::Mechanize (1.50 or later).

INCOMPATIBILITIES

None reported.

BUGS AND LIMITATIONS

"available_paystubs" is limited to those displayed by default when you log in to PaycheckRecords.com. There's currently no way to select a different date range. Since "mirror" uses available_paystubs, the same limitation applies.

AUTHOR

Christopher J. Madsen <perl AT cjmweb.net>

Please report any bugs or feature requests to <bug-Finance-PaycheckRecords-Fetcher AT rt.cpan.org> or through the web interface at http://rt.cpan.org/Public/Bug/Report.html?Queue=Finance-PaycheckRecords-Fetcher.

You can follow or contribute to Finance-PaycheckRecords-Fetcher's development at https://github.com/madsen/finance-paycheckrecords-fetcher.

COPYRIGHT AND LICENSE

This software is copyright (c) 2014 by Christopher J. Madsen.

This is free software; you can redistribute it and/or modify it under the same terms as the Perl 5 programming language system itself.

DISCLAIMER OF WARRANTY

BECAUSE THIS SOFTWARE IS LICENSED FREE OF CHARGE, THERE IS NO WARRANTY FOR THE SOFTWARE, TO THE EXTENT PERMITTED BY APPLICABLE LAW. EXCEPT WHEN OTHERWISE STATED IN WRITING THE COPYRIGHT HOLDERS AND/OR OTHER PARTIES PROVIDE THE SOFTWARE "AS IS" WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. THE ENTIRE RISK AS TO THE QUALITY AND PERFORMANCE OF THE SOFTWARE IS WITH YOU. SHOULD THE SOFTWARE PROVE DEFECTIVE, YOU ASSUME THE COST OF ALL NECESSARY SERVICING, REPAIR, OR CORRECTION.

IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MAY MODIFY AND/OR REDISTRIBUTE THE SOFTWARE AS PERMITTED BY THE ABOVE LICENSE, BE LIABLE TO YOU FOR DAMAGES, INCLUDING ANY GENERAL, SPECIAL, INCIDENTAL, OR CONSEQUENTIAL DAMAGES ARISING OUT OF THE USE OR INABILITY TO USE THE SOFTWARE (INCLUDING BUT NOT LIMITED TO LOSS OF DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY YOU OR THIRD PARTIES OR A FAILURE OF THE SOFTWARE TO OPERATE WITH ANY OTHER SOFTWARE), EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGES.