【问题标题】:Missing properties/methods in ReceiptItemReceiptItem 中缺少属性/方法
【发布时间】:2018-03-09 06:32:51
【问题描述】:
【问题讨论】:
标签:
facebook
facebook-javascript-sdk
bots
botframework
receipt
【解决方案1】:
ReceiptItem 将成为ReceiptCard 的项目。 ReceiptCard 也有一个 facts 的集合,这是向用户提供附加内容的地方,例如 payment_method。
Here 是如何使用facts 集合的示例:
var receiptCard = new ReceiptCard
{
Title = Resources.RootDialog_Receipt_Title,
Facts = new List<Fact>
{
new Fact(Resources.RootDialog_Receipt_OrderID, order.OrderID),
new Fact(Resources.RootDialog_Receipt_PaymentMethod, creditCardOffuscated)
},
Items = new List<ReceiptItem>
{
new ReceiptItem(
title: order.FlowerCategoryName,
subtitle: order.Bouquet.Name,
price: order.Bouquet.Price.ToString("C"),
image: new CardImage(order.Bouquet.ImageUrl)),
},
Total = order.Bouquet.Price.ToString("C")
};
以防万一,这里是相同的,但C#。