Class: Basecamp::Types::MyAssignmentParent
- Inherits:
-
Object
- Object
- Basecamp::Types::MyAssignmentParent
- Includes:
- TypeHelpers
- Defined in:
- lib/basecamp/generated/types.rb
Overview
MyAssignmentParent
Instance Attribute Summary collapse
-
#app_url ⇒ Object
Returns the value of attribute app_url.
-
#id ⇒ Object
Returns the value of attribute id.
-
#title ⇒ Object
Returns the value of attribute title.
Class Method Summary collapse
Instance Method Summary collapse
-
#initialize(data = {}) ⇒ MyAssignmentParent
constructor
A new instance of MyAssignmentParent.
- #to_h ⇒ Object
- #to_json(*args) ⇒ Object
Constructor Details
#initialize(data = {}) ⇒ MyAssignmentParent
Returns a new instance of MyAssignmentParent.
2296 2297 2298 2299 2300 |
# File 'lib/basecamp/generated/types.rb', line 2296 def initialize(data = {}) @id = parse_integer(data["id"]) @app_url = data["app_url"] @title = data["title"] end |
Instance Attribute Details
#app_url ⇒ Object
Returns the value of attribute app_url.
2289 2290 2291 |
# File 'lib/basecamp/generated/types.rb', line 2289 def app_url @app_url end |
#id ⇒ Object
Returns the value of attribute id.
2289 2290 2291 |
# File 'lib/basecamp/generated/types.rb', line 2289 def id @id end |
#title ⇒ Object
Returns the value of attribute title.
2289 2290 2291 |
# File 'lib/basecamp/generated/types.rb', line 2289 def title @title end |
Class Method Details
.required_fields ⇒ Array<Symbol>
2292 2293 2294 |
# File 'lib/basecamp/generated/types.rb', line 2292 def self.required_fields %i[id].freeze end |
Instance Method Details
#to_h ⇒ Object
2302 2303 2304 2305 2306 2307 2308 |
# File 'lib/basecamp/generated/types.rb', line 2302 def to_h { "id" => @id, "app_url" => @app_url, "title" => @title, }.compact end |
#to_json(*args) ⇒ Object
2310 2311 2312 |
# File 'lib/basecamp/generated/types.rb', line 2310 def to_json(*args) to_h.to_json(*args) end |