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.
2750 2751 2752 2753 2754 2755 |
# File 'lib/basecamp/generated/types.rb', line 2750 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.
2743 2744 2745 |
# File 'lib/basecamp/generated/types.rb', line 2743 def id @id end |
#project ⇒ Object
Returns the value of attribute project.
2743 2744 2745 |
# File 'lib/basecamp/generated/types.rb', line 2743 def project @project end |
#status ⇒ Object
Returns the value of attribute status.
2743 2744 2745 |
# File 'lib/basecamp/generated/types.rb', line 2743 def status @status end |
#url ⇒ Object
Returns the value of attribute url.
2743 2744 2745 |
# File 'lib/basecamp/generated/types.rb', line 2743 def url @url end |
Class Method Details
.required_fields ⇒ Array<Symbol>
2746 2747 2748 |
# File 'lib/basecamp/generated/types.rb', line 2746 def self.required_fields %i[id status].freeze end |
Instance Method Details
#to_h ⇒ Object
2757 2758 2759 2760 2761 2762 2763 2764 |
# File 'lib/basecamp/generated/types.rb', line 2757 def to_h { "id" => @id, "status" => @status, "project" => @project, "url" => @url, }.compact end |
#to_json(*args) ⇒ Object
2766 2767 2768 |
# File 'lib/basecamp/generated/types.rb', line 2766 def to_json(*args) to_h.to_json(*args) end |