Class: Basecamp::Types::DraftParent
- Inherits:
-
Object
- Object
- Basecamp::Types::DraftParent
- Includes:
- TypeHelpers
- Defined in:
- lib/basecamp/generated/types.rb
Overview
DraftParent
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 = {}) ⇒ DraftParent
constructor
A new instance of DraftParent.
- #to_h ⇒ Object
- #to_json(*args) ⇒ Object
Constructor Details
#initialize(data = {}) ⇒ DraftParent
Returns a new instance of DraftParent.
1558 1559 1560 1561 1562 |
# File 'lib/basecamp/generated/types.rb', line 1558 def initialize(data = {}) @app_url = data["app_url"] @id = parse_integer(data["id"]) @title = data["title"] end |
Instance Attribute Details
#app_url ⇒ Object
Returns the value of attribute app_url.
1551 1552 1553 |
# File 'lib/basecamp/generated/types.rb', line 1551 def app_url @app_url end |
#id ⇒ Object
Returns the value of attribute id.
1551 1552 1553 |
# File 'lib/basecamp/generated/types.rb', line 1551 def id @id end |
#title ⇒ Object
Returns the value of attribute title.
1551 1552 1553 |
# File 'lib/basecamp/generated/types.rb', line 1551 def title @title end |
Class Method Details
.required_fields ⇒ Array<Symbol>
1554 1555 1556 |
# File 'lib/basecamp/generated/types.rb', line 1554 def self.required_fields %i[app_url id title].freeze end |
Instance Method Details
#to_h ⇒ Object
1564 1565 1566 1567 1568 1569 1570 |
# File 'lib/basecamp/generated/types.rb', line 1564 def to_h { "app_url" => @app_url, "id" => @id, "title" => @title, }.compact end |
#to_json(*args) ⇒ Object
1572 1573 1574 |
# File 'lib/basecamp/generated/types.rb', line 1572 def to_json(*args) to_h.to_json(*args) end |