Skip to content

Commit

Permalink
Merge pull request #248 from nofrixion/MOOV-2535-Added-properties-to-…
Browse files Browse the repository at this point in the history
…Beneficiary-model
  • Loading branch information
sauravmaiti22 authored Nov 27, 2023
2 parents 287d8c5 + f6c3a02 commit c7459c3
Showing 1 changed file with 26 additions and 1 deletion.
27 changes: 26 additions & 1 deletion src/NoFrixion.MoneyMoov/Models/Beneficiary/Beneficiary.cs
Original file line number Diff line number Diff line change
Expand Up @@ -57,6 +57,31 @@ public class Beneficiary : IValidatableObject

public bool IsEnabled { get; set; }

/// <summary>
/// A list of the email addresses of all the users who have usccessfully authorised the latest version of the beneficiary.
/// </summary>
[CanBeNull] public List<string> AuthorisedBy { get; set; }

/// <summary>
/// True if the beneficiary was loaded for a user and that user has already authorised the latest version of the beneficiary.
/// </summary>
public bool HasCurrentUserAuthorised { get; set; }

/// <summary>
/// The number of authorisers required for this beneficiary. Is determined by business settings
/// on the source account and/or merchant.
/// </summary>
public int AuthorisersRequiredCount { get; set; }

/// <summary>
/// The number of distinct authorisers that have authorised the beneficiary.
/// </summary>
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.
Expand All @@ -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);
}
Expand Down

0 comments on commit c7459c3

Please sign in to comment.