Class: Basecamp::Types::Todoset
- Inherits:
-
Object
- Object
- Basecamp::Types::Todoset
- Includes:
- TypeHelpers
- Defined in:
- lib/basecamp/generated/types.rb
Overview
Todoset
Instance Attribute Summary collapse
-
#app_todolists_url ⇒ Object
Returns the value of attribute app_todolists_url.
-
#app_todos_url ⇒ Object
Returns the value of attribute app_todos_url.
-
#app_url ⇒ Object
Returns the value of attribute app_url.
-
#bookmark_url ⇒ Object
Returns the value of attribute bookmark_url.
-
#bucket ⇒ Object
Returns the value of attribute bucket.
-
#completed ⇒ Object
Returns the value of attribute completed.
-
#completed_loose_todos_count ⇒ Object
Returns the value of attribute completed_loose_todos_count.
-
#completed_ratio ⇒ Object
Returns the value of attribute completed_ratio.
-
#created_at ⇒ Object
Returns the value of attribute created_at.
-
#creator ⇒ Object
Returns the value of attribute creator.
-
#id ⇒ Object
Returns the value of attribute id.
-
#inherits_status ⇒ Object
Returns the value of attribute inherits_status.
-
#name ⇒ Object
Returns the value of attribute name.
-
#position ⇒ Object
Returns the value of attribute position.
-
#status ⇒ Object
Returns the value of attribute status.
-
#title ⇒ Object
Returns the value of attribute title.
-
#todolists_count ⇒ Object
Returns the value of attribute todolists_count.
-
#todolists_url ⇒ Object
Returns the value of attribute todolists_url.
-
#todos_count ⇒ Object
Returns the value of attribute todos_count.
-
#todos_url ⇒ Object
Returns the value of attribute todos_url.
-
#type ⇒ Object
Returns the value of attribute type.
-
#updated_at ⇒ Object
Returns the value of attribute updated_at.
-
#url ⇒ Object
Returns the value of attribute url.
-
#visible_to_clients ⇒ Object
Returns the value of attribute visible_to_clients.
Class Method Summary collapse
Instance Method Summary collapse
-
#initialize(data = {}) ⇒ Todoset
constructor
A new instance of Todoset.
- #to_h ⇒ Object
- #to_json(*args) ⇒ Object
Constructor Details
#initialize(data = {}) ⇒ Todoset
Returns a new instance of Todoset.
4214 4215 4216 4217 4218 4219 4220 4221 4222 4223 4224 4225 4226 4227 4228 4229 4230 4231 4232 4233 4234 4235 4236 4237 4238 4239 |
# File 'lib/basecamp/generated/types.rb', line 4214 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_url ⇒ Object
Returns the value of attribute app_todolists_url.
4207 4208 4209 |
# File 'lib/basecamp/generated/types.rb', line 4207 def app_todolists_url @app_todolists_url end |
#app_todos_url ⇒ Object
Returns the value of attribute app_todos_url.
4207 4208 4209 |
# File 'lib/basecamp/generated/types.rb', line 4207 def app_todos_url @app_todos_url end |
#app_url ⇒ Object
Returns the value of attribute app_url.
4207 4208 4209 |
# File 'lib/basecamp/generated/types.rb', line 4207 def app_url @app_url end |
#bookmark_url ⇒ Object
Returns the value of attribute bookmark_url.
4207 4208 4209 |
# File 'lib/basecamp/generated/types.rb', line 4207 def bookmark_url @bookmark_url end |
#bucket ⇒ Object
Returns the value of attribute bucket.
4207 4208 4209 |
# File 'lib/basecamp/generated/types.rb', line 4207 def bucket @bucket end |
#completed ⇒ Object
Returns the value of attribute completed.
4207 4208 4209 |
# File 'lib/basecamp/generated/types.rb', line 4207 def completed @completed end |
#completed_loose_todos_count ⇒ Object
Returns the value of attribute completed_loose_todos_count.
4207 4208 4209 |
# File 'lib/basecamp/generated/types.rb', line 4207 def completed_loose_todos_count @completed_loose_todos_count end |
#completed_ratio ⇒ Object
Returns the value of attribute completed_ratio.
4207 4208 4209 |
# File 'lib/basecamp/generated/types.rb', line 4207 def completed_ratio @completed_ratio end |
#created_at ⇒ Object
Returns the value of attribute created_at.
4207 4208 4209 |
# File 'lib/basecamp/generated/types.rb', line 4207 def created_at @created_at end |
#creator ⇒ Object
Returns the value of attribute creator.
4207 4208 4209 |
# File 'lib/basecamp/generated/types.rb', line 4207 def creator @creator end |
#id ⇒ Object
Returns the value of attribute id.
4207 4208 4209 |
# File 'lib/basecamp/generated/types.rb', line 4207 def id @id end |
#inherits_status ⇒ Object
Returns the value of attribute inherits_status.
4207 4208 4209 |
# File 'lib/basecamp/generated/types.rb', line 4207 def inherits_status @inherits_status end |
#name ⇒ Object
Returns the value of attribute name.
4207 4208 4209 |
# File 'lib/basecamp/generated/types.rb', line 4207 def name @name end |
#position ⇒ Object
Returns the value of attribute position.
4207 4208 4209 |
# File 'lib/basecamp/generated/types.rb', line 4207 def position @position end |
#status ⇒ Object
Returns the value of attribute status.
4207 4208 4209 |
# File 'lib/basecamp/generated/types.rb', line 4207 def status @status end |
#title ⇒ Object
Returns the value of attribute title.
4207 4208 4209 |
# File 'lib/basecamp/generated/types.rb', line 4207 def title @title end |
#todolists_count ⇒ Object
Returns the value of attribute todolists_count.
4207 4208 4209 |
# File 'lib/basecamp/generated/types.rb', line 4207 def todolists_count @todolists_count end |
#todolists_url ⇒ Object
Returns the value of attribute todolists_url.
4207 4208 4209 |
# File 'lib/basecamp/generated/types.rb', line 4207 def todolists_url @todolists_url end |
#todos_count ⇒ Object
Returns the value of attribute todos_count.
4207 4208 4209 |
# File 'lib/basecamp/generated/types.rb', line 4207 def todos_count @todos_count end |
#todos_url ⇒ Object
Returns the value of attribute todos_url.
4207 4208 4209 |
# File 'lib/basecamp/generated/types.rb', line 4207 def todos_url @todos_url end |
#type ⇒ Object
Returns the value of attribute type.
4207 4208 4209 |
# File 'lib/basecamp/generated/types.rb', line 4207 def type @type end |
#updated_at ⇒ Object
Returns the value of attribute updated_at.
4207 4208 4209 |
# File 'lib/basecamp/generated/types.rb', line 4207 def updated_at @updated_at end |
#url ⇒ Object
Returns the value of attribute url.
4207 4208 4209 |
# File 'lib/basecamp/generated/types.rb', line 4207 def url @url end |
#visible_to_clients ⇒ Object
Returns the value of attribute visible_to_clients.
4207 4208 4209 |
# File 'lib/basecamp/generated/types.rb', line 4207 def visible_to_clients @visible_to_clients end |
Class Method Details
.required_fields ⇒ Array<Symbol>
4210 4211 4212 |
# File 'lib/basecamp/generated/types.rb', line 4210 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_h ⇒ Object
4241 4242 4243 4244 4245 4246 4247 4248 4249 4250 4251 4252 4253 4254 4255 4256 4257 4258 4259 4260 4261 4262 4263 4264 4265 4266 4267 4268 |
# File 'lib/basecamp/generated/types.rb', line 4241 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
4270 4271 4272 |
# File 'lib/basecamp/generated/types.rb', line 4270 def to_json(*args) to_h.to_json(*args) end |