jazminschroeder / fedex

Ruby library to interact with FedEx Rate Web Service
105 stars 179 forks source link

No Support for Freight Rates #121

Open GeorgeValergas opened 8 years ago

GeorgeValergas commented 8 years ago

Hi there,

passing in :service_type => "FEDEX_FREIGHT_ECONOMY" when calling Fedex::Shipment#rate gives the following error.

Either a FedEx Freight or Alternate account number and associated address is required for service type FEDEX_FREIGHT_ECONOMY

In order to support freight shipments, the credentials class needs a data member for :freight_account_number

fxfilmxf commented 7 years ago

Any response here? Some guidance on implementing would be welcome as well.

vpontis commented 6 years ago

I am also experiencing this error! I have reached out to our local FedEx person to see if they can help me debug. I'll update if I figure it out :)

I am experiencing this using test credentials and wsdl='beta'. I have not yet gotten production credentials.

Though I encountered the error when using this repo: https://github.com/jzempel/fedex

I think that means this error is a fedex auth issue, not a library issue.

vpontis commented 6 years ago

OK so I fixed my error and it's a little bit weird.

FedEx set us up with two different accounts: one for express (ground / parcel / etc) and one for freight (LTL, freight economy, etc).

Only the express account will give working API credentials (API Key, password, account number, and meter number) but if you want to get a freight rate request, you will need to add your freight account number at another part of the request.

vpalos commented 6 years ago

@vpontis But where exactly did you add the Account Number? Can you give a code sample?

vpalos commented 6 years ago

So, you're supposed to add the Freight Account Number (which is different from the regular one) at the path: RequestedShipment.FreightShipmentDetail.FedExFreightAccountNumber.

Really awkward API definition, FedEx!