Net::TinyERP - interface com a API REST do Tiny ERP
my $api = Net::TinyERP->new( token => 'abc123', # <-- OBRIGATÓRIO api_version => '2.0', # <-- Opcional ); my $res = $api->nota_fiscal->incluir({ natureza_operacao => 'Venda de Mercadorias', ..., cliente => { ... }, itens => [ { item => { ... } }, ... ], parcelas => [ { parcela => { ... } }, ... ], transportador => { ... }, }); my @ids; if ($res->{status} eq 'OK') { foreach my $registro (@{ $res->{registros} }) { if ($registro->{registro}{status} eq 'OK') { push @ids, $registro->{registro}{id}; } } } foreach my $id (@ids) { my $nota = $api->nota_fiscal->obter( $id ); say $nota->{descricao_situacao}; }
This module provides an interface to talk to Tiny ERP's REST API. Tiny ERP is a brazilian Enterprise Resource Planning company with several solutions for CRM, contracts, products, tax invoices, etc, focused on brazilian small and medium-sized businesses. Since the target audience for this distribution is mainly brazilian developers, the documentation is provided in portuguese only. If you need any help or want to translate it to your language, please send us some pull requests! :)
Este módulo interage com a API (2.0) do TinyERP.
No momento, apenas a API de notas fiscais foi implementada. Se quiser acessar outra parte da API como produtos, vendedores e crm, envie-nos um Pull Request :)
Acesse http://www.tiny.com.br e crie sua conta em um plano que tenha suporte à API.
Veja Como gerar seu token.
Adicione seu certificado dentro da interface web do Tiny antes de usar este módulo.
Todas as chamadas à API são feitas via HTTPS.
No momento apenas a API de manipulação de Notas Fiscais está disponível.
Retorna o objeto para manipulação de Notas Fiscais Eletrônicas (NFe). Para mais informações, consulte a documentação da classe Net::TinyERP::NotaFiscal.
Retorna o objeto para manipulação de Notas Fiscais de Serviço Eletrônicas (NFSe). Para mais informações, consulte a documentação da classe Net::TinyERP::NotaFiscalServicos.
Copyright (c) 2016-2021 - Breno G. de Oliveira garu at cpan.org. Todos os direitos reservados.
garu at cpan.org
Este módulo é software livre; você pode redistribuí-lo e/ou modificá-lo sob os mesmos termos que o Perl. Veja a licença perlartistic para mais informações.
PORQUE ESTE SOFTWARE É LICENCIADO LIVRE DE QUALQUER CUSTO, NÃO HÁ GARANTIA ALGUMA PARA ELE EM TODA A EXTENSÃO PERMITIDA PELA LEI. ESTE SOFTWARE É OFERECIDO "COMO ESTÁ" SEM QUALQUER GARANTIA DE QUALQUER TIPO, EXPRESSA OU IMPLÍCITA. TODO O RISCO RELACIONADO À QUALIDADE, DESEMPENHO E COMPORTAMENTO DESTE SOFTWARE É DE QUEM O UTILIZAR.
To install Net::TinyERP, copy and paste the appropriate command in to your terminal.
cpanm
cpanm Net::TinyERP
CPAN shell
perl -MCPAN -e shell install Net::TinyERP
For more information on module installation, please visit the detailed CPAN module installation guide.