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.



672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
# File 'lib/basecamp/generated/types.rb', line 672

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.



665
666
667
# File 'lib/basecamp/generated/types.rb', line 665

def app_url
  @app_url
end

#bookmark_urlObject

Returns the value of attribute bookmark_url.



665
666
667
# File 'lib/basecamp/generated/types.rb', line 665

def bookmark_url
  @bookmark_url
end

#bucketObject

Returns the value of attribute bucket.



665
666
667
# File 'lib/basecamp/generated/types.rb', line 665

def bucket
  @bucket
end

#cards_countObject

Returns the value of attribute cards_count.



665
666
667
# File 'lib/basecamp/generated/types.rb', line 665

def cards_count
  @cards_count
end

#cards_urlObject

Returns the value of attribute cards_url.



665
666
667
# File 'lib/basecamp/generated/types.rb', line 665

def cards_url
  @cards_url
end

#colorObject

Returns the value of attribute color.



665
666
667
# File 'lib/basecamp/generated/types.rb', line 665

def color
  @color
end

#comments_countObject

Returns the value of attribute comments_count.



665
666
667
# File 'lib/basecamp/generated/types.rb', line 665

def comments_count
  @comments_count
end

#created_atObject

Returns the value of attribute created_at.



665
666
667
# File 'lib/basecamp/generated/types.rb', line 665

def created_at
  @created_at
end

#creatorObject

Returns the value of attribute creator.



665
666
667
# File 'lib/basecamp/generated/types.rb', line 665

def creator
  @creator
end

#descriptionObject

Returns the value of attribute description.



665
666
667
# File 'lib/basecamp/generated/types.rb', line 665

def description
  @description
end

#idObject

Returns the value of attribute id.



665
666
667
# File 'lib/basecamp/generated/types.rb', line 665

def id
  @id
end

#inherits_statusObject

Returns the value of attribute inherits_status.



665
666
667
# File 'lib/basecamp/generated/types.rb', line 665

def inherits_status
  @inherits_status
end

#on_holdObject

Returns the value of attribute on_hold.



665
666
667
# File 'lib/basecamp/generated/types.rb', line 665

def on_hold
  @on_hold
end

#parentObject

Returns the value of attribute parent.



665
666
667
# File 'lib/basecamp/generated/types.rb', line 665

def parent
  @parent
end

#positionObject

Returns the value of attribute position.



665
666
667
# File 'lib/basecamp/generated/types.rb', line 665

def position
  @position
end

#statusObject

Returns the value of attribute status.



665
666
667
# File 'lib/basecamp/generated/types.rb', line 665

def status
  @status
end

#subscribersObject

Returns the value of attribute subscribers.



665
666
667
# File 'lib/basecamp/generated/types.rb', line 665

def subscribers
  @subscribers
end

#titleObject

Returns the value of attribute title.



665
666
667
# File 'lib/basecamp/generated/types.rb', line 665

def title
  @title
end

#typeObject

Returns the value of attribute type.



665
666
667
# File 'lib/basecamp/generated/types.rb', line 665

def type
  @type
end

#updated_atObject

Returns the value of attribute updated_at.



665
666
667
# File 'lib/basecamp/generated/types.rb', line 665

def updated_at
  @updated_at
end

#urlObject

Returns the value of attribute url.



665
666
667
# File 'lib/basecamp/generated/types.rb', line 665

def url
  @url
end

#visible_to_clientsObject

Returns the value of attribute visible_to_clients.



665
666
667
# File 'lib/basecamp/generated/types.rb', line 665

def visible_to_clients
  @visible_to_clients
end

Class Method Details

.required_fieldsArray<Symbol>

Returns:

  • (Array<Symbol>)


668
669
670
# File 'lib/basecamp/generated/types.rb', line 668

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



697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
# File 'lib/basecamp/generated/types.rb', line 697

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



724
725
726
# File 'lib/basecamp/generated/types.rb', line 724

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