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.
1529 1530 1531 1532 1533 |
# File 'lib/basecamp/generated/types.rb', line 1529 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.
1522 1523 1524 |
# File 'lib/basecamp/generated/types.rb', line 1522 def app_url @app_url end |
#id ⇒ Object
Returns the value of attribute id.
1522 1523 1524 |
# File 'lib/basecamp/generated/types.rb', line 1522 def id @id end |
#name ⇒ Object
Returns the value of attribute name.
1522 1523 1524 |
# File 'lib/basecamp/generated/types.rb', line 1522 def name @name end |
Class Method Details
.required_fields ⇒ Array<Symbol>
1525 1526 1527 |
# File 'lib/basecamp/generated/types.rb', line 1525 def self.required_fields %i[app_url id name].freeze end |
Instance Method Details
#to_h ⇒ Object
1535 1536 1537 1538 1539 1540 1541 |
# File 'lib/basecamp/generated/types.rb', line 1535 def to_h { "app_url" => @app_url, "id" => @id, "name" => @name, }.compact end |
#to_json(*args) ⇒ Object
1543 1544 1545 |
# File 'lib/basecamp/generated/types.rb', line 1543 def to_json(*args) to_h.to_json(*args) end |