gray > Finance-Card-Discover-0.05 > Finance::Card::Discover

Download:
Finance-Card-Discover-0.05.tar.gz

Dependencies

Annotate this POD

View/Report Bugs
Module Version: 0.05   Source  

NAME ^

Finance::Card::Discover - DiscoverCard account information and SOAN creation

SYNOPSIS ^

    use Finance::Card::Discover;

    my $card = Finance::Card::Discover->new(
        username => 'Your Username',
        password => 'Your Password',
    );

    for my $account ($card->accounts) {
        my $number     = $account->number;
        my $expiration = $account->expiration;
        printf "account: %s %s\n", $number, $expiration;

        my $balance = $account->balance;
        my $profile = $account->profile;

        my @transactions = $account->transactions;

        if (my $soan = $account->soan) {
            my $number = $soan->number;
            my $cid    = $soan->cid;
            printf "soan: %s %s\n", $number, $cid;
        }
        else {
            # SOAN request failed, see why.
            croak $account->card->response->dump;
        }

        for my $transaction ($account->soan_transactions) {
            my $date     = $transaction->date;
            my $merchant = $transaction->merchant;
            my $amount   = $transaction->amount;
            printf "transaction: %s %s %s\n", $date, $amount, $merchant;
        }
    }

DESCRIPTION ^

The Finance::Card::Discover module provides access to DiscoverCard account information and enables the creation of Secure Online Access Numbers.

METHODS ^

new

    $card = Finance::Card::Discover->new(
        username => 'Your Username',
        password => 'Your Password',
    )

Creates a new Finance::Card::Discover object.

accounts

Requests the accounts associated with the user and returns a list of Finance::Card::Discover::Account objects upon success.

response

    $response = $card->response()

Returns an HTTP::Response object for the last submitted request. Can be used to determine the details of an error.

ua

    $ua = $card->ua()
    $ua = $card->ua($ua)

Accessor for the UserAgent object.

SEE ALSO ^

Finance::Card::Discover::Account

http://www.discovercard.com/customer-service/security/create-soan.html

TODO ^

REQUESTS AND BUGS ^

Please report any bugs or feature requests to http://rt.cpan.org/Public/Bug/Report.html?Queue=Finance-Card-Discover. I will be notified, and then you'll automatically be notified of progress on your bug as I make changes.

SUPPORT ^

You can find documentation for this module with the perldoc command.

    perldoc Finance::Card::Discover

You can also look for information at:

COPYRIGHT AND LICENSE ^

Copyright (C) 2010 gray <gray at cpan.org>, all rights reserved.

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

AUTHOR ^

gray, <gray at cpan.org>

syntax highlighting: