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.
2717 2718 2719 2720 2721 2722 |
# File 'lib/basecamp/generated/types.rb', line 2717 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.
2710 2711 2712 |
# File 'lib/basecamp/generated/types.rb', line 2710 def id @id end |
#project ⇒ Object
Returns the value of attribute project.
2710 2711 2712 |
# File 'lib/basecamp/generated/types.rb', line 2710 def project @project end |
#status ⇒ Object
Returns the value of attribute status.
2710 2711 2712 |
# File 'lib/basecamp/generated/types.rb', line 2710 def status @status end |
#url ⇒ Object
Returns the value of attribute url.
2710 2711 2712 |
# File 'lib/basecamp/generated/types.rb', line 2710 def url @url end |
Class Method Details
.required_fields ⇒ Array<Symbol>
2713 2714 2715 |
# File 'lib/basecamp/generated/types.rb', line 2713 def self.required_fields %i[id status].freeze end |
Instance Method Details
#to_h ⇒ Object
2724 2725 2726 2727 2728 2729 2730 2731 |
# File 'lib/basecamp/generated/types.rb', line 2724 def to_h { "id" => @id, "status" => @status, "project" => @project, "url" => @url, }.compact end |
#to_json(*args) ⇒ Object
2733 2734 2735 |
# File 'lib/basecamp/generated/types.rb', line 2733 def to_json(*args) to_h.to_json(*args) end |