Class: Yoti::DocScan::Session::Create::CreateSessionResult

Inherits:
Object
  • Object
show all
Defined in:
lib/yoti/doc_scan/session/create/create_session_result.rb

Overview

The response to a successful CreateSession call

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(response) ⇒ CreateSessionResult

Returns a new instance of CreateSessionResult.

Parameters:

  • response (Hash)


36
37
38
39
40
41
42
43
44
45
# File 'lib/yoti/doc_scan/session/create/create_session_result.rb', line 36

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['client_session_token'], 'client_session_token', true)
  @client_session_token = response['client_session_token']

  Validation.assert_is_a(String, response['session_id'], 'session_id', true)
  @session_id = response['session_id']
end

Instance Attribute Details

#client_session_tokenString (readonly)

Returns the client session token for the created session

Returns:

  • (String)


24
25
26
# File 'lib/yoti/doc_scan/session/create/create_session_result.rb', line 24

def client_session_token
  @client_session_token
end

#client_session_token_ttlInteger (readonly)

Returns the time-to-live (TTL) for the client session token for the created session

Returns:

  • (Integer)


17
18
19
# File 'lib/yoti/doc_scan/session/create/create_session_result.rb', line 17

def client_session_token_ttl
  @client_session_token_ttl
end

#session_idString (readonly)

Session ID of the created session

Returns:

  • (String)


31
32
33
# File 'lib/yoti/doc_scan/session/create/create_session_result.rb', line 31

def session_id
  @session_id
end