From a0f46cf9d4b7f1a63f2e05a9e5c3301298e62b00 Mon Sep 17 00:00:00 2001 From: Elizabeth Schneider Date: Wed, 12 Jul 2017 23:47:16 -0600 Subject: [PATCH] add system_field_options to ticket field. --- src/Tests/TicketTests.cs | 11 +++++++++++ src/ZendeskApi_v2/Models/Tickets/TicketField.cs | 10 ++++++++-- 2 files changed, 19 insertions(+), 2 deletions(-) diff --git a/src/Tests/TicketTests.cs b/src/Tests/TicketTests.cs index e949a369..3880ee54 100644 --- a/src/Tests/TicketTests.cs +++ b/src/Tests/TicketTests.cs @@ -1376,5 +1376,16 @@ public async Task CanGetIsPublicAsync() Assert.That(await api.Tickets.DeleteAsync(resp1.Ticket.Id.Value), Is.True); Assert.That(await api.Tickets.DeleteAsync(resp2.Ticket.Id.Value), Is.True); } + + + [Test] + public async Task CanGetSystemFieldOptions() + { + var resp = await api.Tickets.GetTicketFieldByIdAsync(21830872); + + Assert.That(resp.TicketField.SystemFieldOptions, Is.Not.Null); + } + + } } diff --git a/src/ZendeskApi_v2/Models/Tickets/TicketField.cs b/src/ZendeskApi_v2/Models/Tickets/TicketField.cs index f96f84b6..f95b2c9a 100644 --- a/src/ZendeskApi_v2/Models/Tickets/TicketField.cs +++ b/src/ZendeskApi_v2/Models/Tickets/TicketField.cs @@ -53,6 +53,9 @@ public class TicketFieldBase [JsonProperty("custom_field_options")] public IList CustomFieldOptions { get; set; } + [JsonProperty("system_field_options")] + public IList SystemFieldOptions { get; set; } + } public class TicketField : TicketFieldBase @@ -72,11 +75,14 @@ public class TicketField : TicketFieldBase public DateTimeOffset? UpdatedAt { get; set; } } - public class CustomFieldOptions + public class CustomFieldOptions : FieldOptions { [JsonProperty("id")] - public long? Id{ get; set; } + public long? Id { get; set; } + } + public class FieldOptions + { [JsonProperty("name")] public string Name { get; set; }