Sha256: 6d3e16a93af5021f6c0c275f55ff556aaba3a5929df17a8530cbb6a7ca4cb745

Contents?: true

Size: 396 Bytes

Versions: 4

Compression:

Stored size: 396 Bytes

Contents

# frozen_string_literal: true

module Veriff
  module Webhooks
    class Decision < Model
      extend Webhook

      def initialize(body)
        super(Parser.call(body, :json)[:verification])
      end

      def person
        @person ||= OpenStruct.new(@data_hash[:person])
      end

      def document
        @document ||= OpenStruct.new(@data_hash[:document])
      end
    end
  end
end

Version data entries

4 entries across 4 versions & 1 rubygems

Version Path
veriff-0.2.2 lib/veriff/webhooks/decision.rb
veriff-0.2.1 lib/veriff/webhooks/decision.rb
veriff-0.2.0 lib/veriff/webhooks/decision.rb
veriff-0.1.0 lib/veriff/webhooks/decision.rb