Class: Kount::RiskInquiry

Inherits:
Object
  • Object
show all
Defined in:
lib/kount/response.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(attrs = {}) ⇒ RiskInquiry

Returns a new instance of RiskInquiry.



41
42
43
44
45
46
47
# File 'lib/kount/response.rb', line 41

def initialize(attrs = {})
  @decision = attrs["decision"]
  @omniscore = attrs["omniscore"]
  @persona = Persona.new(attrs["persona"] || {})
  @device = attrs["device"]
  @segment_executed = SegmentExecuted.new(attrs["segment_executed"] || {})
end

Instance Attribute Details

#decisionObject

Returns the value of attribute decision.



39
40
41
# File 'lib/kount/response.rb', line 39

def decision
  @decision
end

#deviceObject

Returns the value of attribute device.



39
40
41
# File 'lib/kount/response.rb', line 39

def device
  @device
end

#omniscoreObject

Returns the value of attribute omniscore.



39
40
41
# File 'lib/kount/response.rb', line 39

def omniscore
  @omniscore
end

#personaObject

Returns the value of attribute persona.



39
40
41
# File 'lib/kount/response.rb', line 39

def persona
  @persona
end

#segment_executedObject

Returns the value of attribute segment_executed.



39
40
41
# File 'lib/kount/response.rb', line 39

def segment_executed
  @segment_executed
end

Instance Method Details

#approved?Boolean

Returns:

  • (Boolean)


49
50
51
# File 'lib/kount/response.rb', line 49

def approved?
  @decision == "APPROVE"
end