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

Shipple - Shipping Service API #18

Open
wants to merge 13 commits into
base: dargash/master
Choose a base branch
from

Conversation

annaleeherrera
Copy link

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

@catchingash catchingash self-assigned this Feb 2, 2016
end

def set_origin
ActiveShipping::Location.new(country: 'US', state: params[:origin][:state], city: params[:origin][:city], zip: params[:origin][:zip])

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.

@catchingash
Copy link

@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.

@daphnegold
Copy link

Thank you so much for the comments on @catchingash! Your style notes are extremely helpful.

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