class Yoti::DocScan::Session::Create::RequestedLivenessCheckBuilder

Builder to assist the creation of {RequestedLivenessCheck}

Public Class Methods

new() click to toggle source
# File lib/yoti/doc_scan/session/create/requested_liveness_check.rb, line 60
def initialize
  @max_retries = 1
end

Public Instance Methods

build() click to toggle source

@return [RequestedLivenessCheck]

# File lib/yoti/doc_scan/session/create/requested_liveness_check.rb, line 100
def build
  config = RequestedLivenessCheckConfig.new(@liveness_type, @max_retries)
  RequestedLivenessCheck.new(config)
end
for_liveness_type(liveness_type) click to toggle source

Sets the type of the liveness check to the supplied value

@param [String] liveness_type

@return [self]

# File lib/yoti/doc_scan/session/create/requested_liveness_check.rb, line 71
def for_liveness_type(liveness_type)
  @liveness_type = liveness_type
  self
end
for_zoom_liveness() click to toggle source

Sets the type to be of a ZOOM liveness check

@return [self]

# File lib/yoti/doc_scan/session/create/requested_liveness_check.rb, line 81
def for_zoom_liveness
  for_liveness_type(Constants::ZOOM)
end
with_max_retries(max_retries) click to toggle source

Sets the maximum number of retries allowed by the user

@param [Integer] max_retries

@return [self]

# File lib/yoti/doc_scan/session/create/requested_liveness_check.rb, line 92
def with_max_retries(max_retries)
  @max_retries = max_retries
  self
end