[csharp] Receipt Card for Microsoft Bot Framework

Viewer

copydownloadembedprintName: Receipt Card for Microsoft Bot Framework
  1. protected override IList<Attachment> GetCardAttachments()
  2. {
  3.     return new List<Attachment>
  4.     {
  5.         new ReceiptCard
  6.         {
  7.             Title = "John Doe",
  8.             Facts = new List<Fact> { new Fact("Order Number""1234")new Fact("Payment Method""VISA 5555-****") },
  9.             Items = new List<ReceiptItem>
  10.             {
  11.                 new ReceiptItem("Data Transfer", price: "$ 38.45", quantity: "368", image: new CardImage(url: "https://github.com/amido/azure-vector-icons/raw/master/renders/traffic-manager.png")),
  12.                 new ReceiptItem("App Service", price: "$ 45.00", quantity: "720", image: new CardImage(url: "https://github.com/amido/azure-vector-icons/raw/master/renders/cloud-service.png")),
  13.             },
  14.             Tax = "$ 7.50",
  15.             Total = "$ 90.95",
  16.             Buttons = new List<CardAction>
  17.             {
  18.                 new CardAction(
  19.                     ActionTypes.OpenUrl,
  20.                     "More information",
  21.                     "https://account.windowsazure.com/content/6.10.1.38-.8225.160809-1618/aux-pre/images/offer-icon-freetrial.png",
  22.                     "https://azure.microsoft.com/en-us/pricing/")
  23.             }
  24.         }.ToAttachment()
  25.     };
  26. }

Editor

You can edit this paste and save as new:


File Description
  • Receipt Card for Microsoft Bot Framework
  • Paste Code
  • 30 Jan-2018
  • 1.22 Kb
You can Share it: