Class: FlexOps::Resources::Reports

Inherits:
Object
  • Object
show all
Defined in:
lib/flexops/resources/reports.rb

Instance Method Summary collapse

Constructor Details

#initialize(http, ws_id_proc) ⇒ Reports

Returns a new instance of Reports.



14
15
16
17
# File 'lib/flexops/resources/reports.rb', line 14

def initialize(http, ws_id_proc)
  @http = http
  @ws_id = ws_id_proc
end

Instance Method Details

#create(request) ⇒ Object



27
28
29
# File 'lib/flexops/resources/reports.rb', line 27

def create(request)
  @http.post("#{ws_path}/report-schedules/", body: request)
end

#delete(id) ⇒ Object



35
36
37
# File 'lib/flexops/resources/reports.rb', line 35

def delete(id)
  @http.delete("#{ws_path}/report-schedules/#{id}")
end

#get(id) ⇒ Object



23
24
25
# File 'lib/flexops/resources/reports.rb', line 23

def get(id)
  @http.get("#{ws_path}/report-schedules/#{id}")
end

#listObject



19
20
21
# File 'lib/flexops/resources/reports.rb', line 19

def list
  @http.get("#{ws_path}/report-schedules/")
end

#update(id, request) ⇒ Object



31
32
33
# File 'lib/flexops/resources/reports.rb', line 31

def update(id, request)
  @http.put("#{ws_path}/report-schedules/#{id}", body: request)
end