1075
1076
1077
1078
1079
1080
1081
1082
1083
1084
1085
1086
1087
1088
1089
|
# File 'lib/active_shipping/carriers/ups.rb', line 1075
def location_from_address_node(address)
return nil unless address
country = address.at('CountryCode').try(:text)
country = 'US' if country == 'ZZ'
country = 'XK' if country == 'KV'
Location.new(
:country => country,
:postal_code => address.at('PostalCode').try(:text),
:province => address.at('StateProvinceCode').try(:text),
:city => address.at('City').try(:text),
:address1 => address.at('AddressLine1').try(:text),
:address2 => address.at('AddressLine2').try(:text),
:address3 => address.at('AddressLine3').try(:text)
)
end
|