Class: KYCAID::LivenessCheck

Inherits:
Response
  • Object
show all
Extended by:
Client
Defined in:
lib/kycid-gem/liveness_check.rb

Overview

Liveness is wrapper for KYCAID endpoints to perform liveness check.

Class Method Summary collapse

Methods included from Client

conn, file_payload, file_post, file_put, get, multipart_conn, patch, post, sandbox?

Methods inherited from Response

#handle_error, #initialize, respond

Constructor Details

This class inherits a constructor from KYCAID::Response

Class Method Details

.create(params) ⇒ Object

Gets form url based on the template prepared in dashboard

  • :applicant_id - mandatory The applicant’s unique identificator that received in response of create an applicant. It's supposed to use when need to create verification for exists applicant.
  • :external_applicant_id -optional Custom identifier of the applicant, which is intended for binding the applicant in the customer and KYCAID systems.
  • :redirect_url -mandatory The customer site URL, where applicant will be redirected after completing filling the form.

Returns Response object, containing

  • form_id - mandatory The form’s unique identificator.
  • form_url - mandatory One-time URL to the verification form. This URL will be available until applicant will not complete the form.
  • verificiation_id - mandatory The verification’s unique identificator.


15
16
17
18
19
20
21
22
# File 'lib/kycid-gem/liveness_check.rb', line 15

def self.create(params)

  protected_params = params.slice(:applicant_id, :external_applicant_id, :redirect_url)
  form_id = params[:form_id]

  respond(post("/forms/#{form_id}/urls", protected_params))

end