Method: Trello::Item#update_fields

Defined in:
lib/trello/item.rb

#update_fields(fields) ⇒ Object

Updates the fields of an item.

Supply a hash of string keyed data retrieved from the Trello API representing an item.



22
23
24
25
26
27
28
29
30
31
# File 'lib/trello/item.rb', line 22

def update_fields(fields)
  attributes[:id]           = fields['id']
  attributes[:card_id]      = fields['idCard']
  attributes[:checklist_id] = fields['idChecklist']
  attributes[:name]         = fields['name']
  attributes[:type]         = fields['type']
  attributes[:state]        = fields['state']
  attributes[:pos]          = fields['pos']
  self
end