spree/spree — pull request #5593 by HoyaBoya (2014-11-10 23:18:36+00:00)
Title: Show total in stock in variant payload of API

Showing a simple in_stock true / false doesn't provide the right granularity when we are trying to inform the user that they have X items in their cart but we only have Y in stock, please adjust their quantity. We still want people to have the chance to checkout with what they have.

This change adds the ```total_on_hand``` to the RABL.

This might occur for resurrected carts that are X months old, or when we bounce a user out of checkout for inventory reasons back to their cart to make corrections.