Class: ActiveCollab::TimeRecord
- Inherits:
-
Object
- Object
- ActiveCollab::TimeRecord
- Defined in:
- lib/active_collab/time_record.rb
Instance Attribute Summary collapse
-
#billable_status ⇒ Object
Returns the value of attribute billable_status.
-
#created_by ⇒ Object
Returns the value of attribute created_by.
-
#created_on ⇒ Object
Returns the value of attribute created_on.
-
#id ⇒ Object
Returns the value of attribute id.
-
#job_type_id ⇒ Object
Returns the value of attribute job_type_id.
-
#parent_class ⇒ Object
Returns the value of attribute parent_class.
-
#parent_id ⇒ Object
Returns the value of attribute parent_id.
-
#permalink ⇒ Object
Returns the value of attribute permalink.
-
#permissions ⇒ Object
Returns the value of attribute permissions.
-
#project_id ⇒ Object
Returns the value of attribute project_id.
-
#record_date ⇒ Object
Returns the value of attribute record_date.
-
#state ⇒ Object
Returns the value of attribute state.
-
#summary ⇒ Object
Returns the value of attribute summary.
-
#urls ⇒ Object
Returns the value of attribute urls.
-
#user_id ⇒ Object
Returns the value of attribute user_id.
-
#value ⇒ Object
Returns the value of attribute value.
Class Method Summary collapse
Instance Attribute Details
#billable_status ⇒ Object
Returns the value of attribute billable_status.
3 4 5 |
# File 'lib/active_collab/time_record.rb', line 3 def billable_status @billable_status end |
#created_by ⇒ Object
Returns the value of attribute created_by.
3 4 5 |
# File 'lib/active_collab/time_record.rb', line 3 def created_by @created_by end |
#created_on ⇒ Object
Returns the value of attribute created_on.
3 4 5 |
# File 'lib/active_collab/time_record.rb', line 3 def created_on @created_on end |
#id ⇒ Object
Returns the value of attribute id.
3 4 5 |
# File 'lib/active_collab/time_record.rb', line 3 def id @id end |
#job_type_id ⇒ Object
Returns the value of attribute job_type_id.
3 4 5 |
# File 'lib/active_collab/time_record.rb', line 3 def job_type_id @job_type_id end |
#parent_class ⇒ Object
Returns the value of attribute parent_class.
3 4 5 |
# File 'lib/active_collab/time_record.rb', line 3 def parent_class @parent_class end |
#parent_id ⇒ Object
Returns the value of attribute parent_id.
3 4 5 |
# File 'lib/active_collab/time_record.rb', line 3 def parent_id @parent_id end |
#permalink ⇒ Object
Returns the value of attribute permalink.
3 4 5 |
# File 'lib/active_collab/time_record.rb', line 3 def permalink @permalink end |
#permissions ⇒ Object
Returns the value of attribute permissions.
3 4 5 |
# File 'lib/active_collab/time_record.rb', line 3 def @permissions end |
#project_id ⇒ Object
Returns the value of attribute project_id.
3 4 5 |
# File 'lib/active_collab/time_record.rb', line 3 def project_id @project_id end |
#record_date ⇒ Object
Returns the value of attribute record_date.
3 4 5 |
# File 'lib/active_collab/time_record.rb', line 3 def record_date @record_date end |
#state ⇒ Object
Returns the value of attribute state.
3 4 5 |
# File 'lib/active_collab/time_record.rb', line 3 def state @state end |
#summary ⇒ Object
Returns the value of attribute summary.
3 4 5 |
# File 'lib/active_collab/time_record.rb', line 3 def summary @summary end |
#urls ⇒ Object
Returns the value of attribute urls.
3 4 5 |
# File 'lib/active_collab/time_record.rb', line 3 def urls @urls end |
#user_id ⇒ Object
Returns the value of attribute user_id.
3 4 5 |
# File 'lib/active_collab/time_record.rb', line 3 def user_id @user_id end |
#value ⇒ Object
Returns the value of attribute value.
3 4 5 |
# File 'lib/active_collab/time_record.rb', line 3 def value @value end |
Class Method Details
.from_hash(hash) ⇒ Object
7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 |
# File 'lib/active_collab/time_record.rb', line 7 def self.from_hash(hash) time_record = ActiveCollab::TimeRecord.new time_record.id = hash["id"].to_i time_record.permalink = hash["permalink"] time_record.urls = hash["urls"] time_record. = hash["permissions"] time_record.created_on = hash["created_on"] time_record.created_by = hash["created_by"] time_record.parent_class = hash["parent_class"] time_record.parent_id = hash["parent_id"].to_i time_record.state = hash["state"].to_i time_record.project_id = hash["project"]["id"].to_i time_record.billable_status = hash["billable_status"].to_i time_record.value = hash["value"].to_f time_record.record_date = hash["record_date"] time_record.summary = hash["summary"] time_record.user_id = hash["user"]["id"] time_record.job_type_id = hash["job_type"]["id"] end |