| 1 | package PagSeguro::API::Notification; | ||||||||||
| 2 | 3 | ▶ | use Moo; | ||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||
| 3 | |||||||||||
| 4 | 3 | extends 'PagSeguro::API::Base'; | |||||||||
| 5 | |||||||||||
| 6 | 3 | ▶ | use Carp; | ||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||
| 7 | 3 | ▶ | use PagSeguro::API::Transaction; | ||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||
| 8 | |||||||||||
| 9 | # attributes | ||||||||||
| 10 | 3 | has code => (is => 'rw'); | |||||||||
| 11 | 3 | has transaction => (is => 'rw'); | |||||||||
| 12 | |||||||||||
| 13 | 0 | ▶ | sub by_code { | ||||||||
|
Subroutine
by_code: not called CC=2 SCAR=17.9
Pod
undocumented
| |||||||||||
| 14 | 0 | my $self = shift; | |||||||||
| 15 | |||||||||||
| 16 | 0 | my $code = shift; | |||||||||
| 17 | 0 | ▶ | croak "error: code cannot be null!" unless $code; | ||||||||
|
Branch: 1 branch
| |||||||||||
| 18 | |||||||||||
| 19 | 0 | my $transaction = PagSeguro::API::Transaction | |||||||||
| 20 | ->new( | ||||||||||
| 21 | email => $self->email, | ||||||||||
| 22 | token => $self->token, | ||||||||||
| 23 | debug => $self->debug, | ||||||||||
| 24 | environment => $self->environment | ||||||||||
| 25 | ); | ||||||||||
| 26 | |||||||||||
| 27 | 0 | return $transaction->by_notification_code($code); | |||||||||
| 28 | } | ||||||||||
| 29 | |||||||||||
| 30 | 3 | 1; | |||||||||
| 31 | __END__ | ||||||||||