spree/spree_wombat — pull request #49 by huoxito (2014-10-08 18:52:56+00:00)
Title: Merge quantity of units when serializing shipment.items

Currently when receiving that shipment back via a webhook from wombat
the extention would complain about a diff in the items.

e.g. The received shipment items do not match with the shipment, diff: [{:sku=>"123", :quantity=>1}, {:sku=>"123", :quantity=>1}]

Before:

items: [{ product_id: 1, quantity: 1 }, { product_id: 1, quantity: 1 }]

Now:

items: [{ product_id: 1, quantity: 2 }]

// @JDutil @peterberkenbosch could you please review?

I think this is ok given the shipment.items key would be a representation of what we want in wombat and not what we have in spree exactly (inventory units don't have a quantity in spree).