| 1 | package Net::TinyERP; | ||||||||||||||||||||||
| 2 | 3 | ▶ | use strict; | ||||||||||||||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||||||||||||||
| 3 | 3 | ▶ | use warnings; | ||||||||||||||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||||||||||||||
| 4 | 3 | ▶ | use Net::TinyERP::NotaFiscal; | ||||||||||||||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||||||||||||||
| 5 | 3 | ▶ | use Net::TinyERP::NotaFiscalServicos; | ||||||||||||||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||||||||||||||
| 6 | |||||||||||||||||||||||
| 7 | 3 | our $VERSION = '0.09'; | |||||||||||||||||||||
| 8 | |||||||||||||||||||||||
| 9 | 6 | ▶ | sub new { | ||||||||||||||||||||
|
Subroutine
new: called CC=5 SCAR=16.6
Pod
undocumented
| |||||||||||||||||||||||
| 10 | 6 | my ($class, @params) = @_; | |||||||||||||||||||||
| 11 | 6 | ▶ | die 'Net::TinyERP->new() precisa do argumento "token"' unless @params; | ||||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||||
| 12 | 0 | ▶ | my %params = @params > 1 ? @params : %{$params[0]}; | ||||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||||
| 13 | my $self = { | ||||||||||||||||||||||
| 14 | token => $params{token} || die 'argumento "token" obrigatório', | ||||||||||||||||||||||
| 15 | 5 | ▶ | api_version => $params{api_version} || '2.0', | ||||||||||||||||||||
|
Condition75%3/4
$params{'token'} || die(qq[argumento "token" obrigat\303\263rio], 'api_version', $params{'api_version'} || '2.0')
$params{'api_version'} || '2.0'
MC/DC100%1/1
$params{'token'} || die(qq[argumento "token" obrigat\303\263rio], 'api_version', $params{'api_version'} || '2.0')
$params{'token'}
MC/DC0%0/1
$params{'api_version'} || '2.0'
$params{'api_version'}
Truth table100%2/2
A
A= $params{'token'}
Truth table50%1/2
A
A= $params{'api_version'}
| |||||||||||||||||||||||
| 16 | }; | ||||||||||||||||||||||
| 17 | 3 | bless $self, $class; | |||||||||||||||||||||
| 18 | } | ||||||||||||||||||||||
| 19 | |||||||||||||||||||||||
| 20 | 1 | ▶ | sub nota_fiscal { | ||||||||||||||||||||
|
Subroutine
nota_fiscal: called CC=2 SCAR=7.0
Pod
documented
| |||||||||||||||||||||||
| 21 | 1 | my ($self) = @_; | |||||||||||||||||||||
| 22 | 1 | ▶ | if (!exists $self->{_nf_obj}) { | ||||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||||
| 23 | 1 | $self->{_nf_obj} = Net::TinyERP::NotaFiscal->new($self); | |||||||||||||||||||||
| 24 | } | ||||||||||||||||||||||
| 25 | 1 | return $self->{_nf_obj}; | |||||||||||||||||||||
| 26 | } | ||||||||||||||||||||||
| 27 | |||||||||||||||||||||||
| 28 | 1 | ▶ | sub nota_servicos { | ||||||||||||||||||||
|
Subroutine
nota_servicos: called CC=2 SCAR=7.0
Pod
documented
| |||||||||||||||||||||||
| 29 | 1 | my ($self) = @_; | |||||||||||||||||||||
| 30 | 1 | ▶ | if (!exists $self->{_nfs_obj}) { | ||||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||||
| 31 | 1 | $self->{_nfs_obj} = Net::TinyERP::NotaFiscalServicos->new($self); | |||||||||||||||||||||
| 32 | } | ||||||||||||||||||||||
| 33 | 1 | return $self->{_nfs_obj}; | |||||||||||||||||||||
| 34 | } | ||||||||||||||||||||||
| 35 | |||||||||||||||||||||||
| 36 | 3 | 1; | |||||||||||||||||||||
| 37 | __END__ | ||||||||||||||||||||||