Method: ClientSuccess::Client#get_details
- Defined in:
- lib/client_success/client.rb
#get_details(client_id:, connection:) ⇒ Object
29 30 31 32 33 34 35 36 37 38 39 |
# File 'lib/client_success/client.rb', line 29 def get_details(client_id:, connection:) response = connection.get( "/v1/clients/#{client_id}") payload = response.body DomainModel::Client.new( payload.deep_transform_keys(&:underscore)) rescue Connection::NotFound raise NotFound, "client with id '#{client_id}' not found" end |