Class: ReactorSDK::Endpoints::Profiles

Inherits:
BaseEndpoint show all
Defined in:
lib/reactor_sdk/endpoints/profiles.rb

Instance Method Summary collapse

Methods inherited from BaseEndpoint

#initialize

Constructor Details

This class inherits a constructor from ReactorSDK::Endpoints::BaseEndpoint

Instance Method Details

#currentObject



6
7
8
9
10
11
# File 'lib/reactor_sdk/endpoints/profiles.rb', line 6

def current
  response = @connection.get('/profile')
  data = response.fetch('data').dup
  data['meta'] = response.fetch('meta', {}).merge(data.fetch('meta', {}))
  @parser.parse(data, Resources::Profile, response: response)
end