NAME

Business::FedEx::Constants - FedEx Lookup Codes

DESCRIPTION

This module contains all the required codes needed by the FedEx Ship Manager API. All hash key lookups need to be done with lower case keys. I wanted to follow the FedEx Tagged Transaction Guide as close as possible so some of the names are pretty long. FedEx does occasionally change these tags so please check that you always have the most current version of this module. Changes should not break existing code. All changes are documented in a Changes file. We use this module extensively so as soon as a change is made we are quick to post to CPAN. Also, any changes or ideas are welcome please email me.

EXPORTS

%FE_RE

RE == XXX?. Maps from field tag to field name. Eg,

$FE_RE{1} = 'customer_transaction_identifier';
%FE_SE

SE == XXX? The reverse of %FE_RE. Eg,

$FE_SE{customer_transaction_identifier} = 1;
%FE_TT

TT == transaction tag? Maps from UTI to a list containing transaction tag and either the carrier or '' if it applies to all carriers. Eg,

$FE_TT{2016} = ['021', 'FDXE'];
$FE_TT{3000} = ['021', 'FDXG'];
$FE_TT{3003} = ['211', ''];
%FE_UTI_BY_TT

Maps from transaction tag and carrier to UTI. Eg,

$FE_UTI_BY_TT{'021'}{FDXE} = 2016;
$FE_UTI_BY_TT{'021'}{FDXG} = 3000;
$FE_UTI_BY_TT{'211'}{''}   = 3003;

'' is used for the carrier if the transaction applies to all carriers. If you want to determine whether this is the case programmatically, first check $FE_UTI_BY_TT{$tt}{$carrier}, if that doesn't exist (you can use a simple boolean test), use $FE_UTI_BY_TT{$tt}{''}. You can use uti_by_tt_carrier() to do this for you.

%FE_RQ

RQ == required. Maps from UTI to a list of field tags that UTI requires. Eg,

$FE_RQ{1005} = [0,10,498,3025,29];
$FE_* hash refs

Also exported for backwards compatibility are hash refs for the %FE_RE, %FE_SE, %FE_TT, and %FE_RQ hashes. Eg, you get $FE_RE, a reference to %FE_RE. These reference the raw underlying hashes, the % versions are read-only and they croak if you try to use a non-existent key. You should use the % versions in new code.

field_name_to_tag $name_or_tag

This translates from field names to field tag numbers. The $name_or_tag can contain an optional trailing -\d+ for a multiple-occurrence tag. Given an invalid name it croaks.

field_tag_to_name $name_or_tag

This translates from field tag numbers to field names. The $name_or_tag can contain an optional trailing -\d+ for a multiple-occurrence tag. Given an invalid name it croaks.

uti_by_tt_carrier $transaction_tag, $carrier

This returns the UTI to use for the given $transaction_tag and $carrier, or croaks if there isn't any. The $carrier can be '' for transactions which aren't carrier-specific (but using a non-empty $carrier will also work for those transactions).

AUTHORS

Jay Powers, <jpowers@cpan.org>

http://www.vermonster.com/

Copyright (c) 2004 Jay Powers

All rights reserved.

This program is free software; you can redistribute it and/or modify it under the same terms as Perl itself

If you have any questions, comments or suggestions please contact me.

SEE ALSO

perl(1).