 
     order
 
+  replaceTaxCategories: (order, taxCategory) ->
+    if order.shippingInfo? and order.shippingInfo.taxCategory?
+      order.shippingInfo.taxCategory[id] = taxCategory.id
+
+    order
+
   removeIdsAndVariantData: (order) ->
     _.each order.lineItems or [], (li) ->
       delete li.supplyChannel if li.supplyChannel?
+      delete li.id if li.id?
       delete li.productId if li.productId?
       delete li.states if li.states?
       if li.variant?

    deferred = Q.defer()
    sort = encodeURIComponent "createdAt DESC"
    rest.GET "/orders?sort=#{sort}", (error, response, body) ->
      if error
        deferred.reject "Error on fetching orders: " + error
      else if response.statusCode isnt 200
        deferred.reject "Problem on fetching orders (status: #{response.statusCode}): " + body

    _.map _.filter(order.lineItems or [], (li) -> li.variant? and li.variant.sku? ), (li) -> li.variant.sku

  replaceSKUs: (order, masterSKU2retailerSKU) ->
    if order.lineItems?
      for li in order.lineItems
        continue unless li.variant
        continue unless li.variant.sku
