Class: Clearbooks::Project
Overview
Instance Attribute Summary collapse
-
#description ⇒ Object
readonly
Required.
-
#id ⇒ Object
readonly
Returns the value of attribute id.
-
#project_name ⇒ Object
readonly
Optional.
-
#status ⇒ Object
readonly
Optional.
Instance Method Summary collapse
-
#initialize(data) ⇒ Project
constructor
A new instance of Project.
-
#to_savon ⇒ Hash
Returns self as Savon readable Hash.
Methods inherited from Base
Constructor Details
#initialize(data) ⇒ Project
Returns a new instance of Project.
32 33 34 35 36 37 |
# File 'lib/clearbooks/model/project.rb', line 32 def initialize data @id = data.savon(:id).to_i @description = data.savon :description @project_name = data.savon :project_name @status = data.savon :status end |
Instance Attribute Details
#description ⇒ Object (readonly)
Required. The description of the project.
16 17 18 |
# File 'lib/clearbooks/model/project.rb', line 16 def description @description end |
#id ⇒ Object (readonly)
Returns the value of attribute id.
14 15 16 |
# File 'lib/clearbooks/model/project.rb', line 14 def id @id end |
#project_name ⇒ Object (readonly)
Optional. The name of the project.
20 21 22 |
# File 'lib/clearbooks/model/project.rb', line 20 def project_name @project_name end |
#status ⇒ Object (readonly)
Optional. String identifying the project status. Use one of the following values: “open”, “closed” or “deleted”.
24 25 26 |
# File 'lib/clearbooks/model/project.rb', line 24 def status @status end |
Instance Method Details
#to_savon ⇒ Hash
Returns self as Savon readable Hash
43 44 45 46 47 48 49 50 51 |
# File 'lib/clearbooks/model/project.rb', line 43 def to_savon { project: { :@projectName => @project_name, :@status => @status, :@description => @description } } end |