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:



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

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)


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

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:



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

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:



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

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)


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

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)


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

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_attempts(face_authentication_id) ⇒ Object

Parameters:

  • face_authentication_id (String)


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

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