Class: VC::Report
- Inherits:
- 
      Object
      
        - Object
- VC::Report
 
- Defined in:
- lib/models/report.rb
Direct Known Subclasses
Instance Attribute Summary collapse
- 
  
    
      #billable_units  ⇒ Object 
    
    
  
  
  
  
    
    
  
  
  
  
  
  
    Returns the value of attribute billable_units. 
- 
  
    
      #from  ⇒ Object 
    
    
  
  
  
  
    
    
  
  
  
  
  
  
    Returns the value of attribute from. 
- 
  
    
      #to  ⇒ Object 
    
    
  
  
  
  
    
    
  
  
  
  
  
  
    Returns the value of attribute to. 
Instance Method Summary collapse
Instance Attribute Details
#billable_units ⇒ Object
Returns the value of attribute billable_units.
| 3 4 5 | # File 'lib/models/report.rb', line 3 def billable_units @billable_units end | 
#from ⇒ Object
Returns the value of attribute from.
| 3 4 5 | # File 'lib/models/report.rb', line 3 def from @from end | 
#to ⇒ Object
Returns the value of attribute to.
| 3 4 5 | # File 'lib/models/report.rb', line 3 def to @to end | 
Instance Method Details
#fetch ⇒ Object
| 9 10 11 12 13 | # File 'lib/models/report.rb', line 9 def fetch VC.handle_req do RestClient.get([VC.url, resource].join, {:params => {:from => from.utc.to_s, :to => to.utc.to_s}}) end end | 
#report ⇒ Object
| 23 24 25 | # File 'lib/models/report.rb', line 23 def report @report ||= fetch end | 
#total ⇒ Object
| 19 20 21 | # File 'lib/models/report.rb', line 19 def total report["total"] end |