API.pm

filter: Statementstmt 80.6% 25 / 31 Branchbran n/a Conditioncond n/a MC/DCmcdc n/a Subroutinesub 80.0% 8 / 10 Podpod 100% 3 / 3 totaltotal 81.8% 36 / 44 CC 1 SCAR 1.8
CC
1
Cov
81%
notification
2.0
transaction
2.0
BEGIN
1.0
CRAP 1.2
« API/Notification.pm ↑ Summary API/Payment/Sender.pm »
1 package PagSeguro::API;
2 # ABSTRACT: PagSeguro::API - UOL PagSeguro Payment Gateway API Module
3 3 our $VERSION = '0.009.1';
4  
5 3 ▶use Moo;
Subroutine BEGIN: called CC=1 SCAR=0.0
6  
7 3 ▶use PagSeguro::API::Payment;
Subroutine BEGIN: called CC=1 SCAR=0.0
8 3 ▶use PagSeguro::API::Transaction;
Subroutine BEGIN: called CC=1 SCAR=0.0
9 3 ▶use PagSeguro::API::Notification;
Subroutine BEGIN: called CC=1 SCAR=0.0
10  
11 # attributes
12 3 has email => (is => 'rw');
13 3 has token => (is => 'rw');
14  
15 4 ▶has environment => (is => 'rw', default => sub { 'production' });
Subroutine __ANON__: called CC=1 SCAR=0.0
16 4 ▶has debug => (is => 'rw', default => sub { 0 });
Subroutine __ANON__: called CC=1 SCAR=0.0
17  
18 # methods
19 1 ▶sub payment_request {
Subroutine payment_request: called CC=1 SCAR=0.0
Pod documented
20 1 my $self = shift;
21  
22 return PagSeguro::API::Payment
23 1 ->new( %{$self->_config} );
24 }
25  
26 0 ▶sub notification {
Subroutine notification: not called CC=1 SCAR=6.9
Pod documented
27 0 my $self = shift;
28  
29 return PagSeguro::API::Notification
30 0 ->new( %{$self->_config} );
31 }
32  
33 0 ▶sub transaction {
Subroutine transaction: not called CC=1 SCAR=6.9
Pod documented
34 0 my $self = shift;
35  
36 return PagSeguro::API::Transaction
37 0 ->new( %{$self->_config} );
38 }
39  
40 1 ▶sub _config {
Subroutine _config: called CC=1 SCAR=0.0
41 1 my $self = shift;
42 return {
43 1 email => $self->email,
44 token => $self->token,
45  
46 debug => $self->debug,
47 environment => $self->environment,
48 };
49 }
50  
51  
52 3 1;
53 __END__
« API/Notification.pm ↑ Summary API/Payment/Sender.pm »