mcmire / fedex

Fork of Mighty Interactive's fedex plugin (no longer available), updated to support v7 of the Fedex API. NOTE: I am no longer maintaining this library. There is at least one fork that supports v8. If you are interested in taking this over please let me know so I can remove this. Thanks!
MIT License
18 stars 10 forks source link

ServiceId hardcoded as "crs" #7

Open sporkd opened 14 years ago

sporkd commented 14 years ago

Howdy,

It appears the ServiceId is hardcoded to "crs" inside the WLS_VERSION hash. However ShipService_v7.wsdl requires ServiceId to be set to "ship". Is there a way to override this? If not it appears that only rate has been tested, and a patch will be necessary for label to work.

Peter

mcmire commented 14 years ago

Thanks for letting me know. You're right that I've only really tested the rate service, and I apologize for not having proper tests (I'm working toward that point). There may be a way to override the ServiceId, in fact -- try this:

fedex.label(:Version => { :Major => 7, :Intermediate => 0, :Minor => 0, :ServiceId => "ship" }, ...)

I'd guess that you'd probably have to do the same thing for .cancel as well. I'll work on making this automatic for .ship and .cancel, shouldn't be too much trouble.

mcmire commented 14 years ago

This is fixed in kdonovan's fork, I just need to pull it in...

sporkd commented 14 years ago

Cool. I think kdonovan already merged in all my changes as well, so merging with her branch will get you this fix.