Skip to content

Commit 4a40d45

Browse files
Merge pull request #469 from nofrixion/feature/MOOV-3832-payrun-auth
Added authorisation props
2 parents 6e16c43 + 14cee97 commit 4a40d45

File tree

1 file changed

+27
-0
lines changed
  • src/NoFrixion.MoneyMoov/Models/Payruns

1 file changed

+27
-0
lines changed

src/NoFrixion.MoneyMoov/Models/Payruns/Payrun.cs

Lines changed: 27 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,7 @@
1616

1717
using NoFrixion.MoneyMoov.Enums;
1818
using NoFrixion.MoneyMoov.Extensions;
19+
using NoFrixion.MoneyMoov.Models.Approve;
1920

2021
namespace NoFrixion.MoneyMoov.Models;
2122

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

5859
public bool CanDelete => Status.CanDelete();
60+
61+
/// <summary>
62+
/// The number of authorisers required for this payrun. Is determined by business settings
63+
/// on the source account and/or merchant.
64+
/// </summary>
65+
public int AuthorisersRequiredCount { get; set; }
66+
67+
/// <summary>
68+
/// The number of distinct authorisers that have authorised the payrun.
69+
/// </summary>
70+
public int AuthorisersCompletedCount { get; set; }
71+
72+
/// <summary>
73+
/// True if the payrun can be authorised by the user who loaded it.
74+
/// </summary>
75+
public bool CanAuthorise { get; set; }
76+
77+
/// <summary>
78+
/// True if the payrun was loaded for a user and that user has already authorised the latest version of the payrun.
79+
/// </summary>
80+
public bool HasCurrentUserAuthorised { get; set; }
81+
82+
/// <summary>
83+
/// A list of the users who have successfully authorised the latest version of the payrun and when.
84+
/// </summary>
85+
public List<Authorisation>? Authorisations { get; set; }
5986
}

0 commit comments

Comments
 (0)