Class: Basecamp::Types::Todoset

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

Overview

Todoset

Instance Attribute Summary collapse

Class Method Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(data = {}) ⇒ Todoset

Returns a new instance of Todoset.



3825
3826
3827
3828
3829
3830
3831
3832
3833
3834
3835
3836
3837
3838
3839
3840
3841
3842
3843
3844
3845
3846
3847
3848
3849
3850
# File 'lib/basecamp/generated/types.rb', line 3825

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"])
  @name = data["name"]
  @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"])
  @app_todolists_url = data["app_todolists_url"]
  @app_todos_url = data["app_todos_url"]
  @bookmark_url = data["bookmark_url"]
  @completed = parse_boolean(data["completed"])
  @completed_loose_todos_count = parse_integer(data["completed_loose_todos_count"])
  @completed_ratio = data["completed_ratio"]
  @position = parse_integer(data["position"])
  @todolists_count = parse_integer(data["todolists_count"])
  @todolists_url = data["todolists_url"]
  @todos_count = parse_integer(data["todos_count"])
  @todos_url = data["todos_url"]
end

Instance Attribute Details

#app_todolists_urlObject

Returns the value of attribute app_todolists_url.



3818
3819
3820
# File 'lib/basecamp/generated/types.rb', line 3818

def app_todolists_url
  @app_todolists_url
end

#app_todos_urlObject

Returns the value of attribute app_todos_url.



3818
3819
3820
# File 'lib/basecamp/generated/types.rb', line 3818

def app_todos_url
  @app_todos_url
end

#app_urlObject

Returns the value of attribute app_url.



3818
3819
3820
# File 'lib/basecamp/generated/types.rb', line 3818

def app_url
  @app_url
end

#bookmark_urlObject

Returns the value of attribute bookmark_url.



3818
3819
3820
# File 'lib/basecamp/generated/types.rb', line 3818

def bookmark_url
  @bookmark_url
end

#bucketObject

Returns the value of attribute bucket.



3818
3819
3820
# File 'lib/basecamp/generated/types.rb', line 3818

def bucket
  @bucket
end

#completedObject

Returns the value of attribute completed.



3818
3819
3820
# File 'lib/basecamp/generated/types.rb', line 3818

def completed
  @completed
end

#completed_loose_todos_countObject

Returns the value of attribute completed_loose_todos_count.



3818
3819
3820
# File 'lib/basecamp/generated/types.rb', line 3818

def completed_loose_todos_count
  @completed_loose_todos_count
end

#completed_ratioObject

Returns the value of attribute completed_ratio.



3818
3819
3820
# File 'lib/basecamp/generated/types.rb', line 3818

def completed_ratio
  @completed_ratio
end

#created_atObject

Returns the value of attribute created_at.



3818
3819
3820
# File 'lib/basecamp/generated/types.rb', line 3818

def created_at
  @created_at
end

#creatorObject

Returns the value of attribute creator.



3818
3819
3820
# File 'lib/basecamp/generated/types.rb', line 3818

def creator
  @creator
end

#idObject

Returns the value of attribute id.



3818
3819
3820
# File 'lib/basecamp/generated/types.rb', line 3818

def id
  @id
end

#inherits_statusObject

Returns the value of attribute inherits_status.



3818
3819
3820
# File 'lib/basecamp/generated/types.rb', line 3818

def inherits_status
  @inherits_status
end

#nameObject

Returns the value of attribute name.



3818
3819
3820
# File 'lib/basecamp/generated/types.rb', line 3818

def name
  @name
end

#positionObject

Returns the value of attribute position.



3818
3819
3820
# File 'lib/basecamp/generated/types.rb', line 3818

def position
  @position
end

#statusObject

Returns the value of attribute status.



3818
3819
3820
# File 'lib/basecamp/generated/types.rb', line 3818

def status
  @status
end

#titleObject

Returns the value of attribute title.



3818
3819
3820
# File 'lib/basecamp/generated/types.rb', line 3818

def title
  @title
end

#todolists_countObject

Returns the value of attribute todolists_count.



3818
3819
3820
# File 'lib/basecamp/generated/types.rb', line 3818

def todolists_count
  @todolists_count
end

#todolists_urlObject

Returns the value of attribute todolists_url.



3818
3819
3820
# File 'lib/basecamp/generated/types.rb', line 3818

def todolists_url
  @todolists_url
end

#todos_countObject

Returns the value of attribute todos_count.



3818
3819
3820
# File 'lib/basecamp/generated/types.rb', line 3818

def todos_count
  @todos_count
end

#todos_urlObject

Returns the value of attribute todos_url.



3818
3819
3820
# File 'lib/basecamp/generated/types.rb', line 3818

def todos_url
  @todos_url
end

#typeObject

Returns the value of attribute type.



3818
3819
3820
# File 'lib/basecamp/generated/types.rb', line 3818

def type
  @type
end

#updated_atObject

Returns the value of attribute updated_at.



3818
3819
3820
# File 'lib/basecamp/generated/types.rb', line 3818

def updated_at
  @updated_at
end

#urlObject

Returns the value of attribute url.



3818
3819
3820
# File 'lib/basecamp/generated/types.rb', line 3818

def url
  @url
end

#visible_to_clientsObject

Returns the value of attribute visible_to_clients.



3818
3819
3820
# File 'lib/basecamp/generated/types.rb', line 3818

def visible_to_clients
  @visible_to_clients
end

Class Method Details

.required_fieldsArray<Symbol>

Returns:

  • (Array<Symbol>)


3821
3822
3823
# File 'lib/basecamp/generated/types.rb', line 3821

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

Instance Method Details

#to_hObject



3852
3853
3854
3855
3856
3857
3858
3859
3860
3861
3862
3863
3864
3865
3866
3867
3868
3869
3870
3871
3872
3873
3874
3875
3876
3877
3878
3879
# File 'lib/basecamp/generated/types.rb', line 3852

def to_h
  {
    "app_url" => @app_url,
    "bucket" => @bucket,
    "created_at" => @created_at,
    "creator" => @creator,
    "id" => @id,
    "inherits_status" => @inherits_status,
    "name" => @name,
    "status" => @status,
    "title" => @title,
    "type" => @type,
    "updated_at" => @updated_at,
    "url" => @url,
    "visible_to_clients" => @visible_to_clients,
    "app_todolists_url" => @app_todolists_url,
    "app_todos_url" => @app_todos_url,
    "bookmark_url" => @bookmark_url,
    "completed" => @completed,
    "completed_loose_todos_count" => @completed_loose_todos_count,
    "completed_ratio" => @completed_ratio,
    "position" => @position,
    "todolists_count" => @todolists_count,
    "todolists_url" => @todolists_url,
    "todos_count" => @todos_count,
    "todos_url" => @todos_url,
  }.compact
end

#to_json(*args) ⇒ Object



3881
3882
3883
# File 'lib/basecamp/generated/types.rb', line 3881

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