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.
2553 2554 2555 2556 2557 2558 |
# File 'lib/basecamp/generated/types.rb', line 2553 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.
2546 2547 2548 |
# File 'lib/basecamp/generated/types.rb', line 2546 def id @id end |
#project ⇒ Object
Returns the value of attribute project.
2546 2547 2548 |
# File 'lib/basecamp/generated/types.rb', line 2546 def project @project end |
#status ⇒ Object
Returns the value of attribute status.
2546 2547 2548 |
# File 'lib/basecamp/generated/types.rb', line 2546 def status @status end |
#url ⇒ Object
Returns the value of attribute url.
2546 2547 2548 |
# File 'lib/basecamp/generated/types.rb', line 2546 def url @url end |
Class Method Details
.required_fields ⇒ Array<Symbol>
2549 2550 2551 |
# File 'lib/basecamp/generated/types.rb', line 2549 def self.required_fields %i[id status].freeze end |
Instance Method Details
#to_h ⇒ Object
2560 2561 2562 2563 2564 2565 2566 2567 |
# File 'lib/basecamp/generated/types.rb', line 2560 def to_h { "id" => @id, "status" => @status, "project" => @project, "url" => @url, }.compact end |
#to_json(*args) ⇒ Object
2569 2570 2571 |
# File 'lib/basecamp/generated/types.rb', line 2569 def to_json(*args) to_h.to_json(*args) end |