Class: Trello::Item
Overview
An Item is a basic task that can be checked off and marked as completed.
Instance Attribute Summary collapse
Attributes inherited from BasicData
#client
Instance Method Summary
collapse
Methods inherited from BasicData
#==, #attributes, client, #collection_name, #collection_path, create, #element_name, #element_path, find, #hash, #initialize, many, one, parse, parse_many, path_name, #refresh!, register_attrs, #save, save, schema, #schema, #update!, #update_fields
Methods included from JsonUtils
included
Instance Attribute Details
#checked=(value) ⇒ Boolean
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
|
# File 'lib/trello/item.rb', line 24
class Item < BasicData
schema do
attribute :id, readonly: true, primary_key: true
attribute :type, readonly: true
attribute :name_data, readonly: true, remote_key: 'nameData'
attribute :due_date, readonly: true, remote_key: 'due', serializer: 'Time'
attribute :member_id, readonly: true, remote_key: 'idMember'
attribute :state, readonly: true
attribute :checklist_id, readonly: true, remote_key: 'idChecklist'
attribute :name, write_only: true
attribute :position, write_only: true, remote_key: 'pos'
attribute :checked, write_only: true
end
validates_presence_of :id
def complete?
state == "complete"
end
end
|
#checklist_id ⇒ String
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
|
# File 'lib/trello/item.rb', line 24
class Item < BasicData
schema do
attribute :id, readonly: true, primary_key: true
attribute :type, readonly: true
attribute :name_data, readonly: true, remote_key: 'nameData'
attribute :due_date, readonly: true, remote_key: 'due', serializer: 'Time'
attribute :member_id, readonly: true, remote_key: 'idMember'
attribute :state, readonly: true
attribute :checklist_id, readonly: true, remote_key: 'idChecklist'
attribute :name, write_only: true
attribute :position, write_only: true, remote_key: 'pos'
attribute :checked, write_only: true
end
validates_presence_of :id
def complete?
state == "complete"
end
end
|
#due_date ⇒ Datetime
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
|
# File 'lib/trello/item.rb', line 24
class Item < BasicData
schema do
attribute :id, readonly: true, primary_key: true
attribute :type, readonly: true
attribute :name_data, readonly: true, remote_key: 'nameData'
attribute :due_date, readonly: true, remote_key: 'due', serializer: 'Time'
attribute :member_id, readonly: true, remote_key: 'idMember'
attribute :state, readonly: true
attribute :checklist_id, readonly: true, remote_key: 'idChecklist'
attribute :name, write_only: true
attribute :position, write_only: true, remote_key: 'pos'
attribute :checked, write_only: true
end
validates_presence_of :id
def complete?
state == "complete"
end
end
|
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
|
# File 'lib/trello/item.rb', line 24
class Item < BasicData
schema do
attribute :id, readonly: true, primary_key: true
attribute :type, readonly: true
attribute :name_data, readonly: true, remote_key: 'nameData'
attribute :due_date, readonly: true, remote_key: 'due', serializer: 'Time'
attribute :member_id, readonly: true, remote_key: 'idMember'
attribute :state, readonly: true
attribute :checklist_id, readonly: true, remote_key: 'idChecklist'
attribute :name, write_only: true
attribute :position, write_only: true, remote_key: 'pos'
attribute :checked, write_only: true
end
validates_presence_of :id
def complete?
state == "complete"
end
end
|
#member_id ⇒ String
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
|
# File 'lib/trello/item.rb', line 24
class Item < BasicData
schema do
attribute :id, readonly: true, primary_key: true
attribute :type, readonly: true
attribute :name_data, readonly: true, remote_key: 'nameData'
attribute :due_date, readonly: true, remote_key: 'due', serializer: 'Time'
attribute :member_id, readonly: true, remote_key: 'idMember'
attribute :state, readonly: true
attribute :checklist_id, readonly: true, remote_key: 'idChecklist'
attribute :name, write_only: true
attribute :position, write_only: true, remote_key: 'pos'
attribute :checked, write_only: true
end
validates_presence_of :id
def complete?
state == "complete"
end
end
|
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
|
# File 'lib/trello/item.rb', line 24
class Item < BasicData
schema do
attribute :id, readonly: true, primary_key: true
attribute :type, readonly: true
attribute :name_data, readonly: true, remote_key: 'nameData'
attribute :due_date, readonly: true, remote_key: 'due', serializer: 'Time'
attribute :member_id, readonly: true, remote_key: 'idMember'
attribute :state, readonly: true
attribute :checklist_id, readonly: true, remote_key: 'idChecklist'
attribute :name, write_only: true
attribute :position, write_only: true, remote_key: 'pos'
attribute :checked, write_only: true
end
validates_presence_of :id
def complete?
state == "complete"
end
end
|
#name_data ⇒ String
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
|
# File 'lib/trello/item.rb', line 24
class Item < BasicData
schema do
attribute :id, readonly: true, primary_key: true
attribute :type, readonly: true
attribute :name_data, readonly: true, remote_key: 'nameData'
attribute :due_date, readonly: true, remote_key: 'due', serializer: 'Time'
attribute :member_id, readonly: true, remote_key: 'idMember'
attribute :state, readonly: true
attribute :checklist_id, readonly: true, remote_key: 'idChecklist'
attribute :name, write_only: true
attribute :position, write_only: true, remote_key: 'pos'
attribute :checked, write_only: true
end
validates_presence_of :id
def complete?
state == "complete"
end
end
|
#position ⇒ Object
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
|
# File 'lib/trello/item.rb', line 24
class Item < BasicData
schema do
attribute :id, readonly: true, primary_key: true
attribute :type, readonly: true
attribute :name_data, readonly: true, remote_key: 'nameData'
attribute :due_date, readonly: true, remote_key: 'due', serializer: 'Time'
attribute :member_id, readonly: true, remote_key: 'idMember'
attribute :state, readonly: true
attribute :checklist_id, readonly: true, remote_key: 'idChecklist'
attribute :name, write_only: true
attribute :position, write_only: true, remote_key: 'pos'
attribute :checked, write_only: true
end
validates_presence_of :id
def complete?
state == "complete"
end
end
|
#state ⇒ Object
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
|
# File 'lib/trello/item.rb', line 24
class Item < BasicData
schema do
attribute :id, readonly: true, primary_key: true
attribute :type, readonly: true
attribute :name_data, readonly: true, remote_key: 'nameData'
attribute :due_date, readonly: true, remote_key: 'due', serializer: 'Time'
attribute :member_id, readonly: true, remote_key: 'idMember'
attribute :state, readonly: true
attribute :checklist_id, readonly: true, remote_key: 'idChecklist'
attribute :name, write_only: true
attribute :position, write_only: true, remote_key: 'pos'
attribute :checked, write_only: true
end
validates_presence_of :id
def complete?
state == "complete"
end
end
|
#type ⇒ Object
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
|
# File 'lib/trello/item.rb', line 24
class Item < BasicData
schema do
attribute :id, readonly: true, primary_key: true
attribute :type, readonly: true
attribute :name_data, readonly: true, remote_key: 'nameData'
attribute :due_date, readonly: true, remote_key: 'due', serializer: 'Time'
attribute :member_id, readonly: true, remote_key: 'idMember'
attribute :state, readonly: true
attribute :checklist_id, readonly: true, remote_key: 'idChecklist'
attribute :name, write_only: true
attribute :position, write_only: true, remote_key: 'pos'
attribute :checked, write_only: true
end
validates_presence_of :id
def complete?
state == "complete"
end
end
|
Instance Method Details
#complete? ⇒ Boolean
44
45
46
|
# File 'lib/trello/item.rb', line 44
def complete?
state == "complete"
end
|