         deferred.resolve body
     deferred.promise
 
-  _updateProductType: (productType, payload) =>
+  ###
+  # Updates asynchronously product type in Sphere.
+  #
+  # @param {String} id Product type id
+  # @param {Object} payload Update product type request as JSON
+  # @return {Object} If success returns promise with success message otherwise rejects with error message
+  ###
+  _updateProductType: (id, payload) =>
     deferred = Q.defer()
-    @rest.POST "/product-types/#{productType.id}", payload, (error, response, body) ->
+    @rest.POST "/product-types/#{id}", payload, (error, response, body) ->
       if error
         deferred.reject "HTTP error on product type update; Error: #{error}; Request body: \n #{utils.pretty payload} \n\n Response body: '#{utils.pretty body}'"
       else

{ProductSync} = require('sphere-node-sync')
{Rest} = require('sphere-node-connect')


#TODO: add code documentation

###
Creates new products in Sphere by given XML file.
###
class ProductImport

  constructor: (@_options = {}) ->

          deferred.resolve message
    deferred.promise

  ###
  # Executes in parallel defined number of asynchronous promise requests.
  #
  # @param {Array} list List of promise requests to fire
  # @param {Array} numberOfParallelRequest Number of requests to be fired in parallel
  # @return {Boolean} Returns true if all promises could be successfully resolved
  ###
  _batch: (list, numberOfParallelRequest) ->
    deferred = Q.defer()
    doBatch = (list, numberOfParallelRequest) ->
