Skip to content

Commit d8e29d9

Browse files
committed
add conversation waiting_since
1 parent e122b55 commit d8e29d9

File tree

5 files changed

+16
-0
lines changed

5 files changed

+16
-0
lines changed

intercom-java/src/main/java/io/intercom/api/Conversation.java

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -196,6 +196,9 @@ private static boolean isAdminQuery(Map<String, String> params) {
196196
@JsonProperty("updated_at")
197197
private long updatedAt;
198198

199+
@JsonProperty("waiting_since")
200+
private long waitingSince;
201+
199202
@JsonProperty("conversation_parts")
200203
private ConversationPartCollection conversationPartCollection;
201204

@@ -267,6 +270,10 @@ public long getUpdatedAt() {
267270
return updatedAt;
268271
}
269272

273+
public long getWaitingSince() {
274+
return waitingSince;
275+
}
276+
270277
public ConversationPartCollection getConversationPartCollection() {
271278
if (conversationPartCollection == null) {
272279
conversationPartCollection = find(this.getId()).getConversationPartCollection();
@@ -302,6 +309,7 @@ public boolean equals(Object o) {
302309
if (open != that.open) return false;
303310
if (read != that.read) return false;
304311
if (updatedAt != that.updatedAt) return false;
312+
if (waitingSince != that.waitingSince) return false;
305313
if (assignee != null ? !assignee.equals(that.assignee) : that.assignee != null) return false;
306314
if (conversationMessage != null ? !conversationMessage.equals(that.conversationMessage) : that.conversationMessage != null)
307315
return false;
@@ -327,6 +335,7 @@ public int hashCode() {
327335
result = 31 * result + (assignee != null ? assignee.hashCode() : 0);
328336
result = 31 * result + (int) (createdAt ^ (createdAt >>> 32));
329337
result = 31 * result + (int) (updatedAt ^ (updatedAt >>> 32));
338+
result = 31 * result + (int) (waitingSince ^ (waitingSince >>> 32));
330339
result = 31 * result + (conversationPartCollection != null ? conversationPartCollection.hashCode() : 0);
331340
result = 31 * result + (tagCollection != null ? tagCollection.hashCode() : 0);
332341
result = 31 * result + (open ? 1 : 0);
@@ -345,6 +354,7 @@ public String toString() {
345354
", assignee=" + assignee +
346355
", createdAt=" + createdAt +
347356
", updatedAt=" + updatedAt +
357+
", waitingSince=" + waitingSince +
348358
", conversationPartCollection=" + conversationPartCollection +
349359
", tagCollection=" + tagCollection +
350360
", open=" + open +

intercom-java/src/test/resources/conversation.json

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@
33
"id": "5143511111",
44
"created_at": 1466703132,
55
"updated_at": 1468236397,
6+
"waiting_since": 1468236397,
67
"conversation_message": {
78
"type": "conversation_message",
89
"id": "33954111",

intercom-java/src/test/resources/conversation_no_parts.json

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@
33
"id": "5143511111",
44
"created_at": 1466703132,
55
"updated_at": 1468236397,
6+
"waiting_since": 1468236397,
67
"conversation_message": {
78
"type": "conversation_message",
89
"id": "33954111",

intercom-java/src/test/resources/conversation_no_tags.json

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@
33
"id": "5143511111",
44
"created_at": 1466703132,
55
"updated_at": 1468236397,
6+
"waiting_since": 1468236397,
67
"conversation_message": {
78
"type": "conversation_message",
89
"id": "33954111",

intercom-java/src/test/resources/conversations.json

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,7 @@
1313
"id": "5680931777",
1414
"created_at": 1471438637,
1515
"updated_at": 1471438637,
16+
"waiting_since": 1468236397,
1617
"user": {
1718
"type": "user",
1819
"id": "57b45f16d1aad7e69e011111"
@@ -41,6 +42,7 @@
4142
"id": "5680912811",
4243
"created_at": 1471438151,
4344
"updated_at": 1471438151,
45+
"waiting_since": 1468236397,
4446
"user": {
4547
"type": "user",
4648
"id": "57b45bfef436c8d78611111"
@@ -69,6 +71,7 @@
6971
"id": "5143511111",
7072
"created_at": 1466703132,
7173
"updated_at": 1468236397,
74+
"waiting_since": 1468236397,
7275
"user": {
7376
"type": "lead",
7477
"id": "576c1a139d0baad101001111"

0 commit comments

Comments
 (0)