         customer = data.customer
         paymentInfo = data.paymentInfo
         if _.has email2id, customer.email
-          Q('Update of customer is not implemented yet!')
+          Q 'Update of customer is not implemented yet!'
           #@update customer, customer.email, email2id[customer.email]
         else
           @create customer, paymentInfo

        console.error "Unsupported country '#{country}'"
        continue

      customerGroup = xmlHelpers.xmlVal xml, 'group', @NO_CUSTOMER_GROUP
      discount = xmlHelpers.xmlVal xml, 'Discount', '0.0'
      discount = parseFloat discount

      # B2C: set customer group if she has a discount. Otherwise the customer isn't in any group
      customerGroup = @CUSTOMER_GROUP_B2C_WITH_CARD_NAME if customerGroup is @CUSTOMER_GROUP_B2C_NAME
      customerGroup = @NO_CUSTOMER_GROUP if customerGroup is @CUSTOMER_GROUP_B2C_WITH_CARD_NAME and discount is 0

      paymentMethodCode = xmlHelpers.xmlVal xml, 'PaymentMethodCode', []
      paymentMethod = xmlHelpers.xmlVal xml, 'PaymentMethod', []

crypto = require 'crypto'
xmlHelpers = require '../lib/xmlhelpers'

NO_CUSTOMER_GROUP = 'NONE'
CUSTOMER_GROUP_B2C_NAME = 'B2C'
CUSTOMER_GROUP_B2B_NAME = 'B2B'
CUSTOMER_GROUP_B2C_WITH_CARD_NAME = 'B2C with card'

class CustomerXmlImport

  constructor: (options = {}) ->
    @client = new SphereClient options
