Skip to content

Commit 5daa42b

Browse files
Merge pull request #246 from dubrovkinmaxim/Code-Simplification
Code simplification
2 parents 52e690c + bd4429e commit 5daa42b

23 files changed

+4903
-5716
lines changed

SendGrid/.ci/tests.sh

100755100644
File mode changed.

SendGrid/Example/Example.cs

Lines changed: 401 additions & 401 deletions
Large diffs are not rendered by default.

SendGrid/SendGrid/Helpers/Mail/ASM.cs

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
using System.Collections.Generic;
2+
using Newtonsoft.Json;
3+
4+
namespace SendGrid.Helpers.Mail
5+
{
6+
public class ASM
7+
{
8+
[JsonProperty(PropertyName = "group_id")]
9+
public int GroupId { get; set; }
10+
11+
[JsonProperty(PropertyName = "groups_to_display")]
12+
public List<int> GroupsToDisplay { get; set; }
13+
}
14+
}
Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,22 @@
1+
using Newtonsoft.Json;
2+
3+
namespace SendGrid.Helpers.Mail
4+
{
5+
public class Attachment
6+
{
7+
[JsonProperty(PropertyName = "content")]
8+
public string Content { get; set; }
9+
10+
[JsonProperty(PropertyName = "type")]
11+
public string Type { get; set; }
12+
13+
[JsonProperty(PropertyName = "filename")]
14+
public string Filename { get; set; }
15+
16+
[JsonProperty(PropertyName = "disposition")]
17+
public string Disposition { get; set; }
18+
19+
[JsonProperty(PropertyName = "content_id")]
20+
public string ContentId { get; set; }
21+
}
22+
}
Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
using Newtonsoft.Json;
2+
3+
namespace SendGrid.Helpers.Mail
4+
{
5+
public class BCCSettings
6+
{
7+
[JsonProperty(PropertyName = "enable")]
8+
public bool? Enable { get; set; }
9+
10+
[JsonProperty(PropertyName = "email")]
11+
public string Email { get; set; }
12+
}
13+
}
Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
using Newtonsoft.Json;
2+
3+
namespace SendGrid.Helpers.Mail
4+
{
5+
public class BypassListManagement
6+
{
7+
[JsonProperty(PropertyName = "enable")]
8+
public bool Enable { get; set; }
9+
}
10+
}
Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
using Newtonsoft.Json;
2+
3+
namespace SendGrid.Helpers.Mail
4+
{
5+
public class ClickTracking
6+
{
7+
[JsonProperty(PropertyName = "enable")]
8+
public bool? Enable { get; set; }
9+
10+
[JsonProperty(PropertyName = "enable_text")]
11+
public bool? EnableText { get; set; }
12+
}
13+
}
Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,23 @@
1+
using Newtonsoft.Json;
2+
3+
namespace SendGrid.Helpers.Mail
4+
{
5+
public class Content
6+
{
7+
public Content()
8+
{
9+
}
10+
11+
public Content(string type, string value)
12+
{
13+
this.Type = type;
14+
this.Value = value;
15+
}
16+
17+
[JsonProperty(PropertyName = "type")]
18+
public string Type { get; set; }
19+
20+
[JsonProperty(PropertyName = "value")]
21+
public string Value { get; set; }
22+
}
23+
}
Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,23 @@
1+
using Newtonsoft.Json;
2+
3+
namespace SendGrid.Helpers.Mail
4+
{
5+
public class Email
6+
{
7+
public Email()
8+
{
9+
}
10+
11+
public Email(string email, string name = null)
12+
{
13+
this.Address = email;
14+
this.Name = name;
15+
}
16+
17+
[JsonProperty(PropertyName = "name")]
18+
public string Name { get; set; }
19+
20+
[JsonProperty(PropertyName = "email")]
21+
public string Address { get; set; }
22+
}
23+
}
Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
using Newtonsoft.Json;
2+
3+
namespace SendGrid.Helpers.Mail
4+
{
5+
public class FooterSettings
6+
{
7+
[JsonProperty(PropertyName = "enable")]
8+
public bool Enable { get; set; }
9+
10+
[JsonProperty(PropertyName = "text")]
11+
public string Text { get; set; }
12+
13+
[JsonProperty(PropertyName = "html")]
14+
public string Html { get; set; }
15+
}
16+
}
Lines changed: 25 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,25 @@
1+
using Newtonsoft.Json;
2+
3+
namespace SendGrid.Helpers.Mail
4+
{
5+
public class Ganalytics
6+
{
7+
[JsonProperty(PropertyName = "enable")]
8+
public bool? Enable { get; set; }
9+
10+
[JsonProperty(PropertyName = "utm_source")]
11+
public string UtmSource { get; set; }
12+
13+
[JsonProperty(PropertyName = "utm_medium")]
14+
public string UtmMedium { get; set; }
15+
16+
[JsonProperty(PropertyName = "utm_term")]
17+
public string UtmTerm { get; set; }
18+
19+
[JsonProperty(PropertyName = "utm_content")]
20+
public string UtmContent { get; set; }
21+
22+
[JsonProperty(PropertyName = "utm_campaign")]
23+
public string UtmCampaign { get; set; }
24+
}
25+
}

0 commit comments

Comments
 (0)