Class: CnpOnline::AdvancedFraudChecks

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

Class Method Summary collapse

Class Method Details

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



1551
1552
1553
1554
1555
1556
1557
1558
1559
1560
1561
1562
1563
1564
1565
1566
1567
1568
1569
1570
1571
# File 'lib/XMLFields.rb', line 1551

def self.from_hash(hash, name="advancedFraudChecks")
  base = hash[name]
  if(base)
    this = AdvancedFraudChecks.new
    this.threatMetrixSessionId = base['threatMetrixSessionId']      #   /\A([A-Z,a-z,0-9, ,\*,,,\-,',#,&,.]){4,25}\Z/
    #SchemaValidation.validate_regex(this.threatMetrixSessionId, true, '[-a-zA-Z0-9_]{1,128}', name, 'threatMetrixSessionId')
    this.webSessionId = base['webSessionId']
    #SchemaValidation.validate_regex(this.webSessionId, true, '[-a-zA-Z0-9_]{1,128}', name, 'webSessionId')
    this.customAttribute1 = base['customAttribute1']
    SchemaValidation.validate_length(this.customAttribute1,false,1,200,name,"customAttribute1")
    this.customAttribute2 = base['customAttribute2']
    SchemaValidation.validate_length(this.customAttribute2,false,1,200,name,"customAttribute2")
    this.customAttribute3 = base['customAttribute3']
    SchemaValidation.validate_length(this.customAttribute3,false,1,200,name,"customAttribute3")
    this.customAttribute4 = base['customAttribute4']
    SchemaValidation.validate_length(this.customAttribute4,false,1,200,name,"customAttribute4")
    this.customAttribute5 = base['customAttribute5']
    SchemaValidation.validate_length(this.customAttribute5,false,1,200,name,"customAttribute5")
    this
  end
end