Files
monorepo/LCU.API.Operations.IncentiveAPI/LCU.API.Internal.Operations.IncentiveApi/Services/Rules/BusinessRuleService.cs
T
2026-03-17 09:53:09 -05:00

33 lines
967 B
C#

using LCU.Library.Internal.IncentiveApiModels.Enums;
using LCU.API.Internal.Operations.IncentiveApi.Models;
namespace LCU.API.Internal.Operations.IncentiveApi.Services.Rules;
public class BusinessRuleService : IBusinessRuleService
{
private readonly IDepartmentService _departmentService;
public BusinessRuleService(IDepartmentService departmentService)
{
_departmentService = departmentService;
}
public IReadOnlyCollection<IPayoutRule> GetRules(PayoutType type)
{
var dept = _departmentService
.GetDepartmentsByDayforceGlCodeAsync(NewCheckingReferralRule.MemberServicesGlCode).GetAwaiter()
.GetResult();
return type switch
{
PayoutType.Department => new List<IPayoutRule>()
{
new NewCheckingReferralRule(dept.Id.Value)
},
PayoutType.Personal => new List<IPayoutRule>()
{
}
};
}
}