+ if match.command('assign'):
+ store_id = int(match.args()[1])
+ item_id = int(match.args()[2])
+ Data().assign_store(store_id, item_id)
+
+ # Now print the list for the assigned store
+ items = Data().get_shopping_list(store_id)
+ results = ['Shopping List']
+ for item in items:
+ results.append(str(item))
+ return results
+
+ if match.command('buy'):
+ item_id = ' '.join(match.args()[1:])
+ Data().purchase_item(item_id)
+ return ['Success']
+
+ if match.command('clear'):
+ store_id = ' '.join(match.args()[1:])
+ Data().clear_list(store_id)
+ return ['Success']
+
+ if match.command('clear-all'):
+ store_id = ' '.join(match.args()[1:])
+ Data().clear_list(store_id, clear_all=True)
+ return ['Success']