Class: Basecamp::Types::ProjectConstruction
- Inherits:
-
Object
- Object
- Basecamp::Types::ProjectConstruction
- Includes:
- TypeHelpers
- Defined in:
- lib/basecamp/generated/types.rb
Overview
ProjectConstruction
Instance Attribute Summary collapse
-
#id ⇒ Object
Returns the value of attribute id.
-
#project ⇒ Object
Returns the value of attribute project.
-
#status ⇒ Object
Returns the value of attribute status.
-
#url ⇒ Object
Returns the value of attribute url.
Class Method Summary collapse
Instance Method Summary collapse
-
#initialize(data = {}) ⇒ ProjectConstruction
constructor
A new instance of ProjectConstruction.
- #to_h ⇒ Object
- #to_json(*args) ⇒ Object
Constructor Details
#initialize(data = {}) ⇒ ProjectConstruction
Returns a new instance of ProjectConstruction.
3258 3259 3260 3261 3262 3263 |
# File 'lib/basecamp/generated/types.rb', line 3258 def initialize(data = {}) @id = parse_integer(data["id"]) @status = data["status"] @project = parse_type(data["project"], "Project") @url = data["url"] end |
Instance Attribute Details
#id ⇒ Object
Returns the value of attribute id.
3251 3252 3253 |
# File 'lib/basecamp/generated/types.rb', line 3251 def id @id end |
#project ⇒ Object
Returns the value of attribute project.
3251 3252 3253 |
# File 'lib/basecamp/generated/types.rb', line 3251 def project @project end |
#status ⇒ Object
Returns the value of attribute status.
3251 3252 3253 |
# File 'lib/basecamp/generated/types.rb', line 3251 def status @status end |
#url ⇒ Object
Returns the value of attribute url.
3251 3252 3253 |
# File 'lib/basecamp/generated/types.rb', line 3251 def url @url end |
Class Method Details
.required_fields ⇒ Array<Symbol>
3254 3255 3256 |
# File 'lib/basecamp/generated/types.rb', line 3254 def self.required_fields %i[id status].freeze end |
Instance Method Details
#to_h ⇒ Object
3265 3266 3267 3268 3269 3270 3271 3272 |
# File 'lib/basecamp/generated/types.rb', line 3265 def to_h { "id" => @id, "status" => @status, "project" => @project, "url" => @url, }.compact end |
#to_json(*args) ⇒ Object
3274 3275 3276 |
# File 'lib/basecamp/generated/types.rb', line 3274 def to_json(*args) to_h.to_json(*args) end |