class Yoti::DocScan::Session::Create::SdkConfigBuilder
Builder to assist in the creation of {SdkConfig}.
Public Class Methods
# File lib/yoti/doc_scan/session/create/sdk_config.rb, line 82 def initialize @topics = [] end
Public Instance Methods
@return [SdkConfig]
# File lib/yoti/doc_scan/session/create/sdk_config.rb, line 205 def build SdkConfig.new( @allowed_capture_methods, @primary_colour, @secondary_colour, @font_colour, @locale, @preset_issuing_country, @success_url, @error_url ) end
Sets the allowed capture method
@param [String] allowed_capture_methods
@return [self]
# File lib/yoti/doc_scan/session/create/sdk_config.rb, line 111 def with_allowed_capture_methods(allowed_capture_methods) @allowed_capture_methods = allowed_capture_methods self end
Sets the allowed capture method to “CAMERA”
@return [self]
# File lib/yoti/doc_scan/session/create/sdk_config.rb, line 91 def with_allows_camera with_allowed_capture_methods(Constants::CAMERA) end
Sets the allowed capture method to “CAMERA_AND_UPLOAD”
@return [self]
# File lib/yoti/doc_scan/session/create/sdk_config.rb, line 100 def with_allows_camera_and_upload with_allowed_capture_methods(Constants::CAMERA_AND_UPLOAD) end
Sets the error URL for the redirect that follows the web/native client uploading documents unsuccessfully
@param [String] error_url
@return [self]
# File lib/yoti/doc_scan/session/create/sdk_config.rb, line 197 def with_error_url(error_url) @error_url = error_url self end
Sets the font colour to be used by the web/native client (used on the button)
@param [String] font_colour
@return [self]
# File lib/yoti/doc_scan/session/create/sdk_config.rb, line 147 def with_font_colour(font_colour) @font_colour = font_colour self end
Sets the locale on the builder
@param [String] locale
@return [self]
# File lib/yoti/doc_scan/session/create/sdk_config.rb, line 159 def with_locale(locale) @locale = locale self end
Sets the preset issuing country on the builder
@param [String] preset_issuing_country
@return [self]
# File lib/yoti/doc_scan/session/create/sdk_config.rb, line 171 def with_preset_issuing_country(preset_issuing_country) @preset_issuing_country = preset_issuing_country self end
Sets the primary colour to be used by the web/native client
@param [String] primary_colour
@return [self]
# File lib/yoti/doc_scan/session/create/sdk_config.rb, line 123 def with_primary_colour(primary_colour) @primary_colour = primary_colour self end
Sets the secondary colour to be used by the web/native client (used on the button)
@param [String] secondary_colour
@return [self]
# File lib/yoti/doc_scan/session/create/sdk_config.rb, line 135 def with_secondary_colour(secondary_colour) @secondary_colour = secondary_colour self end
Sets the success URL for the redirect that follows the web/native client uploading documents successfully
@param [String] success_url
@return [self]
# File lib/yoti/doc_scan/session/create/sdk_config.rb, line 184 def with_success_url(success_url) @success_url = success_url self end