Class: Yoti::Sandbox::Profile::Client
- Inherits:
-
Object
- Object
- Yoti::Sandbox::Profile::Client
- Defined in:
- lib/yoti_sandbox/profile/client.rb
Overview
Client for the profile sandbox service
Instance Method Summary collapse
-
#initialize(base_url: nil) ⇒ Client
constructor
A new instance of Client.
- #setup_sharing_profile(token_request) ⇒ String
Constructor Details
Instance Method Details
#setup_sharing_profile(token_request) ⇒ String
22 23 24 25 26 27 28 29 30 31 32 |
# File 'lib/yoti_sandbox/profile/client.rb', line 22 def setup_sharing_profile(token_request) request = Yoti::Request .builder .with_base_url(@base_url) .with_endpoint("apps/#{Yoti.configuration.client_sdk_id}/tokens") .with_http_method('POST') .with_payload(token_request) .build JSON.parse(request.execute.body)['token'] end |