Skip to content

Commit

Permalink
add system_field_options to ticket field. (Speedygeek#293)
Browse files Browse the repository at this point in the history
  • Loading branch information
mozts2005 authored Jul 14, 2017
1 parent 1e3c3ca commit 5a715c4
Show file tree
Hide file tree
Showing 2 changed files with 19 additions and 2 deletions.
11 changes: 11 additions & 0 deletions src/Tests/TicketTests.cs
Original file line number Diff line number Diff line change
Expand Up @@ -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);
}


}
}
10 changes: 8 additions & 2 deletions src/ZendeskApi_v2/Models/Tickets/TicketField.cs
Original file line number Diff line number Diff line change
Expand Up @@ -53,6 +53,9 @@ public class TicketFieldBase
[JsonProperty("custom_field_options")]
public IList<CustomFieldOptions> CustomFieldOptions { get; set; }

[JsonProperty("system_field_options")]
public IList<FieldOptions> SystemFieldOptions { get; set; }

}

public class TicketField : TicketFieldBase
Expand All @@ -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; }

Expand Down

0 comments on commit 5a715c4

Please sign in to comment.