Business-Colissimo
view release on metacpan or search on metacpan
Countries outside of KPG:
$colissimo = Business::Colissimo->new(mode => 'expert_i');
METHODS
new
$colissimo = Business::Colissimo->new(mode => 'access_f',
customer_number => '900001',
parcel_number => '2052475203',
postal_code => '72240',
weight => 250);
$colissimo = Business::Colissimo->new(mode => 'expert_f',
customer_number => '900001',
parcel_number => '2052475203',
postal_code => '72240',
weight => 250,
cod => 1,
level => '01');
barcode
Produces the tracking barcode:
$colissimo->barcode('tracking');
Same with proper spacing for the shipping label:
$colissimo->barcode('tracking', spacing => 1);
Produces the sorting barcode:
$colissimo->barcode('sorting');
Same with proper spacing for the shipping label:
$colissimo->barcode('sorting', spacing => 1);
barcode_image
Produces PNG image for tracking barcode:
$colissimo->barcode_image('tracking');
Produces PNG image for sorting barcode:
$colissimo->barcode_image('sorting');
Produces PNG image for arbitrary barcode:
$colissimo->barcode_image('8L20524752032');
The scale of the image can be changed for each barcode individually:
$colissimo->barcode_image('8L20524752032', scale => 2);
The default scale is set to 1, because that produces images with the
right number of pixels to include them into PDF with PDF::API2, which
uses 72dpi resolution for images unless you specify width and height
explicitly (see PDF::API2::Content).
The formula for calculating width in mm for a 72dpi resolution is as
follows:
(1px * 25.4) / 72dpi
This fits into Colissimo's requirement for the basic module (narrowest
element of the bar code) of 0.33 to 0.375 mm.
logo
Returns logo file name for selected service.
$colissimo->logo;
test
Toggles testing.
$colissimo->test(1);
scale
Get current scale for barcode image:
$colissimo->scale;
Set current scale for barcode image:
$colissimo->scale(3);
height
Get current height for barcode image:
$colissimo->height;
Set current height for barcode image:
$colissimo->height(100);
padding
Get current padding for barcode image:
$colissimo->padding;
Set current padding for barcode image:
$colissimo->padding(0);
customer_number
Get current customer number:
$colissimo->customer_number;
Set current customer number:
$colissimo->customer_number('900001');
parcel_number
Get current parcel number:
$colissimo->parcel_number;
Set current parcel number:
( run in 0.841 second using v1.01-cache-2.11-cpan-d8267643d1d )