Module: Tr3llo::Command::Card::UncheckItem

Extended by:
UncheckItem
Included in:
UncheckItem
Defined in:
lib/3llo/command/card/uncheck_item.rb

Instance Method Summary collapse

Instance Method Details

#execute(card_key, check_item_key) ⇒ Object



7
8
9
10
11
12
13
14
15
16
17
18
# File 'lib/3llo/command/card/uncheck_item.rb', line 7

def execute(card_key, check_item_key)
  card_id = Entities.parse_id(:card, card_key)
  check_item_id = Entities.parse_id(:check_item, check_item_key)

  API::Checklist.update_item(card_id, check_item_id, state: "incomplete")

  interface = Application.fetch_interface!()

  interface.print_frame do
    interface.puts("Item has been unchecked")
  end
end