Class: Jumio::Client
- Inherits:
-
Object
- Object
- Jumio::Client
- Defined in:
- lib/jumio/client.rb
Overview
configures an http client based on passed in credentials, or uses the Jumio.api configuration. The instance will expose the methods below that return lambdas. This is to maintain pairity with the existing module interface
Instance Attribute Summary collapse
-
#client ⇒ Object
readonly
Returns the value of attribute client.
Instance Method Summary collapse
- #get_scan_details ⇒ Object
- #get_scan_status ⇒ Object
-
#initialize(token: nil, secret: nil, base_url: nil) ⇒ Client
constructor
A new instance of Client.
- #initiate_verification ⇒ Object
Constructor Details
#initialize(token: nil, secret: nil, base_url: nil) ⇒ Client
Returns a new instance of Client.
14 15 16 17 18 19 20 |
# File 'lib/jumio/client.rb', line 14 def initialize(token: nil, secret: nil, base_url: nil) @client = Container.resolve('http_client').new( token: token, secret: secret, base_url: base_url ) end |
Instance Attribute Details
#client ⇒ Object (readonly)
Returns the value of attribute client.
9 10 11 |
# File 'lib/jumio/client.rb', line 9 def client @client end |
Instance Method Details
#get_scan_details ⇒ Object
22 23 24 25 26 27 |
# File 'lib/jumio/client.rb', line 22 def get_scan_details ->(scan_reference) { Container.resolve('get_scan_details'). call(scan_reference, client) } end |
#get_scan_status ⇒ Object
29 30 31 32 33 34 |
# File 'lib/jumio/client.rb', line 29 def get_scan_status ->(scan_reference) { Container.resolve('get_scan_status'). call(scan_reference, client) } end |
#initiate_verification ⇒ Object
36 37 38 39 40 41 |
# File 'lib/jumio/client.rb', line 36 def initiate_verification ->(verification_params) { Container.resolve('initiate_verification'). call(verification_params, client) } end |