Class: Basecamp::Types::BucketCardsGroup
- Inherits:
-
Object
- Object
- Basecamp::Types::BucketCardsGroup
- Includes:
- TypeHelpers
- Defined in:
- lib/basecamp/generated/types.rb
Overview
BucketCardsGroup
Instance Attribute Summary collapse
-
#bucket ⇒ Object
Returns the value of attribute bucket.
-
#cards ⇒ Object
Returns the value of attribute cards.
Class Method Summary collapse
Instance Method Summary collapse
-
#initialize(data = {}) ⇒ BucketCardsGroup
constructor
A new instance of BucketCardsGroup.
- #to_h ⇒ Object
- #to_json(*args) ⇒ Object
Constructor Details
#initialize(data = {}) ⇒ BucketCardsGroup
Returns a new instance of BucketCardsGroup.
319 320 321 322 |
# File 'lib/basecamp/generated/types.rb', line 319 def initialize(data = {}) @bucket = parse_type(data["bucket"], "RecordingBucket") @cards = parse_array(data["cards"], "Card") end |
Instance Attribute Details
#bucket ⇒ Object
Returns the value of attribute bucket.
312 313 314 |
# File 'lib/basecamp/generated/types.rb', line 312 def bucket @bucket end |
#cards ⇒ Object
Returns the value of attribute cards.
312 313 314 |
# File 'lib/basecamp/generated/types.rb', line 312 def cards @cards end |
Class Method Details
.required_fields ⇒ Array<Symbol>
315 316 317 |
# File 'lib/basecamp/generated/types.rb', line 315 def self.required_fields %i[bucket cards].freeze end |
Instance Method Details
#to_h ⇒ Object
324 325 326 327 328 329 |
# File 'lib/basecamp/generated/types.rb', line 324 def to_h { "bucket" => @bucket, "cards" => @cards, }.compact end |
#to_json(*args) ⇒ Object
331 332 333 |
# File 'lib/basecamp/generated/types.rb', line 331 def to_json(*args) to_h.to_json(*args) end |