Class: CloudControl::API::Report

Inherits:
Core
  • Object
show all
Defined in:
lib/cloudcontrol/api/report.rb

Instance Attribute Summary

Attributes inherited from Core

#client

Instance Method Summary collapse

Methods inherited from Core

#endpoint, #get, #get_simple, #initialize, #log, #org_endpoint, #org_id, #perform, #post, #post_simple, #query_params, #request_query_string, #request_simple_body, #request_xml_body, #simple_params, #single, #xml_params

Constructor Details

This class inherits a constructor from CloudControl::API::Core

Instance Method Details

#auditlog(start_date, end_date) ⇒ Object



3
4
5
6
7
8
# File 'lib/cloudcontrol/api/report.rb', line 3

def auditlog(start_date, end_date)
    start = start_date.strftime("%Y-%m-%d")
    stop = end_date.strftime("%Y-%m-%d")
    org_endpoint "/auditlog?startDate=#{start}&endDate=#{stop}"
    get_simple
end

#detailed_usage(start_date, end_date) ⇒ Object



17
18
19
20
21
22
# File 'lib/cloudcontrol/api/report.rb', line 17

def detailed_usage(start_date, end_date)
    start = start_date.strftime("%Y-%m-%d")
    stop = end_date.strftime("%Y-%m-%d")
    org_endpoint "/report/usageDetailed?startDate=#{start}&endDate=#{stop}"
    get_simple
end

#summary_usage(start_date, end_date) ⇒ Object



10
11
12
13
14
15
# File 'lib/cloudcontrol/api/report.rb', line 10

def summary_usage(start_date, end_date)
    start = start_date.strftime("%Y-%m-%d")
    stop = end_date.strftime("%Y-%m-%d")
    org_endpoint "/report/usage?startDate=#{start}&endDate=#{stop}"
    get_simple
end