active_shipping icon indicating copy to clipboard operation
active_shipping copied to clipboard

FedEx Address Validation

Open kstevens715 opened this issue 13 years ago • 11 comments

active_shipping doesn't appear to currently do FedEx address validation. We are currently using active_shipping in our project and have a need to identify the residential status of addresses before shipping. I'm planning on implementing this functionality myself. So if anyone has any comments on this it would be appreciated. Thanks.

kstevens715 avatar Feb 02 '12 14:02 kstevens715

Our main concern was that adding another API call on every request for rates would slow down the overall request too much.

That being said, I think this would be a great addition as long as we can make it optional.

Feel free to send a pull request at any time, even if it's incomplete and just looking for feedback.

Thanks for taking this on!

Sent from my iPhone

On 2012-02-02, at 9:39 AM, Kyle [email protected] wrote:

active_shipping doesn't appear to currently do FedEx address validation. We are currently using active_shipping in our project and have a need to identify the residential status of addresses before shipping. I'm planning on implementing this functionality myself. So if anyone has any comments on this it would be appreciated. Thanks.


Reply to this email directly or view it on GitHub: https://github.com/Shopify/active_shipping/issues/39

jduff avatar Feb 03 '12 13:02 jduff

Oh, I was planning on making it optional. I was going to set it up as it's own method. Thanks for your help.

We're actually migrating a 250,000 line .NET WMS application to Rails and in the past we've done a lot of integration with FedEx and UPS. So I'm looking forward to hopefully being able to contribute any UPS/FedEx integration code that would be useful to others back to this project.

kstevens715 avatar Feb 03 '12 14:02 kstevens715

Awesome, we're already thinking along the same lines :). Looking forward to seeing some pull requests, and good luck with that migration!

jduff avatar Feb 03 '12 14:02 jduff

I've had this working for myself for a while, but finally getting back into polishing my work so I can issue a pull request. One thing I'm worried about is that it's considered an "Advanced" service. Meaning for a person to use it they'll have to request special permission from FedEx (even for testing). I don't want all the tests to start failing for people that haven't requested this permission from FedEx. Any opinions on how this should be dealt with?

kstevens715 avatar Jun 07 '12 01:06 kstevens715

Suggestion: make a FedExAdvanced subclass FedEx and provide the advanced functionality there. Only run tests if a certain config key is present?

Capncavedan avatar Jun 07 '12 15:06 Capncavedan

That's not a bad idea, but if someone were working on the regular FedEx class they could inadvertently break the FedExAdvanced subclass without knowing about it. I suppose that might not be that bad, as long as before it was merged into the master branch the full tests were run.

kstevens715 avatar Jun 07 '12 15:06 kstevens715

If you had fixtures & unit tests for FedExAdvanced that always ran, that would guard against the situation you describe. The remote tests would only be able to run if the person had permission and credentials from FedEx to access those features.

My mental model of the unit vs remote tests in the project is that the unit tests ensure we aren't breaking things due to changes within the project, while the remote tests ensure the carriers aren't breaking things due to changes outside the project. Or at least alert us when such a breakage occurs, so we can update our unit tests and code accordingly.

Capncavedan avatar Jun 07 '12 15:06 Capncavedan

Yes, you're right! That makes perfect sense. Thank you for your help.

kstevens715 avatar Jun 07 '12 16:06 kstevens715

@kstevens715 did anything ever come of this?

ghost avatar Feb 28 '14 21:02 ghost

@tesserakt I no longer work for the same company so never finished the PR. But I did do enough to get it working and the fork is still being used by my previous company. Below is the link to the fork. There are two fedex validation branches on that fork, one of which is being used in production... I'm just not sure which one anymore.

https://github.com/nepco/active_shipping

kstevens715 avatar Mar 01 '14 18:03 kstevens715

Sorry for waking a post made three years ago but I still couldn't figure out if the project has address validation option for fedex/usps/ups?

I think that this is a very important validation before we create a shipping in production. can you please send me a usage for this?

megetron avatar Jan 12 '16 16:01 megetron