Class: Yoti::DocScan::Session::Create::CreateSessionResult
- Inherits:
-
Object
- Object
- Yoti::DocScan::Session::Create::CreateSessionResult
- Defined in:
- lib/yoti/doc_scan/session/create/create_session_result.rb
Overview
The response to a successful CreateSession call
Instance Attribute Summary collapse
-
#client_session_token ⇒ String
readonly
Returns the client session token for the created session.
-
#client_session_token_ttl ⇒ Integer
readonly
Returns the time-to-live (TTL) for the client session token for the created session.
-
#session_id ⇒ String
readonly
Session ID of the created session.
Instance Method Summary collapse
-
#initialize(response) ⇒ CreateSessionResult
constructor
A new instance of CreateSessionResult.
Constructor Details
#initialize(response) ⇒ CreateSessionResult
Returns a new instance of CreateSessionResult.
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_token ⇒ String (readonly)
Returns the client session token for the created session
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_ttl ⇒ Integer (readonly)
Returns the time-to-live (TTL) for the client session token for the created session
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_id ⇒ String (readonly)
Session ID of the created session
31 32 33 |
# File 'lib/yoti/doc_scan/session/create/create_session_result.rb', line 31 def session_id @session_id end |