line |
stmt |
bran |
cond |
sub |
pod |
time |
code |
1
|
|
|
|
|
|
|
package Net::TinyERP; |
2
|
3
|
|
|
3
|
|
213236
|
use strict; |
|
3
|
|
|
|
|
24
|
|
|
3
|
|
|
|
|
96
|
|
3
|
3
|
|
|
3
|
|
17
|
use warnings; |
|
3
|
|
|
|
|
6
|
|
|
3
|
|
|
|
|
73
|
|
4
|
3
|
|
|
3
|
|
1284
|
use Net::TinyERP::NotaFiscal; |
|
3
|
|
|
|
|
13
|
|
|
3
|
|
|
|
|
118
|
|
5
|
3
|
|
|
3
|
|
1291
|
use Net::TinyERP::NotaFiscalServicos; |
|
3
|
|
|
|
|
10
|
|
|
3
|
|
|
|
|
613
|
|
6
|
|
|
|
|
|
|
|
7
|
|
|
|
|
|
|
our $VERSION = '0.08'; |
8
|
|
|
|
|
|
|
|
9
|
|
|
|
|
|
|
sub new { |
10
|
6
|
|
|
6
|
0
|
3205
|
my ($class, @params) = @_; |
11
|
6
|
100
|
|
|
|
34
|
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
|
|
|
48
|
api_version => $params{api_version} || '2.0', |
16
|
|
|
|
|
|
|
}; |
17
|
3
|
|
|
|
|
16
|
bless $self, $class; |
18
|
|
|
|
|
|
|
} |
19
|
|
|
|
|
|
|
|
20
|
|
|
|
|
|
|
sub nota_fiscal { |
21
|
1
|
|
|
1
|
1
|
7
|
my ($self) = @_; |
22
|
1
|
50
|
|
|
|
6
|
if (!exists $self->{_nf_obj}) { |
23
|
1
|
|
|
|
|
6
|
$self->{_nf_obj} = Net::TinyERP::NotaFiscal->new($self); |
24
|
|
|
|
|
|
|
} |
25
|
1
|
|
|
|
|
67
|
return $self->{_nf_obj}; |
26
|
|
|
|
|
|
|
} |
27
|
|
|
|
|
|
|
|
28
|
|
|
|
|
|
|
sub nota_servicos { |
29
|
1
|
|
|
1
|
1
|
5
|
my ($self) = @_; |
30
|
1
|
50
|
|
|
|
7
|
if (!exists $self->{_nfs_obj}) { |
31
|
1
|
|
|
|
|
5
|
$self->{_nfs_obj} = Net::TinyERP::NotaFiscalServicos->new($self); |
32
|
|
|
|
|
|
|
} |
33
|
1
|
|
|
|
|
66
|
return $self->{_nfs_obj}; |
34
|
|
|
|
|
|
|
} |
35
|
|
|
|
|
|
|
|
36
|
|
|
|
|
|
|
1; |
37
|
|
|
|
|
|
|
__END__ |