Class: Basecamp::Types::MyAssignment
- Inherits:
-
Object
- Object
- Basecamp::Types::MyAssignment
- Includes:
- TypeHelpers
- Defined in:
- lib/basecamp/generated/types.rb
Overview
MyAssignment
Instance Attribute Summary collapse
-
#app_url ⇒ Object
Returns the value of attribute app_url.
-
#assignees ⇒ Object
Returns the value of attribute assignees.
-
#bucket ⇒ Object
Returns the value of attribute bucket.
-
#children ⇒ Object
Returns the value of attribute children.
-
#comments_count ⇒ Object
Returns the value of attribute comments_count.
-
#completed ⇒ Object
Returns the value of attribute completed.
-
#content ⇒ Object
Returns the value of attribute content.
-
#due_on ⇒ Object
Returns the value of attribute due_on.
-
#has_description ⇒ Object
Returns the value of attribute has_description.
-
#id ⇒ Object
Returns the value of attribute id.
-
#parent ⇒ Object
Returns the value of attribute parent.
-
#priority_recording_id ⇒ Object
Returns the value of attribute priority_recording_id.
-
#starts_on ⇒ Object
Returns the value of attribute starts_on.
-
#type ⇒ Object
Returns the value of attribute type.
Class Method Summary collapse
Instance Method Summary collapse
-
#initialize(data = {}) ⇒ MyAssignment
constructor
A new instance of MyAssignment.
- #to_h ⇒ Object
- #to_json(*args) ⇒ Object
Constructor Details
#initialize(data = {}) ⇒ MyAssignment
Returns a new instance of MyAssignment.
2154 2155 2156 2157 2158 2159 2160 2161 2162 2163 2164 2165 2166 2167 2168 2169 |
# File 'lib/basecamp/generated/types.rb', line 2154 def initialize(data = {}) @id = parse_integer(data["id"]) @app_url = data["app_url"] @assignees = parse_array(data["assignees"], "MyAssignmentAssignee") @bucket = parse_type(data["bucket"], "MyAssignmentBucket") @children = parse_array(data["children"], "MyAssignment") @comments_count = parse_integer(data["comments_count"]) @completed = parse_boolean(data["completed"]) @content = data["content"] @due_on = data["due_on"] @has_description = parse_boolean(data["has_description"]) @parent = parse_type(data["parent"], "MyAssignmentParent") @priority_recording_id = parse_integer(data["priority_recording_id"]) @starts_on = data["starts_on"] @type = data["type"] end |
Instance Attribute Details
#app_url ⇒ Object
Returns the value of attribute app_url.
2147 2148 2149 |
# File 'lib/basecamp/generated/types.rb', line 2147 def app_url @app_url end |
#assignees ⇒ Object
Returns the value of attribute assignees.
2147 2148 2149 |
# File 'lib/basecamp/generated/types.rb', line 2147 def assignees @assignees end |
#bucket ⇒ Object
Returns the value of attribute bucket.
2147 2148 2149 |
# File 'lib/basecamp/generated/types.rb', line 2147 def bucket @bucket end |
#children ⇒ Object
Returns the value of attribute children.
2147 2148 2149 |
# File 'lib/basecamp/generated/types.rb', line 2147 def children @children end |
#comments_count ⇒ Object
Returns the value of attribute comments_count.
2147 2148 2149 |
# File 'lib/basecamp/generated/types.rb', line 2147 def comments_count @comments_count end |
#completed ⇒ Object
Returns the value of attribute completed.
2147 2148 2149 |
# File 'lib/basecamp/generated/types.rb', line 2147 def completed @completed end |
#content ⇒ Object
Returns the value of attribute content.
2147 2148 2149 |
# File 'lib/basecamp/generated/types.rb', line 2147 def content @content end |
#due_on ⇒ Object
Returns the value of attribute due_on.
2147 2148 2149 |
# File 'lib/basecamp/generated/types.rb', line 2147 def due_on @due_on end |
#has_description ⇒ Object
Returns the value of attribute has_description.
2147 2148 2149 |
# File 'lib/basecamp/generated/types.rb', line 2147 def has_description @has_description end |
#id ⇒ Object
Returns the value of attribute id.
2147 2148 2149 |
# File 'lib/basecamp/generated/types.rb', line 2147 def id @id end |
#parent ⇒ Object
Returns the value of attribute parent.
2147 2148 2149 |
# File 'lib/basecamp/generated/types.rb', line 2147 def parent @parent end |
#priority_recording_id ⇒ Object
Returns the value of attribute priority_recording_id.
2147 2148 2149 |
# File 'lib/basecamp/generated/types.rb', line 2147 def priority_recording_id @priority_recording_id end |
#starts_on ⇒ Object
Returns the value of attribute starts_on.
2147 2148 2149 |
# File 'lib/basecamp/generated/types.rb', line 2147 def starts_on @starts_on end |
#type ⇒ Object
Returns the value of attribute type.
2147 2148 2149 |
# File 'lib/basecamp/generated/types.rb', line 2147 def type @type end |
Class Method Details
.required_fields ⇒ Array<Symbol>
2150 2151 2152 |
# File 'lib/basecamp/generated/types.rb', line 2150 def self.required_fields %i[id].freeze end |
Instance Method Details
#to_h ⇒ Object
2171 2172 2173 2174 2175 2176 2177 2178 2179 2180 2181 2182 2183 2184 2185 2186 2187 2188 |
# File 'lib/basecamp/generated/types.rb', line 2171 def to_h { "id" => @id, "app_url" => @app_url, "assignees" => @assignees, "bucket" => @bucket, "children" => @children, "comments_count" => @comments_count, "completed" => @completed, "content" => @content, "due_on" => @due_on, "has_description" => @has_description, "parent" => @parent, "priority_recording_id" => @priority_recording_id, "starts_on" => @starts_on, "type" => @type, }.compact end |
#to_json(*args) ⇒ Object
2190 2191 2192 |
# File 'lib/basecamp/generated/types.rb', line 2190 def to_json(*args) to_h.to_json(*args) end |