我无法从Firestore中提取称为line_items的MenuItem对象。这是显示Firebase的控制台:
DELETE
这是负责检索交易数据的功能。前两个工作。第三个没有。当应该有值时,它将line_items作为空字典返回。
document.data() is ["status": PENDING, "account_id":
0EE2S7CZeLVMbJ5fujwgKqUHGp53, "total_amount": 544,
"balance_amount": 544, "date": 1553540151000, "discount_amount": 0,
"notes": , "tip_amount": 0, "reward_amount": 0, "balance_id":
QaC1hQwgAHHlCP0rAvgR, "subtotal": 500, "line_items": <__NSArrayM
0x6000029184e0>(
{
basePrice = 100;
category = Beans;
description = "La Colombe 2.2 Kg Bag";
itemId = RWQ7QDTACJRTLHGXX3WNUQHE;
modifierKeys = (
NNZVHCFWVUT5DDQMJ5BOYHXS,
VXVVAAVTLFVPCA66EGTWHBTX
);
name = "La Colombe 2.2Kg BAG";
photoUrl = "https://square-production.s3.amazonaws.com/files/d13f686c4b8995914642f9ddd61491182e9bcd7f/original.jpeg";
quantity = 2;
size = Regular;
sizeAddOnPrice = 150;
toppingsAddOnPrice = 0;
totalModPrice = 150;
totalPrice = 250;
unitPrice = 250;
}
), "tax_amount": 44, "location_id": 0M8QD6ZY890RT]