Class: Basecamp::Types::CardColumn

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

Overview

CardColumn

Instance Attribute Summary collapse

Class Method Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(data = {}) ⇒ CardColumn

Returns a new instance of CardColumn.



534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
# File 'lib/basecamp/generated/types.rb', line 534

def initialize(data = {})
  @app_url = data["app_url"]
  @bucket = parse_type(data["bucket"], "TodoBucket")
  @created_at = parse_datetime(data["created_at"])
  @creator = parse_type(data["creator"], "Person")
  @id = parse_integer(data["id"])
  @inherits_status = parse_boolean(data["inherits_status"])
  @parent = parse_type(data["parent"], "RecordingParent")
  @status = data["status"]
  @title = data["title"]
  @type = data["type"]
  @updated_at = parse_datetime(data["updated_at"])
  @url = data["url"]
  @visible_to_clients = parse_boolean(data["visible_to_clients"])
  @bookmark_url = data["bookmark_url"]
  @cards_count = parse_integer(data["cards_count"])
  @cards_url = data["cards_url"]
  @color = data["color"]
  @comments_count = parse_integer(data["comments_count"])
  @description = data["description"]
  @on_hold = parse_type(data["on_hold"], "CardColumnOnHold")
  @position = parse_integer(data["position"])
  @subscribers = parse_array(data["subscribers"], "Person")
end

Instance Attribute Details

#app_urlObject

Returns the value of attribute app_url.



527
528
529
# File 'lib/basecamp/generated/types.rb', line 527

def app_url
  @app_url
end

#bookmark_urlObject

Returns the value of attribute bookmark_url.



527
528
529
# File 'lib/basecamp/generated/types.rb', line 527

def bookmark_url
  @bookmark_url
end

#bucketObject

Returns the value of attribute bucket.



527
528
529
# File 'lib/basecamp/generated/types.rb', line 527

def bucket
  @bucket
end

#cards_countObject

Returns the value of attribute cards_count.



527
528
529
# File 'lib/basecamp/generated/types.rb', line 527

def cards_count
  @cards_count
end

#cards_urlObject

Returns the value of attribute cards_url.



527
528
529
# File 'lib/basecamp/generated/types.rb', line 527

def cards_url
  @cards_url
end

#colorObject

Returns the value of attribute color.



527
528
529
# File 'lib/basecamp/generated/types.rb', line 527

def color
  @color
end

#comments_countObject

Returns the value of attribute comments_count.



527
528
529
# File 'lib/basecamp/generated/types.rb', line 527

def comments_count
  @comments_count
end

#created_atObject

Returns the value of attribute created_at.



527
528
529
# File 'lib/basecamp/generated/types.rb', line 527

def created_at
  @created_at
end

#creatorObject

Returns the value of attribute creator.



527
528
529
# File 'lib/basecamp/generated/types.rb', line 527

def creator
  @creator
end

#descriptionObject

Returns the value of attribute description.



527
528
529
# File 'lib/basecamp/generated/types.rb', line 527

def description
  @description
end

#idObject

Returns the value of attribute id.



527
528
529
# File 'lib/basecamp/generated/types.rb', line 527

def id
  @id
end

#inherits_statusObject

Returns the value of attribute inherits_status.



527
528
529
# File 'lib/basecamp/generated/types.rb', line 527

def inherits_status
  @inherits_status
end

#on_holdObject

Returns the value of attribute on_hold.



527
528
529
# File 'lib/basecamp/generated/types.rb', line 527

def on_hold
  @on_hold
end

#parentObject

Returns the value of attribute parent.



527
528
529
# File 'lib/basecamp/generated/types.rb', line 527

def parent
  @parent
end

#positionObject

Returns the value of attribute position.



527
528
529
# File 'lib/basecamp/generated/types.rb', line 527

def position
  @position
end

#statusObject

Returns the value of attribute status.



527
528
529
# File 'lib/basecamp/generated/types.rb', line 527

def status
  @status
end

#subscribersObject

Returns the value of attribute subscribers.



527
528
529
# File 'lib/basecamp/generated/types.rb', line 527

def subscribers
  @subscribers
end

#titleObject

Returns the value of attribute title.



527
528
529
# File 'lib/basecamp/generated/types.rb', line 527

def title
  @title
end

#typeObject

Returns the value of attribute type.



527
528
529
# File 'lib/basecamp/generated/types.rb', line 527

def type
  @type
end

#updated_atObject

Returns the value of attribute updated_at.



527
528
529
# File 'lib/basecamp/generated/types.rb', line 527

def updated_at
  @updated_at
end

#urlObject

Returns the value of attribute url.



527
528
529
# File 'lib/basecamp/generated/types.rb', line 527

def url
  @url
end

#visible_to_clientsObject

Returns the value of attribute visible_to_clients.



527
528
529
# File 'lib/basecamp/generated/types.rb', line 527

def visible_to_clients
  @visible_to_clients
end

Class Method Details

.required_fieldsArray<Symbol>

Returns:

  • (Array<Symbol>)


530
531
532
# File 'lib/basecamp/generated/types.rb', line 530

def self.required_fields
  %i[app_url bucket created_at creator id inherits_status parent status title type updated_at url visible_to_clients].freeze
end

Instance Method Details

#to_hObject



559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
# File 'lib/basecamp/generated/types.rb', line 559

def to_h
  {
    "app_url" => @app_url,
    "bucket" => @bucket,
    "created_at" => @created_at,
    "creator" => @creator,
    "id" => @id,
    "inherits_status" => @inherits_status,
    "parent" => @parent,
    "status" => @status,
    "title" => @title,
    "type" => @type,
    "updated_at" => @updated_at,
    "url" => @url,
    "visible_to_clients" => @visible_to_clients,
    "bookmark_url" => @bookmark_url,
    "cards_count" => @cards_count,
    "cards_url" => @cards_url,
    "color" => @color,
    "comments_count" => @comments_count,
    "description" => @description,
    "on_hold" => @on_hold,
    "position" => @position,
    "subscribers" => @subscribers,
  }.compact
end

#to_json(*args) ⇒ Object



586
587
588
# File 'lib/basecamp/generated/types.rb', line 586

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