Class: Basecamp::Types::BucketTodosGroup
- Inherits:
-
Object
- Object
- Basecamp::Types::BucketTodosGroup
- Includes:
- TypeHelpers
- Defined in:
- lib/basecamp/generated/types.rb
Overview
BucketTodosGroup
Instance Attribute Summary collapse
-
#bucket ⇒ Object
Returns the value of attribute bucket.
-
#todos ⇒ Object
Returns the value of attribute todos.
Class Method Summary collapse
Instance Method Summary collapse
-
#initialize(data = {}) ⇒ BucketTodosGroup
constructor
A new instance of BucketTodosGroup.
- #to_h ⇒ Object
- #to_json(*args) ⇒ Object
Constructor Details
#initialize(data = {}) ⇒ BucketTodosGroup
Returns a new instance of BucketTodosGroup.
328 329 330 331 |
# File 'lib/basecamp/generated/types.rb', line 328 def initialize(data = {}) @bucket = parse_type(data["bucket"], "RecordingBucket") @todos = parse_array(data["todos"], "Todo") end |
Instance Attribute Details
#bucket ⇒ Object
Returns the value of attribute bucket.
321 322 323 |
# File 'lib/basecamp/generated/types.rb', line 321 def bucket @bucket end |
#todos ⇒ Object
Returns the value of attribute todos.
321 322 323 |
# File 'lib/basecamp/generated/types.rb', line 321 def todos @todos end |
Class Method Details
.required_fields ⇒ Array<Symbol>
324 325 326 |
# File 'lib/basecamp/generated/types.rb', line 324 def self.required_fields %i[bucket todos].freeze end |
Instance Method Details
#to_h ⇒ Object
333 334 335 336 337 338 |
# File 'lib/basecamp/generated/types.rb', line 333 def to_h { "bucket" => @bucket, "todos" => @todos, }.compact end |
#to_json(*args) ⇒ Object
340 341 342 |
# File 'lib/basecamp/generated/types.rb', line 340 def to_json(*args) to_h.to_json(*args) end |