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 2778584 commit 572d1fa
Show file tree
Hide file tree
Showing 3 changed files with 105 additions and 21 deletions.
21 changes: 21 additions & 0 deletions src/Plivo/Resource/Message/Message.cs
Original file line number Diff line number Diff line change
Expand Up @@ -184,6 +184,24 @@ public class Message : Resource
/// <value>The log.</value>
public string Log { get; set; }

/// <summary>
/// Gets or sets the message_sent_time.
/// </summary>
/// <value>The message_sent_time.</value>
public string MessageSentTime { get; set; }

/// <summary>
/// Gets or sets the message_updated_time.
/// </summary>
/// <value>The message_updated_time.</value>
public string MessageUpdatedTime { get; set; }

/// <summary>
/// Gets or sets the error_message.
/// </summary>
/// <value>The error_message.</value>
public string ErrorMessage { get; set; }

public override string ToString()
{
return "\n" +
Expand Down Expand Up @@ -216,6 +234,9 @@ public override string ToString()
"ConversationID: " + ConversationId + "\n" +
"ConversationOrigin: " + ConversationOrigin + "\n" +
"ConversationExpirationTimestamp: " + ConversationExpirationTimestamp + "\n" +
"MessageSentTime: " + MessageSentTime + "\n" +
"MessageUpdatedTime: " + MessageUpdatedTime + "\n" +
"ErrorMessage: " + ErrorMessage + "\n" +
"Log: " + Log + "\n";
}
#region ListMedia
Expand Down
5 changes: 4 additions & 1 deletion tests/Plivo.Test/Mocks/messageGetResponse.json
Original file line number Diff line number Diff line change
Expand Up @@ -17,5 +17,8 @@
"dlt_template_category": "promotional",
"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": ""
}
100 changes: 80 additions & 20 deletions tests/Plivo.Test/Mocks/messageListResponse.json
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,10 @@
"dlt_template_category": "transactional",
"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 @@ -46,7 +49,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 @@ -66,7 +72,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 @@ -86,7 +95,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 @@ -106,7 +118,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 @@ -126,7 +141,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 @@ -146,7 +164,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 @@ -166,7 +187,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 @@ -186,7 +210,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 @@ -206,7 +233,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 @@ -226,7 +256,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 @@ -246,7 +279,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 @@ -266,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": null,
Expand All @@ -286,7 +325,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 @@ -306,7 +348,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 @@ -326,7 +371,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 @@ -346,7 +394,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 @@ -366,7 +417,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 @@ -386,7 +440,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 @@ -406,7 +463,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 572d1fa

Please sign in to comment.