Sha256: 33235d40be40b6e5cae7755513db75d055c188033b8ec041022ffa7b0d3a41c7

Contents?: true

Size: 936 Bytes

Versions: 5

Compression:

Stored size: 936 Bytes

Contents

# frozen_string_literal: true

module Yoti
  module DocScan
    module Session
      module Retrieve
        class RecommendationResponse
          # @return [String]
          attr_reader :value

          # @return [String]
          attr_reader :reason

          # @return [String]
          attr_reader :recovery_suggestion

          #
          # @param [Hash] recommendation
          #
          def initialize(recommendation)
            Validation.assert_is_a(String, recommendation['value'], 'value', true)
            @value = recommendation['value']

            Validation.assert_is_a(String, recommendation['reason'], 'reason', true)
            @reason = recommendation['reason']

            Validation.assert_is_a(String, recommendation['recovery_suggestion'], 'recovery_suggestion', true)
            @recovery_suggestion = recommendation['recovery_suggestion']
          end
        end
      end
    end
  end
end

Version data entries

5 entries across 5 versions & 1 rubygems

Version Path
yoti-1.10.0 lib/yoti/doc_scan/session/retrieve/recommendation_response.rb
yoti-1.9.0 lib/yoti/doc_scan/session/retrieve/recommendation_response.rb
yoti-1.8.0 lib/yoti/doc_scan/session/retrieve/recommendation_response.rb
yoti-1.7.1 lib/yoti/doc_scan/session/retrieve/recommendation_response.rb
yoti-1.7.0 lib/yoti/doc_scan/session/retrieve/recommendation_response.rb