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.
1622 1623 1624 1625 1626 |
# File 'lib/basecamp/generated/types.rb', line 1622 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.
1615 1616 1617 |
# File 'lib/basecamp/generated/types.rb', line 1615 def app_url @app_url end |
#id ⇒ Object
Returns the value of attribute id.
1615 1616 1617 |
# File 'lib/basecamp/generated/types.rb', line 1615 def id @id end |
#title ⇒ Object
Returns the value of attribute title.
1615 1616 1617 |
# File 'lib/basecamp/generated/types.rb', line 1615 def title @title end |
Class Method Details
.required_fields ⇒ Array<Symbol>
1618 1619 1620 |
# File 'lib/basecamp/generated/types.rb', line 1618 def self.required_fields %i[app_url id title].freeze end |
Instance Method Details
#to_h ⇒ Object
1628 1629 1630 1631 1632 1633 1634 |
# File 'lib/basecamp/generated/types.rb', line 1628 def to_h { "app_url" => @app_url, "id" => @id, "title" => @title, }.compact end |
#to_json(*args) ⇒ Object
1636 1637 1638 |
# File 'lib/basecamp/generated/types.rb', line 1636 def to_json(*args) to_h.to_json(*args) end |