summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorElmer Thomas <elmer@thinkingserious.com>2016-08-17 16:04:42 -0700
committerElmer Thomas <elmer@thinkingserious.com>2016-08-17 16:04:51 -0700
commit8f7b752c1764d66da39559ff99479e9937143b43 (patch)
tree712a759f03de0bcf6abeaf759ab3e1803bdb71e9
parent7bdda78016d03d84c3a73fb58888ebc89d6dee40 (diff)
downloadsendgrid-csharp-8f7b752c1764d66da39559ff99479e9937143b43.zip
sendgrid-csharp-8f7b752c1764d66da39559ff99479e9937143b43.tar.gz
sendgrid-csharp-8f7b752c1764d66da39559ff99479e9937143b43.tar.bz2
Version Bump v8.0.3: Fix #297v8.0.3
-rw-r--r--CHANGELOG.md5
-rw-r--r--SendGrid/Example/Properties/AssemblyInfo.cs4
-rw-r--r--SendGrid/SendGrid/Helpers/Mail/Mail.cs29
-rw-r--r--SendGrid/SendGrid/Properties/AssemblyInfo.cs4
-rw-r--r--SendGrid/UnitTest/Properties/AssemblyInfo.cs4
5 files changed, 40 insertions, 6 deletions
diff --git a/CHANGELOG.md b/CHANGELOG.md
index 25c768f..3d2b755 100644
--- a/CHANGELOG.md
+++ b/CHANGELOG.md
@@ -1,6 +1,11 @@
# Change Log
All notable changes to this project will be documented in this file.
+## [8.0.3] - 2016-08-17 ##
+## Fixed
+- [Issue #297](https://github.com/sendgrid/sendgrid-csharp/issues/297): Don't Include Empty Objects in JSON Request Body
+- 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.0.2] - 2016-08-01 ##
## Fixed
- [Issue #273](https://github.com/sendgrid/sendgrid-csharp/issues/273): Disable (or set) tracking
diff --git a/SendGrid/Example/Properties/AssemblyInfo.cs b/SendGrid/Example/Properties/AssemblyInfo.cs
index a6e27bb..6245e50 100644
--- a/SendGrid/Example/Properties/AssemblyInfo.cs
+++ b/SendGrid/Example/Properties/AssemblyInfo.cs
@@ -35,5 +35,5 @@ using System.Runtime.InteropServices;
// by using the '*' as shown below:
// [assembly: AssemblyVersion("1.0.*")]
-[assembly: AssemblyVersion("8.0.2")]
-[assembly: AssemblyFileVersion("8.0.2")]
+[assembly: AssemblyVersion("8.0.3")]
+[assembly: AssemblyFileVersion("8.0.3")]
diff --git a/SendGrid/SendGrid/Helpers/Mail/Mail.cs b/SendGrid/SendGrid/Helpers/Mail/Mail.cs
index d1c0b19..103547a 100644
--- a/SendGrid/SendGrid/Helpers/Mail/Mail.cs
+++ b/SendGrid/SendGrid/Helpers/Mail/Mail.cs
@@ -1,6 +1,7 @@
using Newtonsoft.Json;
using System;
using System.Collections.Generic;
+using System.Linq;
namespace SendGrid.Helpers.Mail
{
@@ -1120,6 +1121,15 @@ namespace SendGrid.Helpers.Mail
private Dictionary<String, String> customArgs;
private long? sendAt;
+ public bool ShouldSerializeTos()
+ {
+ if (this.tos != null)
+ {
+ return this.tos.Any();
+ }
+ return false;
+ }
+
[JsonProperty(PropertyName = "to")]
public List<Email> Tos
{
@@ -1134,6 +1144,16 @@ namespace SendGrid.Helpers.Mail
}
}
+
+ public bool ShouldSerializeCcs()
+ {
+ if (this.ccs != null)
+ {
+ return this.ccs.Any();
+ }
+ return false;
+ }
+
[JsonProperty(PropertyName = "cc")]
public List<Email> Ccs
{
@@ -1148,6 +1168,15 @@ namespace SendGrid.Helpers.Mail
}
}
+ public bool ShouldSerializeBccs()
+ {
+ if (this.bccs != null)
+ {
+ return this.bccs.Any();
+ }
+ return false;
+ }
+
[JsonProperty(PropertyName = "bcc")]
public List<Email> Bccs
{
diff --git a/SendGrid/SendGrid/Properties/AssemblyInfo.cs b/SendGrid/SendGrid/Properties/AssemblyInfo.cs
index 631b1fe..05abc68 100644
--- a/SendGrid/SendGrid/Properties/AssemblyInfo.cs
+++ b/SendGrid/SendGrid/Properties/AssemblyInfo.cs
@@ -32,5 +32,5 @@ using System.Runtime.InteropServices;
// You can specify all the values or you can default the Build and Revision Numbers
// by using the '*' as shown below:
// [assembly: AssemblyVersion("1.0.*")]
-[assembly: AssemblyVersion("8.0.2")]
-[assembly: AssemblyFileVersion("8.0.2")]
+[assembly: AssemblyVersion("8.0.3")]
+[assembly: AssemblyFileVersion("8.0.3")]
diff --git a/SendGrid/UnitTest/Properties/AssemblyInfo.cs b/SendGrid/UnitTest/Properties/AssemblyInfo.cs
index 6be7e04..1796075 100644
--- a/SendGrid/UnitTest/Properties/AssemblyInfo.cs
+++ b/SendGrid/UnitTest/Properties/AssemblyInfo.cs
@@ -32,5 +32,5 @@ using System.Runtime.InteropServices;
// You can specify all the values or you can default the Build and Revision Numbers
// by using the '*' as shown below:
// [assembly: AssemblyVersion("1.0.*")]
-[assembly: AssemblyVersion("8.0.2")]
-[assembly: AssemblyFileVersion("8.0.2")]
+[assembly: AssemblyVersion("8.0.3")]
+[assembly: AssemblyFileVersion("8.0.3")]