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.
384 385 386 387 |
# File 'lib/basecamp/generated/types.rb', line 384 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.
377 378 379 |
# File 'lib/basecamp/generated/types.rb', line 377 def bucket @bucket end |
#todos ⇒ Object
Returns the value of attribute todos.
377 378 379 |
# File 'lib/basecamp/generated/types.rb', line 377 def todos @todos end |
Class Method Details
.required_fields ⇒ Array<Symbol>
380 381 382 |
# File 'lib/basecamp/generated/types.rb', line 380 def self.required_fields %i[bucket todos].freeze end |
Instance Method Details
#to_h ⇒ Object
389 390 391 392 393 394 |
# File 'lib/basecamp/generated/types.rb', line 389 def to_h { "bucket" => @bucket, "todos" => @todos, }.compact end |
#to_json(*args) ⇒ Object
396 397 398 |
# File 'lib/basecamp/generated/types.rb', line 396 def to_json(*args) to_h.to_json(*args) end |