• Home
  • Features
  • Pricing
  • Docs
  • Announcements
  • Sign In

rwjdk / TrelloDotNet / 21438348630

28 Jan 2026 12:32PM UTC coverage: 80.629% (-0.02%) from 80.649%
21438348630

push

github

rwjdk
WIP

2598 of 3512 branches covered (73.97%)

Branch coverage included in aggregate %.

4586 of 5398 relevant lines covered (84.96%)

129.65 hits per line

Source File
Press 'n' to go to next uncovered line, 'b' for previous

75.0
/src/TrelloDotNet/Model/Webhook/WebhookActionDataCard.cs
1
using System.Collections.Generic;
2
using System;
3
using System.Text.Json.Serialization;
4
using System.Threading.Tasks;
5
using System.Threading;
6
using TrelloDotNet.Model.Options.GetCardOptions;
7

8
namespace TrelloDotNet.Model.Webhook
9
{
10
    /// <summary>
11
    /// Card of the Webhook Action Data
12
    /// </summary>
13
    public class WebhookActionDataCard
14
    {
15
        /// <summary>
16
        /// List Id
17
        /// </summary>
18
        [JsonPropertyName("id")]
19
        [JsonInclude]
20
        public string Id { get; private set; }
299✔
21

22
        /// <summary>
23
        /// List Name
24
        /// </summary>
25
        [JsonPropertyName("name")]
26
        [JsonInclude]
27
        public string Name { get; private set; }
204✔
28

29
        /// <summary>
30
        /// pos
31
        /// </summary>
32
        [JsonPropertyName("pos")]
33
        [JsonInclude]
34
        public decimal? Position { get; private set; }
119✔
35

36
        /// <summary>
37
        /// If the Card is completed
38
        /// </summary>
39
        [JsonPropertyName("dueComplete")]
40
        [JsonInclude]
41
        public bool? DueComplete { get; private set; }
124✔
42

43
        /// <summary>
44
        /// due
45
        /// </summary>
46
        [JsonPropertyName("due")]
47
        [JsonInclude]
48
        public DateTimeOffset? Due { get; private set; }
×
49

50
        /// <summary>
51
        /// start
52
        /// </summary>
53
        [JsonPropertyName("start")]
54
        [JsonInclude]
55
        public DateTimeOffset? Start { get; private set; }
6✔
56

57
        /// <summary>
58
        /// idLabels
59
        /// </summary>
60
        [JsonPropertyName("idLabels")]
61
        [JsonInclude]
62
        public List<string> Labels { get; private set; }
×
63

64
        /// <summary>
65
        /// locationName
66
        /// </summary>
67
        [JsonPropertyName("locationName")]
68
        [JsonInclude]
69
        public string LocationName { get; private set; }
×
70

71
        /// <summary>
72
        /// address
73
        /// </summary>
74
        [JsonPropertyName("address")]
75
        [JsonInclude]
76
        public string Address { get; private set; }
×
77

78
        /// <summary>
79
        /// desc
80
        /// </summary>
81
        [JsonPropertyName("desc")]
82
        [JsonInclude]
83
        public string Description { get; private set; }
×
84

85
        /// <summary>
86
        /// idList
87
        /// </summary>
88
        [JsonPropertyName("idList")]
89
        [JsonInclude]
90
        public string ListId { get; private set; }
16✔
91

92
        /// <summary>
93
        /// dueReminder
94
        /// </summary>
95
        [JsonPropertyName("dueReminder")]
96
        [JsonInclude]
97
        public int? DueReminder { get; private set; }
×
98

99
        /// <summary>
100
        /// coordinates
101
        /// </summary>
102
        [JsonPropertyName("coordinates")]
103
        [JsonInclude]
104
        public Coordinates Coordinates { get; private set; }
×
105

106
        /// <summary>
107
        /// cover
108
        /// </summary>
109
        [JsonPropertyName("cover")]
110
        [JsonInclude]
111
        public CardCover Cover { get; private set; }
×
112

113
        /// <summary>
114
        /// Get the Full Card Object
115
        /// </summary>
116
        /// <param name="cancellationToken">Cancellation Token</param>
117
        /// <returns>The Card</returns>
118
        public async Task<Card> GetAsync(CancellationToken cancellationToken = default)
119
        {
120
            return await Parent.Parent.TrelloClient.GetCardAsync(Id, cancellationToken);
9✔
121
        }
9✔
122

123
        /// <summary>
124
        /// Get the Full Card Object
125
        /// </summary>
126
        /// <param name="options">Options</param>
127
        /// <param name="cancellationToken">Cancellation Token</param>
128
        /// <returns>The Card</returns>
129
        public async Task<Card> GetAsync(GetCardOptions options, CancellationToken cancellationToken = default)
130
        {
131
            if (options == null)
58!
132
            {
133
                return await GetAsync(cancellationToken);
×
134
            }
135

136
            return await Parent.Parent.TrelloClient.GetCardAsync(Id, options, cancellationToken);
58✔
137
        }
58✔
138

139
        /// <summary>
140
        /// Parent
141
        /// </summary>
142
        public WebhookActionData Parent { get; internal set; }
187✔
143

144
        internal static WebhookActionDataCard CreateDummy(Card cardToSimulate)
145
        {
146
            if (cardToSimulate != null)
119✔
147
            {
148
                return new WebhookActionDataCard()
29✔
149
                {
29✔
150
                    Id = cardToSimulate.Id,
29✔
151
                    DueComplete = cardToSimulate.DueComplete,
29✔
152
                    Name = cardToSimulate.Name,
29✔
153
                    Position = cardToSimulate.Position
29✔
154
                };
29✔
155
            }
156

157
            return new WebhookActionDataCard()
90✔
158
            {
90✔
159
                Id = "63d128787441d05619f44dbe",
90✔
160
                DueComplete = true,
90✔
161
                Name = "MyCard",
90✔
162
                Position = 1
90✔
163
            };
90✔
164
        }
165
    }
166
}
STATUS · Troubleshooting · Open an Issue · Sales · Support · CAREERS · ENTERPRISE · START FREE · SCHEDULE DEMO
ANNOUNCEMENTS · TWITTER · TOS & SLA · Supported CI Services · What's a CI service? · Automated Testing

© 2026 Coveralls, Inc