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

27 lines
888 B
C#

using LCU.Library.Internal.IncentiveApiModels.Entities;
using LCU.Library.Internal.IncentiveApiModels.Enums;
using LCU.API.Internal.Operations.IncentiveApi.Models;
namespace LCU.API.Internal.Operations.IncentiveApi.Services.Rules;
public class NewCheckingReferralRule : IPayoutRule
{
public static readonly int MemberServicesGlCode = 200;
public NewCheckingReferralRule(int memberServicesDepartmentId)
{
MemberServiceDeptId = memberServicesDepartmentId;
}
private int MemberServiceDeptId { get; }
public bool RestrictedByPayoutRule(Activity activity, Product countsForProduct)
{
var result = countsForProduct == activity.Product
&& activity.Product == Product.NewChecking
&& activity.Type == ActivityType.Referral
&& activity.DepartmentId != MemberServiceDeptId;
return result;
}
}