Table of Contents

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
object
SelfServiceEvaluator
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

optionsMonitor IOptionsMonitor<SelfServiceRulesSettings>
timeProvider TimeProvider
outageSchedule IOptionsMonitor<OutageScheduleSettings>
logger ILogger<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

summerEbtCase SummerEbtCase

Returns

AllowedActions

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

summerEbtCases IReadOnlyList<SummerEbtCase>

Returns

AllowedActions

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

summerEbtCase SummerEbtCase

Returns

BenefitExpirationStatus?

The status, or null when neither applies or the case has no expiration date.