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.
346 347 348 349 |
# File 'lib/basecamp/generated/types.rb', line 346 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.
339 340 341 |
# File 'lib/basecamp/generated/types.rb', line 339 def bucket @bucket end |
#todos ⇒ Object
Returns the value of attribute todos.
339 340 341 |
# File 'lib/basecamp/generated/types.rb', line 339 def todos @todos end |
Class Method Details
.required_fields ⇒ Array<Symbol>
342 343 344 |
# File 'lib/basecamp/generated/types.rb', line 342 def self.required_fields %i[bucket todos].freeze end |
Instance Method Details
#to_h ⇒ Object
351 352 353 354 355 356 |
# File 'lib/basecamp/generated/types.rb', line 351 def to_h { "bucket" => @bucket, "todos" => @todos, }.compact end |
#to_json(*args) ⇒ Object
358 359 360 |
# File 'lib/basecamp/generated/types.rb', line 358 def to_json(*args) to_h.to_json(*args) end |