import _Item from './_Item.js'; var _LineItem = { createFromItem: function(item){ var lineitem = {}; lineitem.item = item; lineitem.quantity = 1; lineitem.price = _Item.priceOf(item); // store price, because if a customer changes pricing tiers, and then looks back at his purchase history, it should show the price he paid at the time, not what he would pay if he would make that same order now. return lineitem; } }; export default _LineItem;