lib/yoti/doc_scan/session/create/session_specification.rb in yoti-1.8.0 vs lib/yoti/doc_scan/session/create/session_specification.rb in yoti-1.9.0

- old
+ new

@@ -12,20 +12,22 @@ # @param [NotificationConfig] notifications # @param [Array<RequestedCheck>] requested_checks # @param [Array<RequestedTask>] requested_tasks # @param [SdkConfig] sdk_config # @param [Array<RequiredDocument>] required_documents + # @param [Boolean] block_biometric_consent # def initialize( client_session_token_ttl, resources_ttl, user_tracking_id, notifications, requested_checks, requested_tasks, sdk_config, - required_documents + required_documents, + block_biometric_consent = nil ) Validation.assert_is_a(Integer, client_session_token_ttl, 'client_session_token_ttl', true) @client_session_token_ttl = client_session_token_ttl Validation.assert_is_a(Integer, resources_ttl, 'resources_ttl', true) @@ -46,10 +48,12 @@ Validation.assert_is_a(SdkConfig, sdk_config, 'sdk_config', true) @sdk_config = sdk_config Validation.assert_is_a(Array, required_documents, 'required_documents', true) @required_documents = required_documents + + @block_biometric_consent = block_biometric_consent end def to_json(*_args) as_json.to_json end @@ -61,11 +65,12 @@ user_tracking_id: @user_tracking_id, notifications: @notifications, requested_checks: @requested_checks.map(&:as_json), requested_tasks: @requested_tasks.map(&:as_json), sdk_config: @sdk_config, - required_documents: @required_documents.map(&:as_json) + required_documents: @required_documents.map(&:as_json), + block_biometric_consent: @block_biometric_consent }.compact end # # @return [SessionSpecificationBuilder] @@ -180,10 +185,22 @@ @required_documents.push(required_document) self end # + # Whether or not to block the collection of biometric consent + # + # @param [Boolean] block_biometric_consent + # + # @return [self] + # + def with_block_biometric_consent(block_biometric_consent) + @block_biometric_consent = block_biometric_consent + self + end + + # # @return [SessionSpecification] # def build SessionSpecification.new( @client_session_token_ttl, @@ -191,10 +208,11 @@ @user_tracking_id, @notifications, @requested_checks, @requested_tasks, @sdk_config, - @required_documents + @required_documents, + @block_biometric_consent ) end end end end