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.



357
358
359
360
# File 'lib/basecamp/generated/types.rb', line 357

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.



350
351
352
# File 'lib/basecamp/generated/types.rb', line 350

def bucket
  @bucket
end

#cardsObject

Returns the value of attribute cards.



350
351
352
# File 'lib/basecamp/generated/types.rb', line 350

def cards
  @cards
end

Class Method Details

.required_fieldsArray<Symbol>

Returns:

  • (Array<Symbol>)


353
354
355
# File 'lib/basecamp/generated/types.rb', line 353

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

Instance Method Details

#to_hObject



362
363
364
365
366
367
# File 'lib/basecamp/generated/types.rb', line 362

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

#to_json(*args) ⇒ Object



369
370
371
# File 'lib/basecamp/generated/types.rb', line 369

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