Skip to content

Commit

Permalink
Added authorisation props
Browse files Browse the repository at this point in the history
  • Loading branch information
donalnofrixion committed Nov 25, 2024
1 parent 6e16c43 commit 14cee97
Showing 1 changed file with 27 additions and 0 deletions.
27 changes: 27 additions & 0 deletions src/NoFrixion.MoneyMoov/Models/Payruns/Payrun.cs
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@

using NoFrixion.MoneyMoov.Enums;
using NoFrixion.MoneyMoov.Extensions;
using NoFrixion.MoneyMoov.Models.Approve;

namespace NoFrixion.MoneyMoov.Models;

Expand Down Expand Up @@ -56,4 +57,30 @@ public class Payrun
public bool CanEdit => Status.CanEdit();

public bool CanDelete => Status.CanDelete();

/// <summary>
/// The number of authorisers required for this payrun. 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 payrun.
/// </summary>
public int AuthorisersCompletedCount { get; set; }

/// <summary>
/// True if the payrun can be authorised by the user who loaded it.
/// </summary>
public bool CanAuthorise { get; set; }

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

/// <summary>
/// A list of the users who have successfully authorised the latest version of the payrun and when.
/// </summary>
public List<Authorisation>? Authorisations { get; set; }
}

0 comments on commit 14cee97

Please sign in to comment.