       .then (values) =>
         @_headers = values.headers
         @_values = values.data
-        @
+        this
     else
-      Q(@)
+      Q(this)
 
   _parseCsv: (csvText) ->
     d = Q.defer()

    _.reduce _.map(properties, ((prop, idx) -> [prop, idx])), reduceFn, {}

  _convertFromObject: (properties, obj) ->
    foo = _.map properties, (name) ->
      obj[name]
    foo

  run: ->
    # TODO: introduce concept for the the second (additional) CSV file that stores retailer update info

class ConstantTransformer extends ValueTransformer
  init: (options) ->
    @_value = options.value
    Q(this)

  transform: (value) ->
    @_value

class UpperCaseTransformer extends ValueTransformer
  init: (options) ->
    Q(this)

  transform: (value) ->
    value.toUpperCase()

class LowerCaseTransformer extends ValueTransformer
  init: (options) ->
    Q(this)

  transform: (value) ->
    value.toLowerCase()
