Class: HubriseApp::Refresher::Location

Inherits:
Base
  • Object
show all
Defined in:
app/lib/hubrise_app/refresher/location.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
# File 'app/lib/hubrise_app/refresher/location.rb', line 6

def attributes_from_api_call(resource, api_client)
  {
    api_data: cleanup_api_data(api_client.get_location(resource.hr_id).data),
  }
end

.attributes_from_event(event_params, _api_client) ⇒ Object



12
13
14
15
16
# File 'app/lib/hubrise_app/refresher/location.rb', line 12

def attributes_from_event(event_params, _api_client)
  {
    api_data: cleanup_api_data(event_params["new_state"]),
  }
end