class Yoti::DocScan::Session::Create::SessionSpecificationBuilder
Public Class Methods
# File lib/yoti/doc_scan/session/create/session_specification.rb, line 84 def initialize @requested_checks = [] @requested_tasks = [] @required_documents = [] end
Public Instance Methods
@return [SessionSpecification]
# File lib/yoti/doc_scan/session/create/session_specification.rb, line 204 def build SessionSpecification.new( @client_session_token_ttl, @resources_ttl, @user_tracking_id, @notifications, @requested_checks, @requested_tasks, @sdk_config, @required_documents, @block_biometric_consent ) end
Whether or not to block the collection of biometric consent
@param [Boolean] block_biometric_consent
@return [self]
# File lib/yoti/doc_scan/session/create/session_specification.rb, line 196 def with_block_biometric_consent(block_biometric_consent) @block_biometric_consent = block_biometric_consent self end
Client-session-token time-to-live to apply to the created session
@param [Integer] client_session_token_ttl
@return [self]
# File lib/yoti/doc_scan/session/create/session_specification.rb, line 97 def with_client_session_token_ttl(client_session_token_ttl) @client_session_token_ttl = client_session_token_ttl self end
For configuring call-back messages
@param [NotificationConfig] notifications
@return [self]
# File lib/yoti/doc_scan/session/create/session_specification.rb, line 133 def with_notifications(notifications) @notifications = notifications self end
The check to be performed on each Document
@param [RequestedCheck] requested_check
@return [self]
# File lib/yoti/doc_scan/session/create/session_specification.rb, line 145 def with_requested_check(requested_check) Validation.assert_is_a(RequestedCheck, requested_check, 'requested_check') @requested_checks.push(requested_check) self end
The task to be performed on each Document
@param [RequestedTask] requested_task
@return [self]
# File lib/yoti/doc_scan/session/create/session_specification.rb, line 158 def with_requested_task(requested_task) Validation.assert_is_a(RequestedTask, requested_task, 'requested_task') @requested_tasks.push(requested_task) self end
Adds a RequiredDocument
to the list documents required from the client
@param [RequiredDocument] required_document
@return [self]
# File lib/yoti/doc_scan/session/create/session_specification.rb, line 183 def with_required_document(required_document) Validation.assert_is_a(RequiredDocument, required_document, 'required_document') @required_documents.push(required_document) self end
Time-to-live used for all Resources created in the course of the session
@param [Integer] resources_ttl
@return [self]
# File lib/yoti/doc_scan/session/create/session_specification.rb, line 109 def with_resources_ttl(resources_ttl) @resources_ttl = resources_ttl self end
The SDK configuration set on the session specification
@param [SdkConfig] sdk_config
@return [self]
# File lib/yoti/doc_scan/session/create/session_specification.rb, line 171 def with_sdk_config(sdk_config) @sdk_config = sdk_config self end
User tracking id, for the Relying Business to track returning users
@param [String] user_tracking_id
@return [self]
# File lib/yoti/doc_scan/session/create/session_specification.rb, line 121 def with_user_tracking_id(user_tracking_id) @user_tracking_id = user_tracking_id self end