Class: Yoti::DocScan::Session::Retrieve::GetSessionResult
- Inherits:
-
Object
- Object
- Yoti::DocScan::Session::Retrieve::GetSessionResult
- Defined in:
- lib/yoti/doc_scan/session/retrieve/get_session_result.rb
Instance Attribute Summary collapse
- #checks ⇒ Array<CheckResponse> readonly
- #client_session_token ⇒ String readonly
- #client_session_token_ttl ⇒ Integer readonly
- #resources ⇒ ResourceContainer readonly
- #session_id ⇒ String readonly
- #state ⇒ String readonly
- #user_tracking_id ⇒ String readonly
Instance Method Summary collapse
- #authenticity_checks ⇒ Array<AuthenticityCheckResponse>
- #face_match_checks ⇒ Array<FaceMatchCheckResponse>
-
#initialize(response) ⇒ GetSessionResult
constructor
A new instance of GetSessionResult.
- #liveness_checks ⇒ Array<LivenessCheckResponse>
- #text_data_checks ⇒ Array<TextDataCheckResponse>
Constructor Details
#initialize(response) ⇒ GetSessionResult
Returns a new instance of GetSessionResult.
32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 |
# File 'lib/yoti/doc_scan/session/retrieve/get_session_result.rb', line 32 def initialize(response) Validation.assert_is_a(Integer, response['client_session_token_ttl'], 'client_session_token_ttl', true) @client_session_token_ttl = response['client_session_token_ttl'] Validation.assert_is_a(String, response['session_id'], 'session_id', true) @session_id = response['session_id'] Validation.assert_is_a(String, response['user_tracking_id'], 'user_tracking_id', true) @user_tracking_id = response['user_tracking_id'] Validation.assert_is_a(String, response['state'], 'state', true) @state = response['state'] Validation.assert_is_a(String, response['client_session_token'], 'client_session_token', true) @client_session_token = response['client_session_token'] if response['checks'].nil? @checks = [] else Validation.assert_is_a(Array, response['checks'], 'checks') @checks = map_checks(response['checks']) end @resources = ResourceContainer.new(response['resources']) unless response['resources'].nil? end |
Instance Attribute Details
#checks ⇒ Array<CheckResponse> (readonly)
24 25 26 |
# File 'lib/yoti/doc_scan/session/retrieve/get_session_result.rb', line 24 def checks @checks end |
#client_session_token ⇒ String (readonly)
12 13 14 |
# File 'lib/yoti/doc_scan/session/retrieve/get_session_result.rb', line 12 def client_session_token @client_session_token end |
#client_session_token_ttl ⇒ Integer (readonly)
9 10 11 |
# File 'lib/yoti/doc_scan/session/retrieve/get_session_result.rb', line 9 def client_session_token_ttl @client_session_token_ttl end |
#resources ⇒ ResourceContainer (readonly)
27 28 29 |
# File 'lib/yoti/doc_scan/session/retrieve/get_session_result.rb', line 27 def resources @resources end |
#session_id ⇒ String (readonly)
15 16 17 |
# File 'lib/yoti/doc_scan/session/retrieve/get_session_result.rb', line 15 def session_id @session_id end |
#state ⇒ String (readonly)
21 22 23 |
# File 'lib/yoti/doc_scan/session/retrieve/get_session_result.rb', line 21 def state @state end |
#user_tracking_id ⇒ String (readonly)
18 19 20 |
# File 'lib/yoti/doc_scan/session/retrieve/get_session_result.rb', line 18 def user_tracking_id @user_tracking_id end |
Instance Method Details
#authenticity_checks ⇒ Array<AuthenticityCheckResponse>
61 62 63 |
# File 'lib/yoti/doc_scan/session/retrieve/get_session_result.rb', line 61 def authenticity_checks @checks.select { |check| check.is_a?(AuthenticityCheckResponse) } end |
#face_match_checks ⇒ Array<FaceMatchCheckResponse>
68 69 70 |
# File 'lib/yoti/doc_scan/session/retrieve/get_session_result.rb', line 68 def face_match_checks @checks.select { |check| check.is_a?(FaceMatchCheckResponse) } end |
#liveness_checks ⇒ Array<LivenessCheckResponse>
82 83 84 |
# File 'lib/yoti/doc_scan/session/retrieve/get_session_result.rb', line 82 def liveness_checks @checks.select { |check| check.is_a?(LivenessCheckResponse) } end |
#text_data_checks ⇒ Array<TextDataCheckResponse>
75 76 77 |
# File 'lib/yoti/doc_scan/session/retrieve/get_session_result.rb', line 75 def text_data_checks @checks.select { |check| check.is_a?(TextDataCheckResponse) } end |