Class: Yoti::DocScan::Session::Create::RequestedTextExtractionTaskBuilder

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

Overview

Builder to assist creation of RequestedTextExtractionTask

Instance Method Summary collapse

Instance Method Details

#buildRequestedTextExtractionTask



108
109
110
111
# File 'lib/yoti/doc_scan/session/create/requested_text_extraction_task.rb', line 108

def build
  config = RequestedTextExtractionTaskConfig.new(@manual_check, @chip_data)
  RequestedTextExtractionTask.new(config)
end

#with_chip_data_desiredself

Returns:

  • (self)


92
93
94
95
# File 'lib/yoti/doc_scan/session/create/requested_text_extraction_task.rb', line 92

def with_chip_data_desired
  @chip_data = Constants::DESIRED
  self
end

#with_chip_data_ignoreself

Returns:

  • (self)


100
101
102
103
# File 'lib/yoti/doc_scan/session/create/requested_text_extraction_task.rb', line 100

def with_chip_data_ignore
  @chip_data = Constants::IGNORE
  self
end

#with_manual_check_alwaysself

Requires that the Task is always followed by a manual TextDataCheck

Returns:

  • (self)


64
65
66
67
# File 'lib/yoti/doc_scan/session/create/requested_text_extraction_task.rb', line 64

def with_manual_check_always
  @manual_check = Constants::ALWAYS
  self
end

#with_manual_check_fallbackself

Requires that only failed Tasks are followed by a manual TextDataCheck

Returns:

  • (self)


74
75
76
77
# File 'lib/yoti/doc_scan/session/create/requested_text_extraction_task.rb', line 74

def with_manual_check_fallback
  @manual_check = Constants::FALLBACK
  self
end

#with_manual_check_neverself

The TextExtractionTask will never fallback to a manual TextDataCheck

Returns:

  • (self)


84
85
86
87
# File 'lib/yoti/doc_scan/session/create/requested_text_extraction_task.rb', line 84

def with_manual_check_never
  @manual_check = Constants::NEVER
  self
end