jazminschroeder/fedex — pull request #31 by bradediger (2013-04-01 17:12:04+00:00)
Title: Allow customer references to have arbitrary type

Current `fedex` code sends any customer reference numbers to FedEx with the `CUSTOMER_REFERENCE` type. But FedEx supports more types, including `RMA_ASSOCIATION` which we happened to need.

This code allows any entry in the `customer_references` array to be a Hash with `:type` and `:value` entries, which will be passed through to FedEx Web Services as `CustomerReferenceType` and `Value`. The old syntax is still supported and has the same behavior -- the default type is `CUSTOMER_REFERENCE`.

Example of the new usage:

```ruby
shipping.label(
format: 'pdf',
filename: 'label.pdf',
# ...
packages: [
{
weight: {value: 1, units: 'LB'},
customer_references: [
"Order #12345", # default is CUSTOMER_REFERENCE
{type: 'RMA_ASSOCIATION', value: 'RA_2468'} # custom type
]
}
]
)
```

Also, this commit enables the correct spelling `customer_reference` while still supporting the old `customer_refrence`.

Thanks for the fedex gem; it is very helpful!