diff --git a/Vonage.Test/Messages/WhatsApp/Data/SendWhatsAppFileAsyncReturnsOk-request.json b/Vonage.Test/Messages/WhatsApp/Data/SendWhatsAppFileAsyncReturnsOk-request.json index ada64bcd..54480289 100644 --- a/Vonage.Test/Messages/WhatsApp/Data/SendWhatsAppFileAsyncReturnsOk-request.json +++ b/Vonage.Test/Messages/WhatsApp/Data/SendWhatsAppFileAsyncReturnsOk-request.json @@ -6,7 +6,8 @@ "client_ref": "abcdefg", "file": { "url": "https://test.com/me.txt", - "caption": "Me" + "caption": "Me", + "name": "file.txt" }, "webhook_version": "v1", "webhook_url": "https://example.com/status" diff --git a/Vonage.Test/Messages/WhatsApp/Data/SendWhatsAppFileAsyncReturnsOkWithContext-request.json b/Vonage.Test/Messages/WhatsApp/Data/SendWhatsAppFileAsyncReturnsOkWithContext-request.json index f3c4f59d..24ad35a4 100644 --- a/Vonage.Test/Messages/WhatsApp/Data/SendWhatsAppFileAsyncReturnsOkWithContext-request.json +++ b/Vonage.Test/Messages/WhatsApp/Data/SendWhatsAppFileAsyncReturnsOkWithContext-request.json @@ -6,7 +6,8 @@ "client_ref": "abcdefg", "file": { "url": "https://test.com/me.txt", - "caption": "Me" + "caption": "Me", + "name": "file.txt" }, "context": { "message_uuid": "a1b2c3d4a1b2c3d4" diff --git a/Vonage.Test/Messages/WhatsApp/WhatsAppMessagesTest.cs b/Vonage.Test/Messages/WhatsApp/WhatsAppMessagesTest.cs index 6437a72b..40a0bab5 100644 --- a/Vonage.Test/Messages/WhatsApp/WhatsAppMessagesTest.cs +++ b/Vonage.Test/Messages/WhatsApp/WhatsAppMessagesTest.cs @@ -143,6 +143,7 @@ public async Task SendWhatsAppFileAsyncReturnsOk() { Url = "https://test.com/me.txt", Caption = "Me", + Name = "file.txt", }, ClientRef = "abcdefg", WebhookUrl = new Uri("https://example.com/status"), @@ -163,6 +164,7 @@ public async Task SendWhatsAppFileAsyncReturnsOkWithContext() { Url = "https://test.com/me.txt", Caption = "Me", + Name = "file.txt", }, ClientRef = "abcdefg", Context = new WhatsAppContext("a1b2c3d4a1b2c3d4"), diff --git a/Vonage/Messages/CaptionedAttachment.cs b/Vonage/Messages/CaptionedAttachment.cs index df10ce21..922ca3fb 100644 --- a/Vonage/Messages/CaptionedAttachment.cs +++ b/Vonage/Messages/CaptionedAttachment.cs @@ -1,4 +1,6 @@ -using System.Text.Json.Serialization; +#region +using System.Text.Json.Serialization; +#endregion namespace Vonage.Messages; @@ -18,4 +20,9 @@ public class CaptionedAttachment /// [JsonPropertyOrder(0)] public string Url { get; set; } + + /// + /// + [JsonPropertyOrder(2)] + public string Name { get; set; } } \ No newline at end of file