Class: LitleOnline::AdvancedFraudResults

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

Class Method Summary collapse

Class Method Details

.from_hash(hash, name = "advancedFraudResults") ⇒ Object



333
334
335
336
337
338
339
340
341
342
343
344
# File 'lib/XMLFields.rb', line 333

def self.from_hash(hash, name="advancedFraudResults")
  base = hash[name]
  if(base)
    this = AdvancedFraudResults.new
    this.deviceReviewStatus = base['deviceReviewStatus']
    this.deviceReputationScore = base['deviceReputationScore']
    if(base['triggeredRule'])
      base['triggeredRule'].each_index {|index| this.triggeredRule << base['triggeredRule'][index]}
    end
    this
  end
end