-
Notifications
You must be signed in to change notification settings - Fork 584
/
Copy pathASM.cs
46 lines (43 loc) · 1.45 KB
/
ASM.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
// <copyright file="ASM.cs" company="Twilio SendGrid">
// Copyright (c) Twilio SendGrid. All rights reserved.
// Licensed under the MIT license. See LICENSE file in the project root for full license information.
// </copyright>
#if NETSTANDARD2_0
using System.Text.Json.Serialization;
#else
using Newtonsoft.Json;
#endif
using System.Collections.Generic;
namespace SendGrid.Helpers.Mail
{
/// <summary>
/// An object allowing you to specify how to handle unsubscribes.
/// </summary>
#if NETSTANDARD2_0
// Globally defined by setting ReferenceHandler on the JsonSerializerOptions object
#else
[JsonObject(IsReference = false)]
#endif
public class ASM
{
/// <summary>
/// Gets or sets the unsubscribe group to associate with this email.
/// </summary>
#if NETSTANDARD2_0
[JsonPropertyName("group_id")]
#else
[JsonProperty(PropertyName = "group_id")]
#endif
public int GroupId { get; set; }
/// <summary>
/// Gets or sets an array containing the unsubscribe groups that you would like to be displayed on the unsubscribe preferences page.
/// https://sendgrid.com/docs/User_Guide/Suppressions/recipient_subscription_preferences.html.
/// </summary>
#if NETSTANDARD2_0
[JsonPropertyName("groups_to_display")]
#else
[JsonProperty(PropertyName = "groups_to_display", IsReference = false)]
#endif
public List<int> GroupsToDisplay { get; set; }
}
}