-
Notifications
You must be signed in to change notification settings - Fork 38
/
Copy pathEventWebhookSettings.cs
231 lines (211 loc) · 7.84 KB
/
EventWebhookSettings.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
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
using System;
using System.Text.Json.Serialization;
namespace StrongGrid.Models
{
/// <summary>
/// Event Webhook settings.
/// </summary>
public class EventWebhookSettings
{
/// <summary>
/// Gets or sets a value indicating whether the webhook is configured to send bounce events.
/// </summary>
/// <remarks>
/// A bounce occurs when a receiving server could not or would not accept a message.
/// </remarks>
/// <value>
/// <c>true</c> if enabled; otherwise, <c>false</c>.
/// </value>
[JsonPropertyName("bounce")]
public bool Bounce { get; set; }
/// <summary>
/// Gets or sets a value indicating whether the webhook is configured to send click events.
/// </summary>
/// <remarks>
/// Click events occur when a recipient clicks on a link within the message. You must enable Click Tracking to receive this type of event.
/// </remarks>
/// <value>
/// <c>true</c> if enabled; otherwise, <c>false</c>.
/// </value>
[JsonPropertyName("click")]
public bool Click { get; set; }
/// <summary>
/// Gets or sets the date this webhooks settings was created.
/// </summary>
/// <value>
/// The created on.
/// </value>
[JsonPropertyName("created_date")]
public DateTime? CreatedOn { get; set; }
/// <summary>
/// Gets or sets a value indicating whether the the webhook is configured to send deferred events.
/// </summary>
/// <remarks>
/// Deferred events occur when a recipient's email server temporarily rejects a message.
/// </remarks>
/// <value>
/// <c>true</c> if enabled; otherwise, <c>false</c>.
/// </value>
[JsonPropertyName("deferred")]
public bool Deferred { get; set; }
/// <summary>
/// Gets or sets a value indicating whether the Delivered notification is enabled.
/// </summary>
/// <remarks>
/// Delivered events occur when a message has been successfully delivered to the receiving server.
/// </remarks>
/// <value>
/// <c>true</c> if enabled; otherwise, <c>false</c>.
/// </value>
[JsonPropertyName("delivered")]
public bool Delivered { get; set; }
/// <summary>
/// Gets or sets a value indicating whether the webhook is configured to send dropped events.
/// </summary>
/// <remarks>
/// Dropped events occur when your message is not delivered by Twilio SendGrid.
/// Dropped events are accomponied by a reason property, which indicates why the message was dropped.
/// Reasons for a dropped message include:
/// - Invalid SMTPAPI header, Spam Content (if spam checker app enabled)
/// - Unsubscribed Address
/// - Bounced Address
/// - Spam Reporting Address
/// - Invalid
/// - Recipient List over Package Quota.
/// </remarks>
/// <value>
/// <c>true</c> if enabled; otherwise, <c>false</c>.
/// </value>
[JsonPropertyName("dropped")]
public bool Dropped { get; set; }
/// <summary>
/// Gets or sets a value indicating whether this <see cref="EventWebhookSettings"/> is enabled.
/// </summary>
/// <value>
/// <c>true</c> if enabled; otherwise, <c>false</c>.
/// </value>
[JsonPropertyName("enabled")]
public bool Enabled { get; set; }
/// <summary>
/// Gets or sets an optional friendly name assigned to the Event Webhook to help you differentiate it.
/// </summary>
/// <remarks>
/// The friendly name is for convenience only.
/// You should use the webhook id property for any programmatic tasks.
/// </remarks>
[JsonPropertyName("friendly_name")]
public string FriendlyName { get; set; }
/// <summary>
/// Gets or sets a value indicating whether the webhook is configured to send group resubscribe events.
/// </summary>
/// <remarks>
/// Group resubscribes occur when recipients resubscribe to a specific unsubscribe group by updating their subscription preferences.
/// You must enable Subscription Tracking to receive this type of event.
/// </remarks>
/// <value>
/// <c>true</c> if enabled; otherwise, <c>false</c>.
/// </value>
[JsonPropertyName("group_resubscribe")]
public bool GroupResubscribe { get; set; }
/// <summary>
/// Gets or sets a value indicating whether the webhook is configured to send group unsubscribe events.
/// </summary>
/// <remarks>
/// Group unsubscribes occur when recipients unsubscribe from a specific unsubscribe group either by direct link or by updating their subscription preferences.
/// You must enable Subscription Tracking to receive this type of event.
/// </remarks>
/// <value>
/// <c>true</c> if enabled; otherwise, <c>false</c>.
/// </value>
[JsonPropertyName("group_unsubscribe")]
public bool GroupUnsubscribe { get; set; }
/// <summary>
/// Gets or sets a unique string used to identify the webhook.
/// </summary>
/// <remarks>
/// A webhook's ID is generated programmatically and cannot be changed after creation.
/// You can assign a natural language identifier to your webhook using the <see cref="FriendlyName"/> property.
/// </remarks>
[JsonPropertyName("id")]
public string Id { get; set; }
/// <summary>
/// Gets or sets the OAuth client ID SendGrid sends to your OAuth server or service provider to generate an OAuth access token.
/// </summary>
[JsonPropertyName("oauth_client_id")]
public string OauthClientId { get; set; }
/// <summary>
/// Gets or sets the ThURL where SendGrid sends the OAuth client ID and client secret to generate an access token.
/// </summary>
/// <remarks>
/// This should be your OAuth server or service provider.
/// </remarks>
[JsonPropertyName("oauth_token_url")]
public string OauthTokenUrl { get; set; }
/// <summary>
/// Gets or sets a value indicating whether the webhook is configured to send open events.
/// </summary>
/// <remarks>
/// Open events occur when a recipient has opened the HTML message.You must enable Open Tracking to receive this type of event.
/// </remarks>
/// <value>
/// <c>true</c> if enabled; otherwise, <c>false</c>.
/// </value>
[JsonPropertyName("open")]
public bool Open { get; set; }
/// <summary>
/// Gets or sets a value indicating whether the webhook is configured to send processed events.
/// </summary>
/// <remarks>
/// Processed events occur when a message has been received by Twilio SendGrid and is ready to be delivered.
/// </remarks>
/// <value>
/// <c>true</c> if enabled; otherwise, <c>false</c>.
/// </value>
[JsonPropertyName("processed")]
public bool Processed { get; set; }
/// <summary>
/// Gets or sets the public key which can be used to verify the SendGrid signature.
/// </summary>
[JsonPropertyName("public_key")]
public string PublicKey { get; set; }
/// <summary>
/// Gets or sets a value indicating whether the webhook is configured to send spam report events.
/// </summary>
/// <remarks>
/// Spam reports occur when recipients mark a message as spam.
/// </remarks>
/// <value>
/// <c>true</c> if enabled; otherwise, <c>false</c>.
/// </value>
[JsonPropertyName("spam_report")]
public bool SpamReport { get; set; }
/// <summary>
/// Gets or sets a value indicating whether the webhook is configured to send unsubscribe events.
/// </summary>
/// <remarks>
/// Unsubscribes occur when recipients click on a message's subscription management link.
/// You must enable Subscription Tracking to receive this type of event.
/// </remarks>
/// <value>
/// <c>true</c> if enabled; otherwise, <c>false</c>.
/// </value>
[JsonPropertyName("unsubscribe")]
public bool Unsubscribe { get; set; }
/// <summary>
/// Gets or sets the date this webhooks settings was updated.
/// </summary>
/// <value>
/// The created on.
/// </value>
[JsonPropertyName("updated_date")]
public DateTime? UpdatedOn { get; set; }
/// <summary>
/// Gets or sets the URL where SendGrid will send event data.
/// </summary>
/// <value>
/// The URL.
/// </value>
[JsonPropertyName("url")]
public string Url { get; set; }
}
}