Class: Yoti::Sandbox::DocScan::Request::CheckReportsBuilder
- Inherits:
-
Object
- Object
- Yoti::Sandbox::DocScan::Request::CheckReportsBuilder
- Defined in:
- lib/yoti_sandbox/doc_scan/request/check_reports.rb
Instance Method Summary collapse
- #build ⇒ CheckReports
-
#initialize ⇒ CheckReportsBuilder
constructor
A new instance of CheckReportsBuilder.
- #with_async_report_delay(async_report_delay) ⇒ self
- #with_document_authenticity_check(document_authenticity_check) ⇒ self
- #with_document_face_match_check(document_face_match_check) ⇒ self
- #with_document_text_data_check(document_text_data_check) ⇒ self
- #with_id_document_comparison_check(id_document_comparison_check) ⇒ self
- #with_liveness_check(liveness_check) ⇒ self
- #with_supplementary_document_text_data_check(supplementary_document_text_data_check) ⇒ self
Constructor Details
#initialize ⇒ CheckReportsBuilder
Returns a new instance of CheckReportsBuilder.
74 75 76 77 78 79 80 81 |
# File 'lib/yoti_sandbox/doc_scan/request/check_reports.rb', line 74 def initialize @liveness_checks = [] @document_text_data_checks = [] @document_authenticity_checks = [] @document_face_match_checks = [] @id_document_comparison_checks = [] @supplementary_document_text_data_checks = [] end |
Instance Method Details
#build ⇒ CheckReports
167 168 169 170 171 172 173 174 175 176 177 |
# File 'lib/yoti_sandbox/doc_scan/request/check_reports.rb', line 167 def build CheckReports.new( @document_text_data_checks, @document_authenticity_checks, @liveness_checks, @document_face_match_checks, @async_report_delay, @id_document_comparison_checks, @supplementary_document_text_data_checks ) end |
#with_async_report_delay(async_report_delay) ⇒ self
132 133 134 135 136 |
# File 'lib/yoti_sandbox/doc_scan/request/check_reports.rb', line 132 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
110 111 112 113 114 |
# File 'lib/yoti_sandbox/doc_scan/request/check_reports.rb', line 110 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
121 122 123 124 125 |
# File 'lib/yoti_sandbox/doc_scan/request/check_reports.rb', line 121 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
99 100 101 102 103 |
# File 'lib/yoti_sandbox/doc_scan/request/check_reports.rb', line 99 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_id_document_comparison_check(id_document_comparison_check) ⇒ self
143 144 145 146 147 |
# File 'lib/yoti_sandbox/doc_scan/request/check_reports.rb', line 143 def with_id_document_comparison_check(id_document_comparison_check) Validation.assert_is_a(IdDocumentComparisonCheck, id_document_comparison_check, 'id_document_comparison_check') @id_document_comparison_checks << id_document_comparison_check self end |
#with_liveness_check(liveness_check) ⇒ self
88 89 90 91 92 |
# File 'lib/yoti_sandbox/doc_scan/request/check_reports.rb', line 88 def with_liveness_check(liveness_check) Validation.assert_is_a(LivenessCheck, liveness_check, 'liveness_check') @liveness_checks << liveness_check self end |
#with_supplementary_document_text_data_check(supplementary_document_text_data_check) ⇒ self
154 155 156 157 158 159 160 161 162 |
# File 'lib/yoti_sandbox/doc_scan/request/check_reports.rb', line 154 def with_supplementary_document_text_data_check(supplementary_document_text_data_check) Validation.assert_is_a( SupplementaryDocumentTextDataCheck, supplementary_document_text_data_check, 'supplementary_document_text_data_check' ) @supplementary_document_text_data_checks << supplementary_document_text_data_check self end |