Kyle Brandt > WebService-UPS-0.11 > WebService::UPS::TrackedPackage

Download:
WebService-UPS-0.11.tar.gz

Dependencies

Annotate this POD

CPAN RT

New  1
Open  0
View/Report Bugs
Source  

NAME ^

WebService::UPS::TrackedPackage - Generated from the WebService::UPS::TrackRequest Object, Use this object to get tracking infomation

SYNOPSIS ^

    my $Package = WebService::UPS::TrackRequest->new;
    $Package->Username('kbrandt');
    $Package->Password('topsecrent');
    $Package->License('8C3D7EE8FZZZZZ4');
    $Package->TrackingNumber('1ZA45Y5111111111');
    print $Package->Username();
    my $trackedpackage = $Package->requestTrack();
    $trackedpackage->isError()

Methods ^

new()

    $trackedpackage = WebService::UPS::TrackRequest->new( _returned_xml => $object->requestTrack());

The constructor method that creates a new Request Object. You probably should not be calling this directly as above, rather it should returned from the WebService::UPS::TrackRequest Object

_returned_xml

This is populated by the WebService::UPS::TrackRequest Object, you shouldn't be messing with it in general. But if you dump it with dumper, and you are clever, you might be able to access things that my module doesn't have getters for.

debug

Set this to something to make a lot of stuff appear

isError()

        $trackedpackage->isError()

Returns 1 if the UPS response says there was an error with your TrackRequest, if no error, returns 0.

isError()

        $trackedpackage->getError()

Returns the UPS response Error if your trackrequest was invalid

getShipperAddress()

        my $addressObject = $trackedpackage->getShipperAddress()

Returns a WebService::UPS::Address object with the shipper's address information.

getDestinationAddress()

See getShipperAddress, but for where the package is going.

getActivityCount;

        $trackedpackage->getActivityCount()

Returns how many 'Activity Entries' there are. This is useful if you want to iterate over the activity and return a bunch of WebService::UPS::Activity Objects. To itterate with it, make sure you use (- 1).

getActivity()

        $trackedpackage->getActivity(1)

Returns a WebService::UPS::Activity object at the index specified (1 in the above example). If no argument is provided, the method will assume 0, which seems to be the most recent entry. Use getActivityCount to find out how many activity Entries there are.

getCurrentStatus()

        $trackedpackage->getCurrentStatus()

Returns a string with UPS's summary of the shipment's current Status

getScheduledDeliveryDate()

        $trackedpackage->getScheduledDeliveryDate()

Returns when UPS thinks your package will be delivered might be returned, but be careful!!, this will still be there if the delivery date has been rescheduled.

getActivityList

        $trackedpackage->getActivityList()

A convenience method that uses other methods. This displays a tab delimited list with the Date, Location, and Description of all activity for the package (Also, a header). You might want to look at this as an example of how to use this module.

getWeight()

        $trackedpackage->getWeight()

Returns a string "Weight Unit", for example "18.00 LBS"

getDescription()

        $trackedpackage->getDescription()

Returns a string which should be whatever you specified as the description attribute in your TrackRequest Object. However, it is fetched from the UPS response, hence 'should'.

AUTHOR ^

Kyle Brandt, kyle@kbrandt.com http://www.kbrandt.com

syntax highlighting: