File Coverage

lib/PagSeguro/API/Resource.pm
Criterion Covered Total %
statement 6 10 60.0
branch n/a
condition 0 3 0.0
subroutine 2 4 50.0
pod 1 2 50.0
total 9 19 47.3


line stmt bran cond sub pod time code
1             package PagSeguro::API::Resource;
2 6     6   24 use strict;
  6         8  
  6         191  
3 6     6   23 use warnings;
  6         7  
  6         621  
4              
5             sub new {
6 0     0 0   my $class = shift;
7 0   0       return bless {
8             _config => {
9             BASE_URI => 'https://ws.pagseguro.uol.com.br',
10             SANDBOX_URI => 'https://ws.sandbox.pagseguro.uol.com.br',
11             CHECKOUT => '/v2/checkout/',
12             CHECKOUT_PAYMENT =>
13             'https://pagseguro.uol.com.br/v2/checkout/payment.html',
14             SANDBOX_CHECKOUT_PAYMENT =>
15             'https://sandbox.pagseguro.uol.com.br/v2/checkout/payment.html',
16             TRANSACTION => '/v2/transactions/',
17             ABANDONED => 'abandoned',
18             NOTIFICATIONS => 'notifications/',
19              
20             }
21             }, $class || ref $class;
22             }
23              
24             # methods
25             sub get {
26 0     0 1   my ($self, $code) = @_;
27 0           return $self->{_config}->{$code};
28             }
29              
30             1;
31             __END__