NAME

Business::Shipping::UPS_Offline::RateRequest

VERSION

$Rev: 211 $

GLOSSARY

  • EAS Extended Area Surcharge

  • DAS Delivery Area Surcharge (same as EAS)

METHODS

update

download

unzip

convert

is_from_west_coast

is_from_east_coast

to_residential

Zones

Hash. Format:

$self->Zones() = (
    'Canada' => {
        'zone_data' => [
            'low    high    service1    service2',
            '004    005        208            209',
            '006    010        208            209',
            'Canada    Canada    504            504',
        ]
    }
)

zone_file

zone_name

- For International, it's the name of the country (e.g. 'Canada')
- For Domestic, it is the first three of a zip (e.g. '986')
- For Canada, it is...?

convert_ups_rate_file

validate

_handle_response

$self->_increase_total_charges( $amount )

Increase the _total_charges by an amount.

calc_express_plus_adder

calc_delivery_area_surcharge

The "Delivery Area Surcharge" is also known as "Extended Area Surcharge", but does not include special residential charges that apply to some services (air services, for example).

$self->calc_residential_surcharge()

Note that this is different than the delivery area surcharge sub calc_residential_surcharge. It is listed as "Residential Differential" in the accessorials.csv file.

Currently $1.40.

calc_fuel_surcharge

ups_name_to_table

calc_zone_data()

* Modifies the class attribute Zones(), and adds data for the zone like so...

$self->Zones() = (
    'Canada' => {
        'zone_data' => [
            'low    high    service1    service2',
            '004    005        208            209',
            '006    010        208            209',
            'Canada    Canada    504            504',
        ]
    }
)

determine_keys()

Decides what unique keys will be used to locate the zone record.

* The first key ("key") is a shortened version (the zip code "98682" becomes
  "986") to locate the zone file and the range that it fits into.
  
* The second key ("raw_key") is the actual key, for looking up the record
  in the correct zone file once it has been found.

Returns ( $key, $raw_key )

rate_table_exceptions

WorldWide methods use different tables for Canada

calc_cost( )

* Modifies the class attribute $Zones, and adds data for the zone like so...

$Zones => {
    'Canada' => {
        'zone_data' => [
            'first line of zone file',
            'second line',
            'etc.',
        ]
    }
}

special_zone_hi_ak( $type )

$type    Type of service.

Hawaii and Alaska have special per-zipcode zone exceptions for 1da/2da.

calc_zone_info()

Determines which zone (zone_name), and which zone file to use for lookup.

determine_coast

If this is an international order, we need to determine which state the shipper is in, then if it is east or west coast. If west, then use the first "Express" field in the zone chart. If east, then use the second.

* readfile( $file )

Note: this is not an object-oriented method.

* writefile( $filename, $filecontents )

Note: this is not an object-oriented method.

_massage_values()

Performs some final value modification just before the submit.

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.