Class: CheckoutSdk::Identities::FaceAuthentication::FaceAuthenticationClient

Inherits:
Client
  • Object
show all
Defined in:
lib/checkout_sdk/identities/face_authentication/face_authentication_client.rb

Overview

Client for the Identities — Face Authentication API.

Instance Attribute Summary

Attributes inherited from Client

#api_client, #authorization_type, #configuration

Instance Method Summary collapse

Constructor Details

#initialize(api_client, configuration) ⇒ FaceAuthenticationClient

Returns a new instance of FaceAuthenticationClient.

Parameters:



16
17
18
# File 'lib/checkout_sdk/identities/face_authentication/face_authentication_client.rb', line 16

def initialize(api_client, configuration)
  super(api_client, configuration, CheckoutSdk::AuthorizationType::SECRET_KEY_OR_OAUTH)
end

Instance Method Details

#anonymize_face_authentication(face_authentication_id) ⇒ Object

Parameters:

  • face_authentication_id (String)


32
33
34
35
36
37
# File 'lib/checkout_sdk/identities/face_authentication/face_authentication_client.rb', line 32

def anonymize_face_authentication(face_authentication_id)
  api_client.invoke_post(
    build_path(FACE_AUTHENTICATIONS, face_authentication_id, ANONYMIZE),
    sdk_authorization
  )
end

#create_face_authentication(request) ⇒ Object

Parameters:



21
22
23
# File 'lib/checkout_sdk/identities/face_authentication/face_authentication_client.rb', line 21

def create_face_authentication(request)
  api_client.invoke_post(FACE_AUTHENTICATIONS, sdk_authorization, request)
end

#create_face_authentication_attempt(face_authentication_id, attempt_request) ⇒ Object

Create a new attempt for an existing face authentication.

Parameters:



42
43
44
45
46
47
48
# File 'lib/checkout_sdk/identities/face_authentication/face_authentication_client.rb', line 42

def create_face_authentication_attempt(face_authentication_id, attempt_request)
  api_client.invoke_post(
    build_path(FACE_AUTHENTICATIONS, face_authentication_id, ATTEMPTS),
    sdk_authorization,
    attempt_request
  )
end

#get_face_authentication(face_authentication_id) ⇒ Object

Parameters:

  • face_authentication_id (String)


26
27
28
29
# File 'lib/checkout_sdk/identities/face_authentication/face_authentication_client.rb', line 26

def get_face_authentication(face_authentication_id)
  api_client.invoke_get(build_path(FACE_AUTHENTICATIONS, face_authentication_id),
                        sdk_authorization)
end

#get_face_authentication_attempt(face_authentication_id, attempt_id) ⇒ Object

Parameters:

  • face_authentication_id (String)
  • attempt_id (String)


60
61
62
63
64
65
# File 'lib/checkout_sdk/identities/face_authentication/face_authentication_client.rb', line 60

def get_face_authentication_attempt(face_authentication_id, attempt_id)
  api_client.invoke_get(
    build_path(FACE_AUTHENTICATIONS, face_authentication_id, ATTEMPTS, attempt_id),
    sdk_authorization
  )
end

#get_face_authentication_attempt_assets(face_authentication_id, attempt_id, query = nil) ⇒ Object

Retrieve the assets (face images and videos) captured during a face authentication attempt.

Parameters:

  • face_authentication_id (String)
  • attempt_id (String)
  • query (Hash, nil) (defaults to: nil)

    pagination query parameters; supports :skip (Integer, default: 0) and :limit (Integer, default: 10)



72
73
74
75
76
77
78
# File 'lib/checkout_sdk/identities/face_authentication/face_authentication_client.rb', line 72

def get_face_authentication_attempt_assets(face_authentication_id, attempt_id, query = nil)
  api_client.invoke_get(
    build_path(FACE_AUTHENTICATIONS, face_authentication_id, ATTEMPTS, attempt_id, ASSETS),
    sdk_authorization,
    query
  )
end

#get_face_authentication_attempts(face_authentication_id) ⇒ Object

Parameters:

  • face_authentication_id (String)


51
52
53
54
55
56
# File 'lib/checkout_sdk/identities/face_authentication/face_authentication_client.rb', line 51

def get_face_authentication_attempts(face_authentication_id)
  api_client.invoke_get(
    build_path(FACE_AUTHENTICATIONS, face_authentication_id, ATTEMPTS),
    sdk_authorization
  )
end