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; } }