-
Notifications
You must be signed in to change notification settings - Fork 14
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
Shipple - Shipping Service API #18
base: dargash/master
Are you sure you want to change the base?
Conversation
end | ||
|
||
def set_origin | ||
ActiveShipping::Location.new(country: 'US', state: params[:origin][:state], city: params[:origin][:city], zip: params[:origin][:zip]) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It's a matter of what style guide you're using, but when the line is this long, I like to break it up into newlines. E.g.:
ActiveShipping::Location.new(
country: 'US',
state: params[:origin][:state],
[...]
This makes it more readable, but also makes on-the-job code reviews easier. Then if someone modifies a small part of just one of the elements, it's clear on the code review what they modified, rather than the whole line being colored.
@annaleeherrera and @daphnegold, Good job on this! This was well-executed, especially as a first API! Most of my comments were just styling preferences, but feel free to make your own decisions on style. It'll vary from team to team. Let me know if you have any questions on any of this, or if there's something in particular you were hoping for feedback about. |
Thank you so much for the comments on @catchingash! Your style notes are extremely helpful. |
Shipping service API for BOTsy app. Generates shipping rates from UPS and USPS. Requirements met.
Link to updated BOTsy app with Shipple API.
https://github.com/daphnegold/betsy
Link to Shipple Trello Board:
https://trello.com/b/822g87Dz/botsy-shipping-service