diff --git a/pygrocy/data_models/product.py b/pygrocy/data_models/product.py index 62bc500..42af656 100644 --- a/pygrocy/data_models/product.py +++ b/pygrocy/data_models/product.py @@ -209,6 +209,7 @@ def __init__(self, raw_shopping_list: ShoppingListItem): self._note = raw_shopping_list.note self._amount = raw_shopping_list.amount self._product = None + self._done = raw_shopping_list.done def get_details(self, api_client: GrocyApiClient): if self._product_id: @@ -233,3 +234,7 @@ def note(self) -> str: @property def product(self) -> Product: return self._product + + @property + def done(self) -> int: + return self._done diff --git a/test/test_shoppinglist.py b/test/test_shoppinglist.py index 2cc40c6..26ade75 100644 --- a/test/test_shoppinglist.py +++ b/test/test_shoppinglist.py @@ -14,6 +14,7 @@ def test_get_shopping_list_valid(self, grocy): for item in shopping_list: assert isinstance(item, ShoppingListProduct) assert isinstance(item.id, int) + assert isinstance(item.done, int) if item.product_id: assert isinstance(item.product_id, int) assert isinstance(item.product, Product)