def get_details(self, api_client: GrocyApiClient): details = api_client.get_product(self.id) if details: self._name = details.product.name self._barcodes = [ ProductBarcode(barcode) for barcode in details.barcodes ] self._product_group_id = details.product.product_group_id self._available_amount = details.stock_amount
def get_details(self, api_client: GrocyApiClient): details = api_client.get_product(self.id) if details: self._name = details.product.name self._barcodes = details.product.barcodes self._product_group_id = details.product.product_group_id
def get_details(self, api_client: GrocyApiClient): if self._product_id: self._product = Product(api_client.get_product(self._product_id))