NAME
Shipment::Generic
VERSION
version 0.01111360
SYNOPSIS
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' );
NAME
Shipment::Generic - a very Generic shipping interface
ABOUT
This class provides a Generic interface for a shipping service.
Class Attributes
This class does not override or provide any additional attributes.
Class Methods
_build_services
This routine simply adds a single "generic" service
rate
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";
ship
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;
cancel
This routine really does nothing but return 'success'
$shipment->tracking_id( '12345' );
$shipment->cancel;
AUTHOR
Andrew Baerg @ <andrew at pullingshots dot ca>
http://pullingshots.ca/
BUGS
Please contact me directly.
COPYRIGHT
Copyright (C) 2010 Andrew J Baerg, All Rights Reserved
NO WARRANTY
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.
LICENSE
This program is free software; you can redistribute it and/or modify it under the same terms as Perl itself.
AUTHORS
Andrew Baerg <baergaj@cpan.org>
Al Newkirk <awncorp@cpan.org>
COPYRIGHT AND LICENSE
This software is copyright (c) 2010 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.