NAME
Business::UPS::Tracking::Request - A tracking request
SYNOPSIS
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',
);
DESCRIPTION
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.
ACCESSORS
tracking
Business::UPS::Tracking object.
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)
ReferenceNumber
Custom reference number.
ShipperNumber
Shipper customer number. Only in combination with ReferenceNumber.
DestinationPostalCode
Shipment destination postal code. Only in combination with ReferenceNumber.
DestinationCountryCountry
Shipment destination country (<>ISO 3166-1 alpha-2)s. Only in combination with ReferenceNumber.
OriginPostalCode
Shipment origin postal code. Only in combination with ReferenceNumber.
OriginCountryCode
Shipment origin country (ISO 3166-1 alpha-2). Only in combination with ReferenceNumber.
ShipmentIdentificationNumber
Shipment identification number. Only in combination with ReferenceNumber.
PickupDateRangeBegin
Shipment pickup range. Either a string formated 'YYYYMMDD' or a DateTime object. Only in combination with ReferenceNumber.
PickupDateRangeEnd
Shipment pickup range. Either a string formated 'YYYYMMDD' or a DateTime object. Only in combination with ReferenceNumber.
ShipmentType
Type of shipment. '01' small packackage or '02' freight. Only in combination with ReferenceNumber.
CustomerContext
Arbitraty string that will be echoed back by UPS webservice.
IncludeFreight
Indicates whether the search should only include freight or small package only. The default is small package only.
METHODS
tracking_request
my $xmlrequest = $request->tracking_request;
Generates the xml request body.
run
my $response = $request->run;
Executes the request and returns either an exception or a Business::UPS::Tracking::Response object.
METHODS
meta
Moose meta method