Class: Veriff::Session
Class Method Summary
collapse
Instance Method Summary
collapse
#images, #media, #videos
Methods inherited from Model
api_collection_name, #initialize, #method_missing, #respond_to_missing?
Constructor Details
This class inherits a constructor from Veriff::Model
Dynamic Method Handling
This class handles dynamic methods through the method_missing method
in the class Veriff::Model
Class Method Details
.create(params = {}) ⇒ Object
6
7
8
9
10
11
12
13
14
15
|
# 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
|
Instance Method Details
#attempts ⇒ Object
32
33
34
35
36
37
|
# 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 ⇒ Object
39
40
41
42
43
44
|
# File 'lib/veriff/session.rb', line 39
def decision
@decision ||= Decision.new(
Veriff.get("/sessions/#{id}/decision", signature: id)
.parsed_response[:verification]
)
end
|
#person ⇒ Object
20
21
22
23
|
# File 'lib/veriff/session.rb', line 20
def person
@person ||= Person.new(Veriff.get("/sessions/#{id}/person", signature: id)
.parsed_response[:person])
end
|
#timestamps ⇒ Object
25
26
27
28
29
30
|
# 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
|
#watchlist_screening ⇒ Object
46
47
48
49
50
|
# File 'lib/veriff/session.rb', line 46
def watchlist_screening
@watchlist_screening ||= WatchlistScreening.new(
Veriff.get("/sessions/#{id}/watchlist-screening", signature: id).parsed_response[:data]
)
end
|