PagSeguro::API::Transaction - Transaction Class for PagSeguro::API module
use PagSeguro::API; # new instance my $ps = PagSeguro::API->new( email=> 'foo@bar.com', token=>'95112EE828D94278BD394E91C4388F20' ); # transaction obj my $t = $ps->transaction; # load transaction by code my $transaction = $t->load('766B9C-AD4B044B04DA-77742F5FA653-E1AB24'); # search transaction by date range my $list = $t->search( initial => '2013-10-01T00:00', final => '2013-10-30T00:00', page => 1, max => 1000, ); # search abandoned transaction by date range my $list = $t->abandoned( initial => '2013-10-01T00:00', final => '2013-10-30T00:00', page => 1, max => 1000, ); # transaction returns perl hash say $transaction->{code}; # 00000000-0000-0000-0000-000000000000
PagSeguro::API::Transaction is a class that provide access to transaction api search methods.
Public properties and their accessors
my $t = $ps->transaction; say $t->resource('BASE_URI');
PagSeguro::API::Resource is a container that store all connectoin url parts and some other things;
# new instance my $ps = PagSeguro::API::Transaction->new( email => 'foo@bar.com', token => '95112EE828D94278BD394E91C4388F20' );
# getting transaction class instance my $t = $ps->transaction; # load transaction by code my $transaction = $t->load('00000000-0000-0000-0000-000000000000'); say $transaction->{code};
This method will load a transaction by code and returns a perl hash as success result or undef as error or not found;
undef
# getting transaction class instance my $t = $ps->transaction; # load transaction by date range my $list = $t->search( initial => '2013-10-01T00:00', final => '2013-10-30T00:00', page => 1, max => 10000 );
This method will get a list of transactions by date range and returns a perl hash as success result or undef as error or not found;
# getting transaction class instance my $t = $ps->transaction; # load abandoned transaction by date range my $list = $t->abandoned( initial => '2013-10-01T00:00', final => '2013-10-30T00:00', page => 1, max => 10000 );
This method will get a list of abandoned transactions by date range and returns a perl hash as success result or undef as error or not found;
2013 (c) Bivee http://bivee.com.br
Daniel Vinciguerra <daniel.vinciguerra@bivee.com.br>
This software is copyright (c) 2013 by Bivee.
This is a free software; you can redistribute it and/or modify it under the same terms of Perl 5 programming languagem system itself.
To install PagSeguro::API, copy and paste the appropriate command in to your terminal.
cpanm
cpanm PagSeguro::API
CPAN shell
perl -MCPAN -e shell install PagSeguro::API
For more information on module installation, please visit the detailed CPAN module installation guide.