| 1 | package PagSeguro::API::Resource; | ||||||||||||||||||||
| 2 | 6 | ▶ | use strict; | ||||||||||||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||||||||||||
| 3 | 6 | ▶ | use warnings; | ||||||||||||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||||||||||||
| 4 | |||||||||||||||||||||
| 5 | sub new { | ||||||||||||||||||||
| 6 | 12 | ▶ | my $class = shift; | ||||||||||||||||||
|
Subroutine
new: called CC=2 SCAR=8.1
Pod
undocumented
| |||||||||||||||||||||
| 7 | 12 | ▶ | return bless { | ||||||||||||||||||
|
Condition33%1/3
$class || ref $class
MC/DC0%0/2
$class || ref $class
$class
ref $class
Truth table33%1/3
A || B
A= $classB= ref $class
| |||||||||||||||||||||
| 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 | 2 | ▶ | my ($self, $code) = @_; | ||||||||||||||||||
|
Subroutine
get: called CC=1 SCAR=0.0
Pod
documented
| |||||||||||||||||||||
| 27 | 2 | return $self->{_config}->{$code}; | |||||||||||||||||||
| 28 | } | ||||||||||||||||||||
| 29 | |||||||||||||||||||||
| 30 | 6 | 1; | |||||||||||||||||||
| 31 | __END__ | ||||||||||||||||||||