| 1 | package PagSeguro::API::Base; | ||||||||||
| 2 | 3 | ▶ | use Moo; | ||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||
| 3 | |||||||||||
| 4 | 3 | ▶ | use XML::LibXML; | ||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||
| 5 | |||||||||||
| 6 | # attributes | ||||||||||
| 7 | 3 | has email => (is => 'rw'); | |||||||||
| 8 | 3 | has token => (is => 'rw'); | |||||||||
| 9 | |||||||||||
| 10 | 4 | ▶ | has environment => (is => 'rw', default => sub { 'production' }); | ||||||||
|
Subroutine
__ANON__: called CC=1 SCAR=0.0
| |||||||||||
| 11 | 4 | ▶ | has debug => (is => 'rw', default => sub { 0 }); | ||||||||
|
Subroutine
__ANON__: called CC=1 SCAR=0.0
| |||||||||||
| 12 | |||||||||||
| 13 | 0 | ▶ | sub base_uri { | ||||||||
|
Subroutine
base_uri: not called CC=2 SCAR=17.9
Pod
documented
| |||||||||||
| 14 | 0 | my $self = shift; | |||||||||
| 15 | 0 | ▶ | return $self->environment eq 'production'? | ||||||||
|
Branch: 1 branch
| |||||||||||
| 16 | 'https://pagseguro.uol.com.br' : | ||||||||||
| 17 | 'https://sandbox.pagseguro.uol.com.br'; | ||||||||||
| 18 | } | ||||||||||
| 19 | |||||||||||
| 20 | 1 | ▶ | sub api_uri { | ||||||||
|
Subroutine
api_uri: called CC=2 SCAR=7.2
Pod
documented
| |||||||||||
| 21 | 1 | my $self = shift; | |||||||||
| 22 | 1 | ▶ | return $self->environment eq 'production'? | ||||||||
|
Branch: 1 branch
| |||||||||||
| 23 | 'https://ws.pagseguro.uol.com.br/v2' : | ||||||||||
| 24 | 'https://ws.sandbox.pagseguro.uol.com.br/v2'; | ||||||||||
| 25 | } | ||||||||||
| 26 | |||||||||||
| 27 | 0 | ▶ | sub xml { | ||||||||
|
Subroutine
xml: not called CC=2 SCAR=17.9
Pod
documented
| |||||||||||
| 28 | 0 | my $self = shift; | |||||||||
| 29 | |||||||||||
| 30 | 0 | my $xml = XML::LibXML->new; | |||||||||
| 31 | 0 | ▶ | my $doc = $xml->parse_string( $_[0] ) if $_[0]; | ||||||||
|
Branch: 1 branch
| |||||||||||
| 32 | |||||||||||
| 33 | 0 | return $doc; | |||||||||
| 34 | } | ||||||||||
| 35 | |||||||||||
| 36 | 3 | 1; | |||||||||
| 37 | |||||||||||
| 38 | __END__ | ||||||||||