NAME

Business::Shipping - Cost estimation and tracking for UPS and USPS


SYNOPSIS

Rate request example

    use Business::Shipping;
    
    my $rate_request = Business::Shipping->rate_request(
        shipper   => 'Offline::UPS',
        service   => 'GNDRES',
        from_zip  => '98682',
        to_zip    => '98270',
        weight    =>  5.00,
    );    
    
    $rate_request->submit() or logdie $rate_request->user_error();
    
    print $rate_request->total_charges();

Shipping tasks implemented at this time

Shipping tasks planned for future addition


REQUIRED MODULES

 Bundle::DBD::CSV (any)
 Cache::FileCache (any)
 Class::MethodMaker::Engine (any)
 Clone (any)
 Config::IniFiles (any)
 Crypt::SSLeay (any)
 Getopt::Mixed (any)
 Log::Log4perl (any)
 LWP::UserAgent (any)
 Math::BaseCnv (any)
 Scalar::Util (1.10)
 XML::DOM (any)
 XML::Simple (2.05)


INSTALLATION

perl -MCPAN -e 'install Bundle::Business::Shipping'

See the INSTALL file for more information.


=head1 ERROR/DEBUG HANDLING

Log4perl is used for logging error, debug, etc. messages. See config/log4perl.conf. For simple manipulation of the current log level, use the Business::Shipping->log_level( $log_level ) class method (below).


=head1 METHODS

$self->init( %args )

Generic attribute setter.

$self->user_error( ``Error message'' )

Log and store errors that should be visibile to the user.

$self->validate()

Confirms that the object is valid. Checks that required attributes are set.

rate_request()

This method is used to request shipping rate information from online providers or offline tables. A hash is accepted as input with the following key values:

Business::Shipping->new_subclass( ``Subclass::Name'', %opt )

Generates a subclass, such as a Shipment object.

Business::Shipping->log_level( $log_level )

Sets the log level for all Business::Shipping objects.

$log_level can be 'debug', 'info', 'warn', 'error', or 'fatal'.


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 can redistribute it and/or modify it under the same terms as Perl itself. See LICENSE for more info.