450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467 
     | 
    
      # File 'lib/XMLFields.rb', line 450
def self.from_hash(hash, name='pos')
  base = hash[name]
  if(base)
    this = Pos.new
    this.capability = base['capability']
    this.entryMode = base['entryMode']
    this.cardholderId = base['cardholderId']
    this.terminalId = base['terminalId']
    this.catLevel =base['catLevel']
    SchemaValidation.validate_enum(this.capability, true, ['notused','magstripe','keyedonly'], name, 'capability')
    SchemaValidation.validate_enum(this.entryMode, true, ['notused','keyed','track1','track2','completeread'], name, 'entryMode')
    SchemaValidation.validate_enum(this.cardholderId, true, ['signature','pin','nopin','directmarket'], name, 'cardholderId')
    SchemaValidation.validate_enum(this.catLevel, false, ['self service'], name, 'catLevel')
    this
  else
    nil
  end
end
     |