           @returnResult false, msg, callback
 
   mapStock: (xmljs, channelId) ->
+    console.log 'mapStock'
     stocks = []
     for k,row of xmljs.row
       sku = xmlHelpers.xmlVal row, 'code'

        xmlString = new Buffer(content, 'base64').toString()
        @run xmlString, cb
    else if msg.body
      # TODO: As we get only one entry here, we should query for the existing one and not
      # get the whole inventory
      @initMatcher().then () =>
        @createOrUpdate([@createInventoryEntry(msg.body.SKU, msg.body.QUANTITY)], cb)
      .fail (msg) =>
        @returnResult false, msg, cb
    else
      @returnResult false, 'No data found in elastic.io msg.', cb

  run: (xmlString, callback) ->

      if expectedQuantity
        d = @createInventoryEntry(sku, expectedQuantity, xmlHelpers.xmlVal(row, 'deliverydate'), channelId)
        stocks.push d
    console.log 'mapStock: %j', stocks
    stocks

module.exports = StockXmlImport