line |
stmt |
bran |
cond |
sub |
pod |
time |
code |
1
|
|
|
|
|
|
|
package Net::TinyERP; |
2
|
3
|
|
|
3
|
|
228253
|
use strict; |
|
3
|
|
|
|
|
25
|
|
|
3
|
|
|
|
|
90
|
|
3
|
3
|
|
|
3
|
|
15
|
use warnings; |
|
3
|
|
|
|
|
5
|
|
|
3
|
|
|
|
|
87
|
|
4
|
3
|
|
|
3
|
|
1371
|
use Net::TinyERP::NotaFiscal; |
|
3
|
|
|
|
|
9
|
|
|
3
|
|
|
|
|
114
|
|
5
|
3
|
|
|
3
|
|
1387
|
use Net::TinyERP::NotaFiscalServicos; |
|
3
|
|
|
|
|
7
|
|
|
3
|
|
|
|
|
645
|
|
6
|
|
|
|
|
|
|
|
7
|
|
|
|
|
|
|
our $VERSION = '0.09'; |
8
|
|
|
|
|
|
|
|
9
|
|
|
|
|
|
|
sub new { |
10
|
6
|
|
|
6
|
0
|
3162
|
my ($class, @params) = @_; |
11
|
6
|
100
|
|
|
|
29
|
die 'Net::TinyERP->new() precisa do argumento "token"' unless @params; |
12
|
5
|
50
|
|
|
|
24
|
my %params = @params > 1 ? @params : %{$params[0]}; |
|
0
|
|
|
|
|
0
|
|
13
|
|
|
|
|
|
|
my $self = { |
14
|
|
|
|
|
|
|
token => $params{token} || die 'argumento "token" obrigatório', |
15
|
5
|
|
100
|
|
|
46
|
api_version => $params{api_version} || '2.0', |
16
|
|
|
|
|
|
|
}; |
17
|
3
|
|
|
|
|
16
|
bless $self, $class; |
18
|
|
|
|
|
|
|
} |
19
|
|
|
|
|
|
|
|
20
|
|
|
|
|
|
|
sub nota_fiscal { |
21
|
1
|
|
|
1
|
1
|
6
|
my ($self) = @_; |
22
|
1
|
50
|
|
|
|
6
|
if (!exists $self->{_nf_obj}) { |
23
|
1
|
|
|
|
|
8
|
$self->{_nf_obj} = Net::TinyERP::NotaFiscal->new($self); |
24
|
|
|
|
|
|
|
} |
25
|
1
|
|
|
|
|
69
|
return $self->{_nf_obj}; |
26
|
|
|
|
|
|
|
} |
27
|
|
|
|
|
|
|
|
28
|
|
|
|
|
|
|
sub nota_servicos { |
29
|
1
|
|
|
1
|
1
|
6
|
my ($self) = @_; |
30
|
1
|
50
|
|
|
|
7
|
if (!exists $self->{_nfs_obj}) { |
31
|
1
|
|
|
|
|
6
|
$self->{_nfs_obj} = Net::TinyERP::NotaFiscalServicos->new($self); |
32
|
|
|
|
|
|
|
} |
33
|
1
|
|
|
|
|
60
|
return $self->{_nfs_obj}; |
34
|
|
|
|
|
|
|
} |
35
|
|
|
|
|
|
|
|
36
|
|
|
|
|
|
|
1; |
37
|
|
|
|
|
|
|
__END__ |