Group
Extension

Matches 6

Net-Correios ( G/GA/GARU/Net-Correios-0.002.tar.gz, GARU, 2024; MetaCPAN )
Net-Correios/lib/Net/Correios.pm ( view source; MetaCPAN )
use warnings;

use HTTP::Tiny;
use MIME::Base64 ();
use Carp         ();
use Scalar::Util ();
use JSON         ();

$Carp::Internal{ 'Net::Correios' }++;

package Net::Correios;

our $VERSION = '0.002
         default_headers => {
                'Accept' => 'application/json',
                'Content-Type' => 'application/json',
            },
            verify_SSL => 1,
            timeout => $
b parse_response {
    my ($self, $res) = @_;
    if ($res->{success}) {
        my $data = JSON::decode_json($res->{content});
        return $data;
    }
    else {
        my $error = $res->{status
Net-Correios ( G/GA/GARU/Net-Correios-0.002.tar.gz, GARU, 2024; MetaCPAN )
Net-Correios/lib/Net/Correios/Manifestacao.pm ( view source; MetaCPAN )
use strict;
use warnings;
use Scalar::Util ();
use JSON ();

package Net::Correios::Manifestacao;

sub new {
    my ($class, $parent) = @_;
    Scalar::Util::weaken($parent);
    return bless { parent
      'POST',
        'pedido-informacao/v1/externo/pedidos/cadastra',
        { content => JSON::encode_json($request_data) }
    );
    return $parent->parse_response($res);
}

sub _traduz_embalagem
Net-Correios ( G/GA/GARU/Net-Correios-0.002.tar.gz, GARU, 2024; MetaCPAN )
Net-Correios/lib/Net/Correios/Prazo.pm ( view source; MetaCPAN )
use strict;
use warnings;
use Scalar::Util;
use JSON ();

package Net::Correios::Prazo;

sub new {
    my ($class, $parent) = @_;
    Scalar::Util::weaken($parent);
    return bless { parent => $paren
equest(
        'cartao',
        'POST',
        'prazo/v1/nacional',
        { content => JSON::encode_json($args) }
    );
    my $res = $parent->parse_response($raw);
    foreach my $r (@$res) {
 
Net-Correios ( G/GA/GARU/Net-Correios-0.002.tar.gz, GARU, 2024; MetaCPAN )
Net-Correios/lib/Net/Correios/Preco.pm ( view source; MetaCPAN )
use strict;
use warnings;
use Scalar::Util ();
use JSON ();

package Net::Correios::Preco;

sub new {
    my ($class, $parent) = @_;
    Scalar::Util::weaken($parent);
    return bless { parent => $pa
equest(
        'cartao',
        'POST',
        'preco/v1/nacional',
        { content => JSON::encode_json($args) }
    );
    return $parent->parse_response($res);
}

sub _parse_nacional {
    my 
Net-Correios ( G/GA/GARU/Net-Correios-0.002.tar.gz, GARU, 2024; MetaCPAN )
Net-Correios/lib/Net/Correios/Prepostagens.pm ( view source; MetaCPAN )
      'cartao',
        'POST',
        'prepostagem/v1/prepostagens',
        { content => JSON::encode_json($request_data) }
    );
    return $parent->parse_response($res);
}

sub emitir_rotulo {
 
  'POST',
        'prepostagem/v1/prepostagens/rotulo/assincrono/pdf',
        { content => JSON::encode_json($request_data) }
    );
    return $parent->parse_response($res);
}

sub obter_rotulo_emit
Net-Correios ( G/GA/GARU/Net-Correios-0.002.tar.gz, GARU, 2024; MetaCPAN )
Net-Correios/lib/Net/Correios/Token.pm ( view source; MetaCPAN )
use strict;
use warnings;
use Scalar::Util ();
use JSON ();

package Net::Correios::Token;

sub new {
    my ($class, $parent) = @_;

    Scalar::Util::weaken($parent);
    return bless { parent => $p
nt = $self->{parent};

    my $endpoint_url = $parent->{base_url} . 'token/v1/autentica';
    my $json_body;
    # TODO: precisamos entender quais endpoints funcionam com quais tokens.
    # muito pro
;
        $json_body = JSON::encode_json({ numero => $args{contrato} });
    }
    elsif ($args{cartao}) {
        $endpoint_url .= '/cartaopostagem';
        $json_body = JSON::encode_json({ numero =

Powered by Groonga
Maintained by Kenichi Ishigaki <ishigaki@cpan.org>. If you find anything, submit it on GitHub.