Skip to content

Instantly share code, notes, and snippets.

@huoxito
Created August 27, 2014 18:20
Show Gist options
  • Save huoxito/ec827fc2f8cee08886fd to your computer and use it in GitHub Desktop.
Save huoxito/ec827fc2f8cee08886fd to your computer and use it in GitHub Desktop.
Give back service ID to Wombat
def add_order
# do stuff / add the order to shopify and get that order id
#
# e.g. order = Shopify.create_order @payload
# This will do a partial update in Wombat, only the new key
# shopify_id will be added everything else will be the same
add_object "order", { @payload[:order][:id], shopify_id: order.id }
result 200, "Order created!"
end
@shaabans
Copy link

shaabans commented Sep 3, 2014

Should the add_object call look like this instead?

add_object 'order', { id: @payload[:request_id], shopify_id: order.id }

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment