forked from microsoft/botbuilder-dotnet
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathReceiptCard.cs
117 lines (105 loc) · 4.58 KB
/
ReceiptCard.cs
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
// Copyright (c) Microsoft Corporation. All rights reserved.
// Licensed under the MIT License.
namespace Microsoft.Bot.Schema
{
using System.Collections.Generic;
using Newtonsoft.Json;
/// <summary>
/// A receipt card.
/// </summary>
public partial class ReceiptCard
{
/// <summary>
/// Initializes a new instance of the <see cref="ReceiptCard"/> class.
/// </summary>
public ReceiptCard()
{
CustomInit();
}
/// <summary>
/// Initializes a new instance of the <see cref="ReceiptCard"/> class.
/// </summary>
/// <param name="title">Title of the card.</param>
/// <param name="facts">Array of Fact objects.</param>
/// <param name="items">Array of Receipt Items.</param>
/// <param name="tap">This action will be activated when user taps on
/// the card.</param>
/// <param name="total">Total amount of money paid (or to be
/// paid).</param>
/// <param name="tax">Total amount of tax paid (or to be paid).</param>
/// <param name="vat">Total amount of VAT paid (or to be paid).</param>
/// <param name="buttons">Set of actions applicable to the current
/// card.</param>
public ReceiptCard(string title = default, IList<Fact> facts = default, IList<ReceiptItem> items = default, CardAction tap = default, string total = default, string tax = default, string vat = default, IList<CardAction> buttons = default)
{
Title = title;
Facts = facts;
Items = items;
Tap = tap;
Total = total;
Tax = tax;
Vat = vat;
Buttons = buttons;
CustomInit();
}
/// <summary>
/// Gets or sets title of the card.
/// </summary>
/// <value>The title of the card.</value>
[JsonProperty(PropertyName = "title")]
public string Title { get; set; }
/// <summary>
/// Gets or sets array of Fact objects.
/// </summary>
/// <value>The collection of <see cref="Fact"/>'s.</value>
[JsonProperty(PropertyName = "facts")]
#pragma warning disable CA2227 // Collection properties should be read only (we can't change this without breaking compat).
public IList<Fact> Facts { get; set; }
#pragma warning restore CA2227 // Collection properties should be read only
/// <summary>
/// Gets or sets array of Receipt Items.
/// </summary>
/// <value>The receipt items.</value>
[JsonProperty(PropertyName = "items")]
#pragma warning disable CA2227 // Collection properties should be read only (we can't change this without breaking compat).
public IList<ReceiptItem> Items { get; set; }
#pragma warning restore CA2227 // Collection properties should be read only
/// <summary>
/// Gets or sets this action will be activated when user taps on the
/// card.
/// </summary>
/// <value>The card action that will be activated when the user taps on the card.</value>
[JsonProperty(PropertyName = "tap")]
public CardAction Tap { get; set; }
/// <summary>
/// Gets or sets total amount of money paid (or to be paid).
/// </summary>
/// <value>The total amount of money paid (or to be paid).</value>
[JsonProperty(PropertyName = "total")]
public string Total { get; set; }
/// <summary>
/// Gets or sets total amount of tax paid (or to be paid).
/// </summary>
/// <value>The total amount of tax.</value>
[JsonProperty(PropertyName = "tax")]
public string Tax { get; set; }
/// <summary>
/// Gets or sets total amount of VAT paid (or to be paid).
/// </summary>
/// <value>The total amount of VAT.</value>
[JsonProperty(PropertyName = "vat")]
public string Vat { get; set; }
/// <summary>
/// Gets or sets set of actions applicable to the current card.
/// </summary>
/// <value>The actions applicable to the current card.</value>
[JsonProperty(PropertyName = "buttons")]
#pragma warning disable CA2227 // Collection properties should be read only (we can't change this without breaking compat).
public IList<CardAction> Buttons { get; set; }
#pragma warning restore CA2227 // Collection properties should be read only
/// <summary>
/// An initialization method that performs custom operations like setting defaults.
/// </summary>
partial void CustomInit();
}
}