Class SelfServiceEvaluator
- Namespace
- SEBT.Portal.Infrastructure.Services
- Assembly
- SEBT.Portal.Infrastructure.dll
Evaluates self-service action permissions from SelfServiceRulesSettings. Uses permissive aggregation: if any application in the household is eligible, the action is allowed.
public class SelfServiceEvaluator : ISelfServiceEvaluator
- Inheritance
-
objectSelfServiceEvaluator
- Implements
Constructors
SelfServiceEvaluator(IOptionsMonitor<SelfServiceRulesSettings>, TimeProvider, IOptionsMonitor<OutageScheduleSettings>, ILogger<SelfServiceEvaluator>)
Evaluates self-service action permissions from SelfServiceRulesSettings. Uses permissive aggregation: if any application in the household is eligible, the action is allowed.
public SelfServiceEvaluator(IOptionsMonitor<SelfServiceRulesSettings> optionsMonitor, TimeProvider timeProvider, IOptionsMonitor<OutageScheduleSettings> outageSchedule, ILogger<SelfServiceEvaluator> logger)
Parameters
optionsMonitorIOptionsMonitor<SelfServiceRulesSettings>timeProviderTimeProvideroutageScheduleIOptionsMonitor<OutageScheduleSettings>loggerILogger<SelfServiceEvaluator>
Methods
Evaluate(SummerEbtCase)
Evaluates which self-service actions are permitted for a single case. Uses the case's own issuance type, card status, and (for card replacement) optional days-before-expiration cutoff. Self-service actions are case-scoped, not household-scoped.
public AllowedActions Evaluate(SummerEbtCase summerEbtCase)
Parameters
summerEbtCaseSummerEbtCase
Returns
EvaluateHousehold(IReadOnlyList<SummerEbtCase>)
Evaluates which self-service actions are permitted for the household as a whole. Uses permissive aggregation: if ANY case is eligible, the action is allowed. Used for top-level CTAs and for actions that operate on the household address rather than a specific case.
public AllowedActions EvaluateHousehold(IReadOnlyList<SummerEbtCase> summerEbtCases)
Parameters
summerEbtCasesIReadOnlyList<SummerEbtCase>
Returns
GetBenefitExpirationStatus(SummerEbtCase)
Classifies a case's benefits as expiring or expired using the state-local date. Expiring uses the card-replacement days-before-expiration window, so it covers the same days that window hides replacement; expired applies whether or not it is set.
public BenefitExpirationStatus? GetBenefitExpirationStatus(SummerEbtCase summerEbtCase)
Parameters
summerEbtCaseSummerEbtCase
Returns
- BenefitExpirationStatus?
The status, or null when neither applies or the case has no expiration date.