diff --git a/src/libs/Veryfi/Veryfi.SignRequest.cs b/src/libs/Veryfi/Veryfi.SignRequest.cs index 877f453..d8bd0fd 100644 --- a/src/libs/Veryfi/Veryfi.SignRequest.cs +++ b/src/libs/Veryfi/Veryfi.SignRequest.cs @@ -46,17 +46,13 @@ private async Task SignRequestAsync( var value = item.Value; if (value == null) continue; string stringValue; - switch (key) + if (value is JArray) { - case "categories": - stringValue = string.Join(",", value); - break; - case "file_urls": - stringValue = string.Join(",", value); - break; - default: - stringValue = (string) value!; - break; + stringValue = string.Join(",", value); + } + else + { + stringValue = (string) value!; } arguments.Add(key, stringValue); } diff --git a/src/tests/Veryfi.IntegrationTests/DocumentsTests.cs b/src/tests/Veryfi.IntegrationTests/DocumentsTests.cs index 922fb06..c8c2fd2 100644 --- a/src/tests/Veryfi.IntegrationTests/DocumentsTests.cs +++ b/src/tests/Veryfi.IntegrationTests/DocumentsTests.cs @@ -1,4 +1,5 @@ using System; +using System.Collections.Generic; using System.Linq; using System.Threading; using System.Threading.Tasks; @@ -245,12 +246,15 @@ public async Task ProcessBase64Test(string fileName) await BaseTests.ApiTestAsync(async (api, cancellationToken) => { string[] categories = { "Meals", "Fat" }; + var tags = new List { "TAG" }; + var documentResponse = await api.Documents2Async( new DocumentPOSTJSONRequest { File_name = file.FileName, File_data = Convert.ToBase64String(file.AsBytes()), - Categories = categories + Categories = categories, + Tags = tags }, cancellationToken);