Skip to content

Commit 8f7b752

Browse files
Version Bump v8.0.3: Fix #297
1 parent 7bdda78 commit 8f7b752

File tree

5 files changed

+40
-6
lines changed

5 files changed

+40
-6
lines changed

CHANGELOG.md

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,11 @@
11
# Change Log
22
All notable changes to this project will be documented in this file.
33

4+
## [8.0.3] - 2016-08-17 ##
5+
## Fixed
6+
- [Issue #297](https://github.com/sendgrid/sendgrid-csharp/issues/297): Don't Include Empty Objects in JSON Request Body
7+
- If you clear out the values of the to, bcc or cc lists in the personalization objects, they will no longer be included in the JSON request body
8+
49
## [8.0.2] - 2016-08-01 ##
510
## Fixed
611
- [Issue #273](https://github.com/sendgrid/sendgrid-csharp/issues/273): Disable (or set) tracking

SendGrid/Example/Properties/AssemblyInfo.cs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -35,5 +35,5 @@
3535
// by using the '*' as shown below:
3636
// [assembly: AssemblyVersion("1.0.*")]
3737

38-
[assembly: AssemblyVersion("8.0.2")]
39-
[assembly: AssemblyFileVersion("8.0.2")]
38+
[assembly: AssemblyVersion("8.0.3")]
39+
[assembly: AssemblyFileVersion("8.0.3")]

SendGrid/SendGrid/Helpers/Mail/Mail.cs

Lines changed: 29 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
using Newtonsoft.Json;
22
using System;
33
using System.Collections.Generic;
4+
using System.Linq;
45

56
namespace SendGrid.Helpers.Mail
67
{
@@ -1120,6 +1121,15 @@ public class Personalization
11201121
private Dictionary<String, String> customArgs;
11211122
private long? sendAt;
11221123

1124+
public bool ShouldSerializeTos()
1125+
{
1126+
if (this.tos != null)
1127+
{
1128+
return this.tos.Any();
1129+
}
1130+
return false;
1131+
}
1132+
11231133
[JsonProperty(PropertyName = "to")]
11241134
public List<Email> Tos
11251135
{
@@ -1134,6 +1144,16 @@ public List<Email> Tos
11341144
}
11351145
}
11361146

1147+
1148+
public bool ShouldSerializeCcs()
1149+
{
1150+
if (this.ccs != null)
1151+
{
1152+
return this.ccs.Any();
1153+
}
1154+
return false;
1155+
}
1156+
11371157
[JsonProperty(PropertyName = "cc")]
11381158
public List<Email> Ccs
11391159
{
@@ -1148,6 +1168,15 @@ public List<Email> Ccs
11481168
}
11491169
}
11501170

1171+
public bool ShouldSerializeBccs()
1172+
{
1173+
if (this.bccs != null)
1174+
{
1175+
return this.bccs.Any();
1176+
}
1177+
return false;
1178+
}
1179+
11511180
[JsonProperty(PropertyName = "bcc")]
11521181
public List<Email> Bccs
11531182
{

SendGrid/SendGrid/Properties/AssemblyInfo.cs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -32,5 +32,5 @@
3232
// You can specify all the values or you can default the Build and Revision Numbers
3333
// by using the '*' as shown below:
3434
// [assembly: AssemblyVersion("1.0.*")]
35-
[assembly: AssemblyVersion("8.0.2")]
36-
[assembly: AssemblyFileVersion("8.0.2")]
35+
[assembly: AssemblyVersion("8.0.3")]
36+
[assembly: AssemblyFileVersion("8.0.3")]

SendGrid/UnitTest/Properties/AssemblyInfo.cs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -32,5 +32,5 @@
3232
// You can specify all the values or you can default the Build and Revision Numbers
3333
// by using the '*' as shown below:
3434
// [assembly: AssemblyVersion("1.0.*")]
35-
[assembly: AssemblyVersion("8.0.2")]
36-
[assembly: AssemblyFileVersion("8.0.2")]
35+
[assembly: AssemblyVersion("8.0.3")]
36+
[assembly: AssemblyFileVersion("8.0.3")]

0 commit comments

Comments
 (0)