Class: Yoti::Sandbox::DocScan::Client
- Inherits:
-
Object
- Object
- Yoti::Sandbox::DocScan::Client
- Defined in:
- lib/yoti_sandbox/doc_scan/client.rb
Overview
Client for the Doc Scan sandbox service
Instance Method Summary collapse
- #configure_application_response(response_config) ⇒ Object
- #configure_session_response(session_id, response_config) ⇒ Object
-
#initialize(base_url: nil) ⇒ Client
constructor
A new instance of Client.
Constructor Details
Instance Method Details
#configure_application_response(response_config) ⇒ Object
41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 |
# File 'lib/yoti_sandbox/doc_scan/client.rb', line 41 def configure_application_response(response_config) request = Yoti::Request .builder .with_http_method('PUT') .with_base_url(@base_url) .with_endpoint("apps/#{Yoti.configuration.client_sdk_id}/response-config") .with_payload(response_config) .build begin request.execute rescue Yoti::RequestError => e raise Yoti::Sandbox::DocScan::Error.wrap(e) end end |
#configure_session_response(session_id, response_config) ⇒ Object
21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 |
# File 'lib/yoti_sandbox/doc_scan/client.rb', line 21 def configure_session_response(session_id, response_config) request = Yoti::Request .builder .with_http_method('PUT') .with_base_url(@base_url) .with_endpoint("sessions/#{session_id}/response-config") .with_query_param('sdkId', Yoti.configuration.client_sdk_id) .with_payload(response_config) .build begin request.execute rescue Yoti::RequestError => e raise Yoti::Sandbox::DocScan::Error.wrap(e) end end |