Class: LitleOnline::AuthInformation

Inherits:
Object
  • Object
show all
Includes:
XML::Mapping
Defined in:
lib/XMLFields.rb

Class Method Summary collapse

Class Method Details

.from_hash(hash, name = 'authInformation') ⇒ Object



379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
# File 'lib/XMLFields.rb', line 379

def self.from_hash(hash, name='authInformation')
  base = hash[name]
  if(base)
    this = AuthInformation.new
    this.authDate = base['authDate']
    this.authCode = base['authCode']
    this.fraudResult = FraudResult.from_hash(base)
    this.authAmount = base['authAmount']
    SchemaValidation.validate_date(this.authDate, false, name, 'authDate')
    SchemaValidation.validate_length(this.authCode, false, 1, 6, name, "authCode")
    SchemaValidation.validate_size(this.authAmount, false, -999999999999, 999999999999, name, 'authAmount')
    this
  else
    nil
  end
end