class Veriff::Session
Public Class Methods
create(params = {})
click to toggle source
# File lib/veriff/session.rb, line 6 def create(params = {}) params[:features] ||= [:selfid] params[:timestamp] ||= Time.now.utc.iso8601(3) verification = Veriff.post( '/sessions', body: { verification: params }.to_json ).parsed_response[:verification] new(verification) end
Public Instance Methods
attempts()
click to toggle source
# File lib/veriff/session.rb, line 32 def attempts @attempts ||= Veriff.get("/sessions/#{id}/attempts", signature: id) .parsed_response[:verifications].map do |attempt| Attempt.new(attempt) end end
decision()
click to toggle source
# File lib/veriff/session.rb, line 39 def decision @decision ||= Decision.new( Veriff.get("/sessions/#{id}/decision", signature: id) .parsed_response[:verification] ) end
person()
click to toggle source
# File lib/veriff/session.rb, line 20 def person @person ||= Person.new(Veriff.get("/sessions/#{id}/person", signature: id) .parsed_response[:person]) end
timestamps()
click to toggle source
# File lib/veriff/session.rb, line 25 def timestamps @timestamps ||= Veriff.get("/sessions/#{id}/timestamps", signature: id) .parsed_response[:timestamps].map do |timestamp| Timestamp.new(timestamp) end end