diff --git a/src/TrueLayer/Payouts/Model/GetPayoutsResponse.cs b/src/TrueLayer/Payouts/Model/GetPayoutsResponse.cs index 9212a31d..c1a62c4d 100644 --- a/src/TrueLayer/Payouts/Model/GetPayoutsResponse.cs +++ b/src/TrueLayer/Payouts/Model/GetPayoutsResponse.cs @@ -1,4 +1,5 @@ using System; +using System.Collections.Generic; using System.Text.Json.Serialization; using OneOf; using TrueLayer.Serialization; @@ -61,6 +62,11 @@ public record PayoutDetails /// Gets the scheme id /// public string? SchemeId { get; init; } = null; + + /// + /// Gets metadata of the payout + /// + public Dictionary? Metadata { get; init; } } /// diff --git a/test/TrueLayer.AcceptanceTests/PayoutTests.cs b/test/TrueLayer.AcceptanceTests/PayoutTests.cs index f480225e..90bc7b63 100644 --- a/test/TrueLayer.AcceptanceTests/PayoutTests.cs +++ b/test/TrueLayer.AcceptanceTests/PayoutTests.cs @@ -58,6 +58,7 @@ public async Task Can_get_payout() details.Beneficiary.AsT1.ShouldNotBeNull(); details.Status.ShouldBeOneOf("pending", "authorized", "executed", "failed"); details.CreatedAt.ShouldNotBeOneOf(DateTime.MinValue, DateTime.MaxValue); + details.Metadata.ShouldBe(payoutRequest.Metadata); } public Task DisposeAsync() => Task.CompletedTask;