NAME
Business-Shipping-UPS_Offline-update-fuel-surcharge.pl
VERSION
$Rev: 189 $
DESCRIPTION
Updates the fuel surcharge (stored in config/fuel_surcharge.txt
) from the UPS web site. It is recommended that this be run every first Monday of the month in the early AM. Here is an example line to add to your crontab:
01 1 * * * Business-Shipping-UPS_Offline-update-fuel-surcharge.pl
That causes cron to run this update program at 1:01 AM every Monday.
METHODS
check_for_updates()
TODO: Put in a bin/... script, since it only needs to run once a month.
Changes to the surcharge will be effective the first Monday of each month.
* [Enh] Determine the upcoming fuel surcharge changes from UPS website, then
check to see if that date has passed. If so, automatically update the fuel
surcharge.
Stores the current rate in config/fuel_surcharge.txt, with the date it was updated.
TOdO: Add LWP::UserAgent to the required modules?
Fuel Surcharge: 11.25 Good Through Date: 20041101
* readfile( $file )
Note: this is not an object-oriented method.
* writefile( $filename, $filecontents )
Note: this is not an object-oriented method.
AUTHOR
Dan Browning <db@kavod.com>, Kavod Technologies, http://www.kavod.com.
COPYRIGHT AND LICENCE
Copyright (c) 2003-2004 Kavod Technologies, Dan Browning. All rights reserved. This program is free software; you may redistribute it and/or modify it under the same terms as Perl itself. See LICENSE for more info.