Class: HubriseApp::Refresher::User

Inherits:
Base
  • Object
show all
Defined in:
app/lib/hubrise_app/refresher/user.rb

Constant Summary

Constants inherited from Base

Base::REFRESH_THRESHOLD

Class Method Summary collapse

Methods inherited from Base

from_api_client, from_event, run

Class Method Details

.attributes_from_api_call(_resource, api_client) ⇒ Object



6
7
8
9
10
11
12
13
14
15
# File 'app/lib/hubrise_app/refresher/user.rb', line 6

def attributes_from_api_call(_resource, api_client)
  api_data = api_client.get_user.data
  {
    access_token: api_client.access_token,
    email: api_data["email"],
    first_name: api_data["first_name"],
    last_name: api_data["last_name"],
    locales: api_data["locales"],
  }
end