Shipment::Generic
version 0.18
This module does not DO a whole lot,
use Shipment::Generic; use Shipment::Address; use Shipment::Package; my $shipment = Shipment::Generic->new( from_address => Shipment::Address->new( ... ), to_address => Shipment::Address->new( ... ), packages => [ Shipment::Package->new( ... ), ], ); $shipment->rate( 'ground' ); $shipment->ship( 'ground' );
Shipment::Generic - a very Generic shipping interface
This class provides a Generic interface for a shipping service.
This class does not override or provide any additional attributes.
This routine simply adds a single "generic" service
This routine populates $self->service
It optionally accepts the cost passed as the second argument
$shipment->rate( 'ground', '12.34 ); print $shipment->service->cost . "\n";
This routine sets $self->tracking_id and calls $self->rate Also sets a label for each package
$shipment->ship( 'ground', '123456789', '12.32' );
TODO: create generic thermal, pdf, and png labels so that we can do: $shipment->get_package(0)->label->save;
This routine really does nothing but return 'success'
$shipment->tracking_id( '12345' ); $shipment->cancel;
Andrew Baerg @ <andrew at pullingshots dot ca>
http://pullingshots.ca/
Please contact me directly.
Copyright (C) 2010 Andrew J Baerg, All Rights Reserved
Absolutely, positively NO WARRANTY, neither express or implied, is offered with this software. You use this software at your own risk. In case of loss, no person or entity owes you anything whatsoever. You have been warned.
This program is free software; you can redistribute it and/or modify it under the same terms as Perl itself.
Andrew Baerg <baergaj@cpan.org>
This software is copyright (c) 2013 by Andrew Baerg.
This is free software; you can redistribute it and/or modify it under the same terms as the Perl 5 programming language system itself.
To install Shipment, copy and paste the appropriate command in to your terminal.
cpanm
cpanm Shipment
CPAN shell
perl -MCPAN -e shell install Shipment
For more information on module installation, please visit the detailed CPAN module installation guide.