Shipment::Temando
version 0.13
use Shipment::Temando; use Shipment::Address; use Shipment::Package; my $shipment = Shipment::Temando->new( from_address => Shipment::Address->new( ... ), to_address => Shipment::Address->new( ... ), packages => [ Shipment::Pacjage->new( ... ), ], ); foreach my $service ( $shipment->all_services ) { print $service->id . " (" . $service->cost . ")\n"; } $shipment->rate( 'Service Name' ); print $shipment->service->cost . "\n"; $shipment->ship( $service->id ); $shipment->get_package(0)->label->save;
Shipment::Temando - Interface to Temando Shipping Web Services
This class provides an interface to the Temando Web Services API. You must sign up for an API account with Temando in order to make use of ths module.
http://www.temando.com/affiliateRegistration2.html
It is an extension of Shipment::Base
It makes extensive use of SOAP::WSDL in order to create/decode xml requests and responses. The Shipment::Temando::WSDL interface was created primarily using the wsdl2perl.pl script from SOAP::WSDL.
Credentials required to access the Temando API.
This determines whether you will use the Temando training web service (for development) or the production web service (live)
These define the type of shipment.
Currently the default (and only supported) options are class="General Goods" and subclass="Household Goods". This should be sane defaults for most shipments.
Temando supports many other options here including Freight (pallets, containers, etc) and Vehicles.
The Temando request id
This will be set upon a successful call to "ship"
It can also be set before a call to "cancel"
type: String
Additional comments about the shipment
Temando accepts payment by credit card
credit_card_type can be one of 'Visa' or 'MasterCard'
credit_card_expiry must be in the format '02-2013'
Shipment::Base provides abstract types which need to be mapped to Temando (i.e. package_type of "envelope" maps to Temando "Document Envelope")
Temando provides package types in addition to the defaults in Shipment::Base
Temando does not offer true thermal printing, all labels are provided as documents (pdf, doc, or xls), thermal labels are simply a 4x6 documents.
The default currency is AUD
This calls getQuotesByRequest from the Temando API
Each Quote that is returned is added to services
The following service mapping is used: * ground => cheapest where <usingGeneralRoad> * express => cheapest where <usingExpressRoad> * priority => cheapest where <usingExpressAir>
This method sets $self->service to $self->services{$service_id}
This method calls makeBookingByRequest from the Temando API
All labels are available in $self->documents
The consignment document is available in $self->manifest
This method calls cancelRequest from the Temando API
It uses $self->request_id to identify the request to be cancelled
returns "Cancelled" if successful,
Andrew Baerg @ <andrew at pullingshots dot ca>
http://pullingshots.ca/
SiteSuite Australasia (http://www.sitesuite.com.au/) commissioned and paid for the development of this module
Please contact me directly.
Copyright (C) 2012 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.