Skip to content

Commit

Permalink
adding more attribute to message object
Browse files Browse the repository at this point in the history
  • Loading branch information
narayana-plivo committed Aug 22, 2024
1 parent 25d6345 commit 37272ea
Show file tree
Hide file tree
Showing 3 changed files with 99 additions and 21 deletions.
15 changes: 15 additions & 0 deletions src/main/java/com/plivo/api/models/message/Message.java
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand Down Expand Up @@ -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();
Expand Down
5 changes: 4 additions & 1 deletion src/test/resources/com/plivo/api/messageGetResponse.json
Original file line number Diff line number Diff line change
Expand Up @@ -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": ""
}
100 changes: 80 additions & 20 deletions src/test/resources/com/plivo/api/messageListResponse.json
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand All @@ -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,
Expand All @@ -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,
Expand All @@ -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,
Expand All @@ -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,
Expand All @@ -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,
Expand All @@ -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,
Expand All @@ -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",
Expand All @@ -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,
Expand All @@ -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",
Expand All @@ -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,
Expand All @@ -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",
Expand All @@ -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,
Expand All @@ -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",
Expand All @@ -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,
Expand All @@ -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",
Expand All @@ -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",
Expand All @@ -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",
Expand All @@ -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",
Expand All @@ -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": ""
}
]
}

0 comments on commit 37272ea

Please sign in to comment.