From 37272ea15b38712ec6ede8262f226d917265dd3d Mon Sep 17 00:00:00 2001 From: narayana-plivo Date: Thu, 22 Aug 2024 11:26:09 +0530 Subject: [PATCH] adding more attribute to message object --- .../com/plivo/api/models/message/Message.java | 15 +++ .../com/plivo/api/messageGetResponse.json | 5 +- .../com/plivo/api/messageListResponse.json | 100 ++++++++++++++---- 3 files changed, 99 insertions(+), 21 deletions(-) diff --git a/src/main/java/com/plivo/api/models/message/Message.java b/src/main/java/com/plivo/api/models/message/Message.java index 27d572a7..a96bfa28 100644 --- a/src/main/java/com/plivo/api/models/message/Message.java +++ b/src/main/java/com/plivo/api/models/message/Message.java @@ -34,6 +34,9 @@ public class Message extends BaseResource { private String conversationOrigin; private String conversationExpirationTimestamp; private String log; + private String errorMessage; + private String messageSentTime; + private String messageUpdateTime; public static MessageCreator creator(String source, String destination) { return new MessageCreator(source, destination); @@ -179,7 +182,19 @@ public String getConversationExpirationTimestamp() { public String getLog() { return log; } + + public String getErrorMessage(){ + return errorMessage; + } + public String getMessageSentTime(){ + return messageSentTime; + } + + public String getMessageUpdateTime(){ + return messageUpdateTime; + } + @Override public String getId() { return getMessageUuid(); diff --git a/src/test/resources/com/plivo/api/messageGetResponse.json b/src/test/resources/com/plivo/api/messageGetResponse.json index d2b1118d..60056f7b 100644 --- a/src/test/resources/com/plivo/api/messageGetResponse.json +++ b/src/test/resources/com/plivo/api/messageGetResponse.json @@ -19,5 +19,8 @@ "dlt_template_category": "service_implicit", "conversation_id": "9876", "conversation_origin": "utility", - "conversation_expiration_timestamp": "2023-08-03 23:02:00+05:30" + "conversation_expiration_timestamp": "2023-08-03 23:02:00+05:30", + "message_sent_time": "2024-08-21 18:28:49.244057+05:30", + "message_updated_time": "2024-08-21 18:28:51.94772+05:30", + "error_message": "" } \ No newline at end of file diff --git a/src/test/resources/com/plivo/api/messageListResponse.json b/src/test/resources/com/plivo/api/messageListResponse.json index 2bb11878..edbdde6e 100644 --- a/src/test/resources/com/plivo/api/messageListResponse.json +++ b/src/test/resources/com/plivo/api/messageListResponse.json @@ -27,7 +27,10 @@ "dlt_template_category": "service_explicit", "conversation_id": "1234", "conversation_origin": "service", - "conversation_expiration_timestamp": "2023-08-03 23:02:00+05:30" + "conversation_expiration_timestamp": "2023-08-03 23:02:00+05:30", + "message_sent_time": "2024-08-21 18:28:49.244057+05:30", + "message_updated_time": "2024-08-21 18:28:51.94772+05:30", + "error_message": "" }, { "error_code": null, @@ -49,7 +52,10 @@ "dlt_template_category": "", "conversation_id": "", "conversation_origin": "", - "conversation_expiration_timestamp": "" + "conversation_expiration_timestamp": "", + "message_sent_time": "2024-08-21 18:28:49.244057+05:30", + "message_updated_time": "2024-08-21 18:28:51.94772+05:30", + "error_message": "" }, { "error_code": null, @@ -71,7 +77,10 @@ "dlt_template_category": "", "conversation_id": "", "conversation_origin": "", - "conversation_expiration_timestamp": "" + "conversation_expiration_timestamp": "", + "message_sent_time": "2024-08-21 18:28:49.244057+05:30", + "message_updated_time": "2024-08-21 18:28:51.94772+05:30", + "error_message": "" }, { "error_code": null, @@ -93,7 +102,10 @@ "dlt_template_category": "", "conversation_id": "", "conversation_origin": "", - "conversation_expiration_timestamp": "" + "conversation_expiration_timestamp": "", + "message_sent_time": "2024-08-21 18:28:49.244057+05:30", + "message_updated_time": "2024-08-21 18:28:51.94772+05:30", + "error_message": "" }, { "error_code": null, @@ -115,7 +127,10 @@ "dlt_template_category": "", "conversation_id": "", "conversation_origin": "", - "conversation_expiration_timestamp": "" + "conversation_expiration_timestamp": "", + "message_sent_time": "2024-08-21 18:28:49.244057+05:30", + "message_updated_time": "2024-08-21 18:28:51.94772+05:30", + "error_message": "" }, { "error_code": null, @@ -137,7 +152,10 @@ "dlt_template_category": "", "conversation_id": "", "conversation_origin": "", - "conversation_expiration_timestamp": "" + "conversation_expiration_timestamp": "", + "message_sent_time": "2024-08-21 18:28:49.244057+05:30", + "message_updated_time": "2024-08-21 18:28:51.94772+05:30", + "error_message": "" }, { "error_code": null, @@ -159,7 +177,10 @@ "dlt_template_category": "", "conversation_id": "", "conversation_origin": "", - "conversation_expiration_timestamp": "" + "conversation_expiration_timestamp": "", + "message_sent_time": "2024-08-21 18:28:49.244057+05:30", + "message_updated_time": "2024-08-21 18:28:51.94772+05:30", + "error_message": "" }, { "error_code": null, @@ -181,7 +202,10 @@ "dlt_template_category": "", "conversation_id": "", "conversation_origin": "", - "conversation_expiration_timestamp": "" + "conversation_expiration_timestamp": "", + "message_sent_time": "2024-08-21 18:28:49.244057+05:30", + "message_updated_time": "2024-08-21 18:28:51.94772+05:30", + "error_message": "" }, { "error_code": "000", @@ -203,7 +227,10 @@ "dlt_template_category": "", "conversation_id": "", "conversation_origin": "", - "conversation_expiration_timestamp": "" + "conversation_expiration_timestamp": "", + "message_sent_time": "2024-08-21 18:28:49.244057+05:30", + "message_updated_time": "2024-08-21 18:28:51.94772+05:30", + "error_message": "" }, { "error_code": null, @@ -225,7 +252,10 @@ "dlt_template_category": "", "conversation_id": "", "conversation_origin": "", - "conversation_expiration_timestamp": "" + "conversation_expiration_timestamp": "", + "message_sent_time": "2024-08-21 18:28:49.244057+05:30", + "message_updated_time": "2024-08-21 18:28:51.94772+05:30", + "error_message": "" }, { "error_code": "000", @@ -247,7 +277,10 @@ "dlt_template_category": "", "conversation_id": "", "conversation_origin": "", - "conversation_expiration_timestamp": "" + "conversation_expiration_timestamp": "", + "message_sent_time": "2024-08-21 18:28:49.244057+05:30", + "message_updated_time": "2024-08-21 18:28:51.94772+05:30", + "error_message": "" }, { "error_code": null, @@ -269,7 +302,10 @@ "dlt_template_category": "", "conversation_id": "", "conversation_origin": "", - "conversation_expiration_timestamp": "" + "conversation_expiration_timestamp": "", + "message_sent_time": "2024-08-21 18:28:49.244057+05:30", + "message_updated_time": "2024-08-21 18:28:51.94772+05:30", + "error_message": "" }, { "error_code": "000", @@ -291,7 +327,10 @@ "dlt_template_category": "", "conversation_id": "", "conversation_origin": "", - "conversation_expiration_timestamp": "" + "conversation_expiration_timestamp": "", + "message_sent_time": "2024-08-21 18:28:49.244057+05:30", + "message_updated_time": "2024-08-21 18:28:51.94772+05:30", + "error_message": "" }, { "error_code": null, @@ -313,7 +352,10 @@ "dlt_template_category": "", "conversation_id": "", "conversation_origin": "", - "conversation_expiration_timestamp": "" + "conversation_expiration_timestamp": "", + "message_sent_time": "2024-08-21 18:28:49.244057+05:30", + "message_updated_time": "2024-08-21 18:28:51.94772+05:30", + "error_message": "" }, { "error_code": "000", @@ -335,7 +377,10 @@ "dlt_template_category": "", "conversation_id": "", "conversation_origin": "", - "conversation_expiration_timestamp": "" + "conversation_expiration_timestamp": "", + "message_sent_time": "2024-08-21 18:28:49.244057+05:30", + "message_updated_time": "2024-08-21 18:28:51.94772+05:30", + "error_message": "" }, { "error_code": null, @@ -357,7 +402,10 @@ "dlt_template_category": "", "conversation_id": "", "conversation_origin": "", - "conversation_expiration_timestamp": "" + "conversation_expiration_timestamp": "", + "message_sent_time": "2024-08-21 18:28:49.244057+05:30", + "message_updated_time": "2024-08-21 18:28:51.94772+05:30", + "error_message": "" }, { "error_code": "000", @@ -379,7 +427,10 @@ "dlt_template_category": "", "conversation_id": "", "conversation_origin": "", - "conversation_expiration_timestamp": "" + "conversation_expiration_timestamp": "", + "message_sent_time": "2024-08-21 18:28:49.244057+05:30", + "message_updated_time": "2024-08-21 18:28:51.94772+05:30", + "error_message": "" }, { "error_code": "000", @@ -401,7 +452,10 @@ "dlt_template_category": "", "conversation_id": "", "conversation_origin": "", - "conversation_expiration_timestamp": "" + "conversation_expiration_timestamp": "", + "message_sent_time": "2024-08-21 18:28:49.244057+05:30", + "message_updated_time": "2024-08-21 18:28:51.94772+05:30", + "error_message": "" }, { "error_code": "000", @@ -423,7 +477,10 @@ "dlt_template_category": "", "conversation_id": "", "conversation_origin": "", - "conversation_expiration_timestamp": "" + "conversation_expiration_timestamp": "", + "message_sent_time": "2024-08-21 18:28:49.244057+05:30", + "message_updated_time": "2024-08-21 18:28:51.94772+05:30", + "error_message": "" }, { "error_code": "000", @@ -445,7 +502,10 @@ "dlt_template_category": "", "conversation_id": "", "conversation_origin": "", - "conversation_expiration_timestamp": "" + "conversation_expiration_timestamp": "", + "message_sent_time": "2024-08-21 18:28:49.244057+05:30", + "message_updated_time": "2024-08-21 18:28:51.94772+05:30", + "error_message": "" } ] } \ No newline at end of file