diff --git a/src/main/java/org/zendesk/client/v2/model/Request.java b/src/main/java/org/zendesk/client/v2/model/Request.java index 65d61859..319008a4 100644 --- a/src/main/java/org/zendesk/client/v2/model/Request.java +++ b/src/main/java/org/zendesk/client/v2/model/Request.java @@ -19,6 +19,7 @@ public class Request implements Serializable { protected String subject; protected String description; protected Status status; + protected Long customStatusId; protected Ticket.Requester requester; protected Long requesterId; protected Long organizationId; @@ -87,6 +88,15 @@ public void setStatus(Status status) { this.status = status; } + @JsonProperty("custom_status_id") + public Long getCustomStatusId() { + return customStatusId; + } + + public void setCustomStatusId(Long customStatusId) { + this.customStatusId = customStatusId; + } + public String getSubject() { return subject; } diff --git a/src/test/java/org/zendesk/client/v2/model/TicketResultTest.java b/src/test/java/org/zendesk/client/v2/model/TicketResultTest.java index 484edf0a..7fa229c4 100644 --- a/src/test/java/org/zendesk/client/v2/model/TicketResultTest.java +++ b/src/test/java/org/zendesk/client/v2/model/TicketResultTest.java @@ -20,9 +20,10 @@ private TicketResult parseJson(byte[] json) { @Test public void testParseTicketResult() { - String json = "{ \"ticket\": { \"id\": 21337631753}}"; + String json = "{ \"ticket\": { \"id\": 21337631753, \"custom_status_id\": 9999}}"; TicketResult ev = parseJson(json.getBytes()); assertNotNull(ev); + assertEquals(Long.valueOf(9999), ev.getTicket().getCustomStatusId()); assertEquals(TicketResult.class, ev.getClass()); } } diff --git a/src/test/java/org/zendesk/client/v2/model/TicketTest.java b/src/test/java/org/zendesk/client/v2/model/TicketTest.java index 97dab98e..8296c34d 100644 --- a/src/test/java/org/zendesk/client/v2/model/TicketTest.java +++ b/src/test/java/org/zendesk/client/v2/model/TicketTest.java @@ -49,6 +49,7 @@ private Ticket createSampleTicket() { ticket.setId(Math.abs(RANDOM.nextLong())); ticket.setComment(new Comment(TICKET_COMMENT1)); ticket.setUpdatedAt(NOW); + ticket.setCustomStatusId(Math.abs(RANDOM.nextLong())); return ticket; } }