Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Shipping API #11

Open
wants to merge 21 commits into
base: master
Choose a base branch
from
Open

Shipping API #11

wants to merge 21 commits into from

Conversation

meliquintero
Copy link

Melissa Jimison
Cristal Tay

API was built to accept Beeyonce's requests.

melissajimison and others added 21 commits May 23, 2016 15:57
…o see if we can talk to the betsy host and retrieve the json.
… returning a SSL error to :unknown protocol when attempting to post
… easy array now instead of crazy params. lolz.
total_result = ShippingWrapper.create(data_origin, data_destination, data_packages)
if total_result.fedex.nil?
#creates a new log of the BAD requests
log(params,total_result)
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

love that you log bad requests too! can be super helpful!

fedex_data = fedex_data.rates.sort_by(&:price).collect {|rate| [rate.service_name, rate.price]}
rescue
return self.new(nil,nil, nil)
end
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

really great error handling here!

@meliquintero
Copy link
Author

Thanks @CShekta for the feedback!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants