Class: Basecamp::Types::DraftBucket
- Inherits:
-
Object
- Object
- Basecamp::Types::DraftBucket
- Includes:
- TypeHelpers
- Defined in:
- lib/basecamp/generated/types.rb
Overview
DraftBucket
Instance Attribute Summary collapse
-
#app_url ⇒ Object
Returns the value of attribute app_url.
-
#id ⇒ Object
Returns the value of attribute id.
-
#name ⇒ Object
Returns the value of attribute name.
Class Method Summary collapse
Instance Method Summary collapse
-
#initialize(data = {}) ⇒ DraftBucket
constructor
A new instance of DraftBucket.
- #to_h ⇒ Object
- #to_json(*args) ⇒ Object
Constructor Details
#initialize(data = {}) ⇒ DraftBucket
Returns a new instance of DraftBucket.
1593 1594 1595 1596 1597 |
# File 'lib/basecamp/generated/types.rb', line 1593 def initialize(data = {}) @app_url = data["app_url"] @id = parse_integer(data["id"]) @name = data["name"] end |
Instance Attribute Details
#app_url ⇒ Object
Returns the value of attribute app_url.
1586 1587 1588 |
# File 'lib/basecamp/generated/types.rb', line 1586 def app_url @app_url end |
#id ⇒ Object
Returns the value of attribute id.
1586 1587 1588 |
# File 'lib/basecamp/generated/types.rb', line 1586 def id @id end |
#name ⇒ Object
Returns the value of attribute name.
1586 1587 1588 |
# File 'lib/basecamp/generated/types.rb', line 1586 def name @name end |
Class Method Details
.required_fields ⇒ Array<Symbol>
1589 1590 1591 |
# File 'lib/basecamp/generated/types.rb', line 1589 def self.required_fields %i[app_url id name].freeze end |
Instance Method Details
#to_h ⇒ Object
1599 1600 1601 1602 1603 1604 1605 |
# File 'lib/basecamp/generated/types.rb', line 1599 def to_h { "app_url" => @app_url, "id" => @id, "name" => @name, }.compact end |
#to_json(*args) ⇒ Object
1607 1608 1609 |
# File 'lib/basecamp/generated/types.rb', line 1607 def to_json(*args) to_h.to_json(*args) end |