Class: Basecamp::Types::BucketCardsGroup

Inherits:
Object
  • Object
show all
Includes:
TypeHelpers
Defined in:
lib/basecamp/generated/types.rb

Overview

BucketCardsGroup

Instance Attribute Summary collapse

Class Method Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(data = {}) ⇒ BucketCardsGroup

Returns a new instance of BucketCardsGroup.



301
302
303
304
# File 'lib/basecamp/generated/types.rb', line 301

def initialize(data = {})
  @bucket = parse_type(data["bucket"], "RecordingBucket")
  @cards = parse_array(data["cards"], "Card")
end

Instance Attribute Details

#bucketObject

Returns the value of attribute bucket.



294
295
296
# File 'lib/basecamp/generated/types.rb', line 294

def bucket
  @bucket
end

#cardsObject

Returns the value of attribute cards.



294
295
296
# File 'lib/basecamp/generated/types.rb', line 294

def cards
  @cards
end

Class Method Details

.required_fieldsArray<Symbol>

Returns:

  • (Array<Symbol>)


297
298
299
# File 'lib/basecamp/generated/types.rb', line 297

def self.required_fields
  %i[bucket cards].freeze
end

Instance Method Details

#to_hObject



306
307
308
309
310
311
# File 'lib/basecamp/generated/types.rb', line 306

def to_h
  {
    "bucket" => @bucket,
    "cards" => @cards,
  }.compact
end

#to_json(*args) ⇒ Object



313
314
315
# File 'lib/basecamp/generated/types.rb', line 313

def to_json(*args)
  to_h.to_json(*args)
end