jazminschroeder/fedex — pull request #16 by jordanbyron (2012-07-09 14:18:18+00:00)
Title: Address Validation

This commit adds address validation to the fedex gem. Please note that Fedex only allows address validation in their production environment and it will not work on their test servers. Because of this I have added production credentials to `spec/config/fedex_credentails.yml` and will skip the specs for address validation unless those are present.

If you'd like, I can check in the VCR cassettes for that test so we don't need to skip it when developers don't have access to production credentials.

Usage is very simple:

```ruby
address = {
:street => "5 Elm Street",
:city => "Norwalk",
:state => "CT",
:postal_code => "06850",
:country => "USA"
}

address_result = fedex.validate_address(:address => address)

address_result.residential
# => true

address_result.score
# => 100

address_result.postal_code
# => "06850-3901"
```

The current implementation is super basic and there are may areas of Fedex's address validation service which this does not expose.