Business::TNTPost::NL - Calculate Dutch (TNT Post) shipping costs
use Business::TNTPost::NL; my $tnt = Business::TNTPost::NL->new(); $tnt->country('DE'); $tnt->weight('534'); $tnt->large(1); $tnt->priority(1); $tnt->tracktrace(1); $tnt->register(1); $tnt->receipt(1); my $costs = $tnt->calculate or die $Business::TNTPost::NL::ERROR;
or
use Business::TNTPost::NL; my $tnt = Business::TNTPost::NL->new(); my $costs = $tnt->calculate( country =>'DE', weight => 534, large => 1, tracktrace => 1, register => 1, receipt => 1 ) or die $Business::TNTPost::NL::ERROR;
This module calculates the shipping costs for the Dutch TNT Post, based on country, weight and priority shipping (or not), etc.
The shipping cost information is based on 'Tarieven januari 2007'.
It returns the shipping costs in euro or undef (which usually means the parcel is heavier than the maximum allowed weight; check $Business::TNTPost::NL::ERROR).
$Business::TNTPost::NL::ERROR
The following methods can be used
new creates a new Business::TNTPost::NL object. No more, no less.
new
Business::TNTPost::NL
Sets the country (ISO 3166, 2-letter country code) and returns the zone number used by TNT Post (or 0 for The Netherlands (NL)).
This value is mandatory for the calculations.
Sets and/or returns the weight of the parcel in question in grams.
Sets and/or returns the value of this option. Defaults to 0 (meaning: the package will fit through the mail slot).
Sets and/or returns the value of this option. Defaults to 0 (meaning: standard class (or economy class, where standard is not available)).
Sets and/or returns the value of this options. Defaults to 0 (meaning: no track & trace feature wanted). When a parcel destined for abroad weighs over 2 kilograms, default is 1, while over 2kg it's not even optional anymore.
Sets and/or returns the value of this options. Defaults to 0 (meaning: parcel is not registered (Dutch: aangetekend)).
Sets and/or returns the value of this options. Defaults to 0 (meaning: receipt not requested for registered parcels).
Sets and/or returns the value of this options. Defaults to 0 (meaning: stamps will be used, not the machine (Dutch: frankeermachine)).
Only interesting for destinies within NL. Note that "Pakketzegel AVP" and "Easystamp" should also use this option.
Method to calculate the actual shipping cost based on the input (see methods above). These options can also be passed straight in to this method (see SYNOPSIS).
Two settings are mandatory: country and weight. The rest are given a default value that will be used unless told otherwise.
Returns the shipping costs in euro, or undef (see $Business::TNTPost::NL::ERROR in that case).
Please do report bugs/patches to http://rt.cpan.org/Public/Dist/Display.html?Name=Business-TNTPost-NL
The Dutch postal agency (TNT Post) uses many, many, many various ways for you to ship your parcels. Some of them are included in this module, but a lot of them not (maybe in the future? Feel free to patch ;-)
This module handles the following shipping ways (page numbers refer to the TNT Post booklet (sorry, all in Dutch)):
Pagina 6
Pagina 7, incl. toeslag handtekening retour
Pagina 8
Pagina 34
Pagina 35
Pagina 36
Pagina 38
These should be the most commom methods of shipment.
M. Blom, <blom@cpan.org>, http://menno.b10m.net/perl/
This program is free software; you can redistribute it and/or modify it under the same terms as Perl itself.
The full text of the license can be found in the LICENSE file included with this module.
http://www.tntpost.nl/, http://www.iso.org/iso/en/prods-services/iso3166ma/index.html
To install Business::TNTPost::NL, copy and paste the appropriate command in to your terminal.
cpanm
cpanm Business::TNTPost::NL
CPAN shell
perl -MCPAN -e shell install Business::TNTPost::NL
For more information on module installation, please visit the detailed CPAN module installation guide.