NAME

Correios::Frete get the price to send with Correios (Brazilian Post-Office) your mail.

SYNOPISIS

use Correios::Frete;

my $foo = new Correios::Frete;

$foo->get_price('40215', '04002001', '04002002', 0.1);

if ($foo->is_success) {
	print $foo->value;
}

DESCRIPTION

Correios::Frete

METHODS

new

creates a new Correios::Frete object.

Options

ua

Configure your own WWW::Mechanize object, or use our default value.

from

Set from cep.

to

Set to cep.

weight

Set the weight in kg.

service

Set the type of service.

FRETE_PAC => '41106';
FRETE_SEDEX => '40010';
FRETE_SEDEX_10 => '40215';
FRETE_SEDEX_HOJE => '40290';
FRETE_E_SEDEX => '81019';
FRETE_MALOTE => '44104';

get_price (service, from, to, weight)

Get the price!

is_success

Returns true when the last sending was successful and false when it failed.

value

Returns the value.

AUTHOR

Thiago Rondon, <thiago@aware.com.br>

COPYRIGHT AND LICENSE

Copyright (C) 2008 by Thiago Rondon

This library is free software; you can redistribute it and/or modify it under the same terms as Perl itself, either Perl version 5.8.8 or, at your option, any later version of Perl 5 you may have available.