From 14cee97bdb6df30ba159408d11047e37087d9e92 Mon Sep 17 00:00:00 2001
From: donalnofrixion <89344328+donalnofrixion@users.noreply.github.com>
Date: Mon, 25 Nov 2024 16:07:32 +0000
Subject: [PATCH] Added authorisation props
---
.../Models/Payruns/Payrun.cs | 27 +++++++++++++++++++
1 file changed, 27 insertions(+)
diff --git a/src/NoFrixion.MoneyMoov/Models/Payruns/Payrun.cs b/src/NoFrixion.MoneyMoov/Models/Payruns/Payrun.cs
index 29edf91c..cd064a84 100644
--- a/src/NoFrixion.MoneyMoov/Models/Payruns/Payrun.cs
+++ b/src/NoFrixion.MoneyMoov/Models/Payruns/Payrun.cs
@@ -16,6 +16,7 @@
using NoFrixion.MoneyMoov.Enums;
using NoFrixion.MoneyMoov.Extensions;
+using NoFrixion.MoneyMoov.Models.Approve;
namespace NoFrixion.MoneyMoov.Models;
@@ -56,4 +57,30 @@ public class Payrun
public bool CanEdit => Status.CanEdit();
public bool CanDelete => Status.CanDelete();
+
+ ///
+ /// The number of authorisers required for this payrun. 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 payrun.
+ ///
+ public int AuthorisersCompletedCount { get; set; }
+
+ ///
+ /// True if the payrun can be authorised by the user who loaded it.
+ ///
+ public bool CanAuthorise { get; set; }
+
+ ///
+ /// True if the payrun was loaded for a user and that user has already authorised the latest version of the payrun.
+ ///
+ public bool HasCurrentUserAuthorised { get; set; }
+
+ ///
+ /// A list of the users who have successfully authorised the latest version of the payrun and when.
+ ///
+ public List? Authorisations { get; set; }
}
\ No newline at end of file