From f6c3a02cecc3f4df27f56a567b5d4b412448cd1e Mon Sep 17 00:00:00 2001 From: Saurav Maiti Date: Mon, 27 Nov 2023 18:52:38 +0000 Subject: [PATCH] Added properties to Beneficiary model --- .../Models/Beneficiary/Beneficiary.cs | 27 ++++++++++++++++++- 1 file changed, 26 insertions(+), 1 deletion(-) diff --git a/src/NoFrixion.MoneyMoov/Models/Beneficiary/Beneficiary.cs b/src/NoFrixion.MoneyMoov/Models/Beneficiary/Beneficiary.cs index b713e108..89cb8817 100644 --- a/src/NoFrixion.MoneyMoov/Models/Beneficiary/Beneficiary.cs +++ b/src/NoFrixion.MoneyMoov/Models/Beneficiary/Beneficiary.cs @@ -57,6 +57,31 @@ public class Beneficiary : IValidatableObject public bool IsEnabled { get; set; } + /// + /// A list of the email addresses of all the users who have usccessfully authorised the latest version of the beneficiary. + /// + [CanBeNull] public List AuthorisedBy { get; set; } + + /// + /// True if the beneficiary was loaded for a user and that user has already authorised the latest version of the beneficiary. + /// + public bool HasCurrentUserAuthorised { get; set; } + + /// + /// The number of authorisers required for this beneficiary. Is determined by business settings + /// on the source account and/or merchant. + /// + public int AuthorisersRequiredCount { get; set; } + + /// + /// The number of distinct authorisers that have authorised the beneficiary. + /// + public int AuthorisersCompletedCount { get; set; } + + public string CreatedByEmailAddress { get; set; } + + public string Nonce { get; set; } + public DateTimeOffset LastUpdated { get; set; } // Don't serialize the events if there are none. @@ -81,7 +106,7 @@ public string GetApprovalHash() : string.Empty) + Currency + Destination.GetApprovalHash() - + LastUpdated.ToString("o"); + + (string.IsNullOrEmpty(Nonce) ? string.Empty : Nonce); return HashHelper.CreateHash(input); }