Method: Morpheus::PowerSchedulesInterface#update

Defined in:
lib/morpheus/api/power_schedules_interface.rb

#update(id, options) ⇒ Object



28
29
30
31
32
33
34
# File 'lib/morpheus/api/power_schedules_interface.rb', line 28

def update(id, options)
  url = "#{@base_url}/api/power-schedules/#{id}"
  headers = { :authorization => "Bearer #{@access_token}", 'Content-Type' => 'application/json' }
  payload = options
  opts = {method: :put, url: url, timeout: 10, headers: headers, payload: payload.to_json}
  execute(opts)
end