Class: WorkOS::RadarStandaloneResponse

Inherits:
Types::BaseModel show all
Defined in:
lib/workos/radar/radar_standalone_response.rb

Constant Summary collapse

HASH_ATTRS =
{
  verdict: :verdict,
  reason: :reason,
  attempt_id: :attempt_id,
  control: :control,
  blocklist_type: :blocklist_type
}.freeze

Instance Attribute Summary collapse

Attributes inherited from Types::BaseModel

#last_response

Instance Method Summary collapse

Methods inherited from Types::BaseModel

normalize

Methods included from HashProvider

#inspect, #to_h, #to_json

Constructor Details

#initialize(json) ⇒ RadarStandaloneResponse

Returns a new instance of RadarStandaloneResponse.



22
23
24
25
26
27
28
29
# File 'lib/workos/radar/radar_standalone_response.rb', line 22

def initialize(json)
  hash = self.class.normalize(json)
  @verdict = hash[:verdict]
  @reason = hash[:reason]
  @attempt_id = hash[:attempt_id]
  @control = hash[:control]
  @blocklist_type = hash[:blocklist_type]
end

Instance Attribute Details

#attempt_idObject

Returns the value of attribute attempt_id.



15
16
17
# File 'lib/workos/radar/radar_standalone_response.rb', line 15

def attempt_id
  @attempt_id
end

#blocklist_typeObject

Returns the value of attribute blocklist_type.



15
16
17
# File 'lib/workos/radar/radar_standalone_response.rb', line 15

def blocklist_type
  @blocklist_type
end

#controlObject

Returns the value of attribute control.



15
16
17
# File 'lib/workos/radar/radar_standalone_response.rb', line 15

def control
  @control
end

#reasonObject

Returns the value of attribute reason.



15
16
17
# File 'lib/workos/radar/radar_standalone_response.rb', line 15

def reason
  @reason
end

#verdictObject

Returns the value of attribute verdict.



15
16
17
# File 'lib/workos/radar/radar_standalone_response.rb', line 15

def verdict
  @verdict
end