Class: Yoti::Sandbox::DocScan::Request::CheckReportsBuilder

Inherits:
Object
  • Object
show all
Defined in:
lib/yoti_sandbox/doc_scan/request/check_reports.rb

Instance Method Summary collapse

Constructor Details

#initializeCheckReportsBuilder

Returns a new instance of CheckReportsBuilder.



58
59
60
61
62
63
# File 'lib/yoti_sandbox/doc_scan/request/check_reports.rb', line 58

def initialize
  @liveness_checks = []
  @document_text_data_checks = []
  @document_authenticity_checks = []
  @document_face_match_checks = []
end

Instance Method Details

#buildCheckReports

Returns:



123
124
125
126
127
128
129
130
131
# File 'lib/yoti_sandbox/doc_scan/request/check_reports.rb', line 123

def build
  CheckReports.new(
    @document_text_data_checks,
    @document_authenticity_checks,
    @liveness_checks,
    @document_face_match_checks,
    @async_report_delay
  )
end

#with_async_report_delay(async_report_delay) ⇒ self

Parameters:

  • async_report_delay (Integer)

Returns:

  • (self)


114
115
116
117
118
# File 'lib/yoti_sandbox/doc_scan/request/check_reports.rb', line 114

def with_async_report_delay(async_report_delay)
  Validation.assert_is_a(Integer, async_report_delay, 'async_report_delay')
  @async_report_delay = async_report_delay
  self
end

#with_document_authenticity_check(document_authenticity_check) ⇒ self

Parameters:

Returns:

  • (self)


92
93
94
95
96
# File 'lib/yoti_sandbox/doc_scan/request/check_reports.rb', line 92

def with_document_authenticity_check(document_authenticity_check)
  Validation.assert_is_a(DocumentAuthenticityCheck, document_authenticity_check, 'document_authenticity_check')
  @document_authenticity_checks << document_authenticity_check
  self
end

#with_document_face_match_check(document_face_match_check) ⇒ self

Parameters:

Returns:

  • (self)


103
104
105
106
107
# File 'lib/yoti_sandbox/doc_scan/request/check_reports.rb', line 103

def with_document_face_match_check(document_face_match_check)
  Validation.assert_is_a(DocumentFaceMatchCheck, document_face_match_check, 'document_face_match_check')
  @document_face_match_checks << document_face_match_check
  self
end

#with_document_text_data_check(document_text_data_check) ⇒ self

Parameters:

Returns:

  • (self)


81
82
83
84
85
# File 'lib/yoti_sandbox/doc_scan/request/check_reports.rb', line 81

def with_document_text_data_check(document_text_data_check)
  Validation.assert_is_a(DocumentTextDataCheck, document_text_data_check, 'document_text_data_check')
  @document_text_data_checks << document_text_data_check
  self
end

#with_liveness_check(liveness_check) ⇒ self

Parameters:

Returns:

  • (self)


70
71
72
73
74
# File 'lib/yoti_sandbox/doc_scan/request/check_reports.rb', line 70

def with_liveness_check(liveness_check)
  Validation.assert_is_a(LivenessCheck, liveness_check, 'liveness_check')
  @liveness_checks << liveness_check
  self
end