Business::UPS::Tracking::Request - A tracking request
my $request = Business::UPS::Tracking::Request->new( tracking => $tracking_object, ReferenceNumber => 'myreferencenumber', ); $request->DestinationPostalCode('1020'); my $response = $request->run(); OR my $response = $tracking_object->request( ReferenceNumber => 'myreferencenumber', DestinationPostalCode => '1020', );
This class represents a UPS tracking request. You can search either for a UPS TrackingNumber or for a custom ReferenceNumber. Since ReferenceNumbers are not guaranteed to be unique you can provide additional parameters to narrow the ReferenceNumber search.
You have to provide either a ReferenceNumber or a TrackingNumber.
UPS tracking number. This number has to start with '1Z' and have a valid checksum. You can globally turn off this check by setting
$Business::UPS::Tracking::CHECKSUM = 0 (which is not recommended, but eg. needed for testing since test shipments at the UPS server do not have a valid checksum)
Custom reference number.
Shipper customer number. Only in combination with ReferenceNumber.
Shipment destination postal code. Only in combination with ReferenceNumber.
Shipment destination country (<>ISO 3166-1 alpha-2)s. Only in combination with ReferenceNumber.
Shipment origin postal code. Only in combination with ReferenceNumber.
Shipment origin country (ISO 3166-1 alpha-2). Only in combination with ReferenceNumber.
Shipment identification number. Only in combination with ReferenceNumber.
Type of shipment. '01' small packackage or '02' freight. Only in combination with ReferenceNumber.
Arbitraty string that will be echoed back by UPS webservice.
Indicates whether the search should only include freight or small package only. The default is small package only.
my $xmlrequest = $request->tracking_request;
Generates the xml request body.
my $response = $request->run;
Executes the request and returns either an exception or a Business::UPS::Tracking::Response object.
Moose meta method