diff options
Diffstat (limited to 'src/SendGrid/Helpers/Mail/Model/Content.cs')
-rw-r--r-- | src/SendGrid/Helpers/Mail/Model/Content.cs | 41 |
1 files changed, 41 insertions, 0 deletions
diff --git a/src/SendGrid/Helpers/Mail/Model/Content.cs b/src/SendGrid/Helpers/Mail/Model/Content.cs new file mode 100644 index 0000000..0f05156 --- /dev/null +++ b/src/SendGrid/Helpers/Mail/Model/Content.cs @@ -0,0 +1,41 @@ +using Newtonsoft.Json; + +namespace SendGrid.Helpers.Mail +{ + public class Content + { + public Content() + { + } + + public Content(string type, string value) + { + this.Type = type; + this.Value = value; + } + + [JsonProperty(PropertyName = "type")] + public string Type { get; set; } + + [JsonProperty(PropertyName = "value")] + public string Value { get; set; } + } + + public class PlainTextContent : Content + { + public PlainTextContent(string value) + { + this.Type = MimeType.Text; + this.Value = value; + } + } + + public class HtmlContent : Content + { + public HtmlContent(string value) + { + this.Type = MimeType.Html; + this.Value = value; + } + } +}
\ No newline at end of file |