Class: Basecamp::Types::TodoParent
- Inherits:
-
Object
- Object
- Basecamp::Types::TodoParent
- Includes:
- TypeHelpers
- Defined in:
- lib/basecamp/generated/types.rb
Overview
TodoParent
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.
-
#type ⇒ Object
Returns the value of attribute type.
-
#url ⇒ Object
Returns the value of attribute url.
Class Method Summary collapse
Instance Method Summary collapse
-
#initialize(data = {}) ⇒ TodoParent
constructor
A new instance of TodoParent.
- #to_h ⇒ Object
- #to_json(*args) ⇒ Object
Constructor Details
#initialize(data = {}) ⇒ TodoParent
Returns a new instance of TodoParent.
4308 4309 4310 4311 4312 4313 4314 |
# File 'lib/basecamp/generated/types.rb', line 4308 def initialize(data = {}) @app_url = data["app_url"] @id = parse_integer(data["id"]) @title = data["title"] @type = data["type"] @url = data["url"] end |
Instance Attribute Details
#app_url ⇒ Object
Returns the value of attribute app_url.
4301 4302 4303 |
# File 'lib/basecamp/generated/types.rb', line 4301 def app_url @app_url end |
#id ⇒ Object
Returns the value of attribute id.
4301 4302 4303 |
# File 'lib/basecamp/generated/types.rb', line 4301 def id @id end |
#title ⇒ Object
Returns the value of attribute title.
4301 4302 4303 |
# File 'lib/basecamp/generated/types.rb', line 4301 def title @title end |
#type ⇒ Object
Returns the value of attribute type.
4301 4302 4303 |
# File 'lib/basecamp/generated/types.rb', line 4301 def type @type end |
#url ⇒ Object
Returns the value of attribute url.
4301 4302 4303 |
# File 'lib/basecamp/generated/types.rb', line 4301 def url @url end |
Class Method Details
.required_fields ⇒ Array<Symbol>
4304 4305 4306 |
# File 'lib/basecamp/generated/types.rb', line 4304 def self.required_fields %i[app_url id title type url].freeze end |
Instance Method Details
#to_h ⇒ Object
4316 4317 4318 4319 4320 4321 4322 4323 4324 |
# File 'lib/basecamp/generated/types.rb', line 4316 def to_h { "app_url" => @app_url, "id" => @id, "title" => @title, "type" => @type, "url" => @url, }.compact end |
#to_json(*args) ⇒ Object
4326 4327 4328 |
# File 'lib/basecamp/generated/types.rb', line 4326 def to_json(*args) to_h.to_json(*args) end |