Class CardReplacementResult
- Namespace
- SEBT.Portal.StatesPlugins.Interfaces.Models.Household
- Assembly
- SEBT.Portal.StatesPlugins.Interfaces.dll
Result of a card replacement request from a state connector. Distinguishes success, policy rejection (household not eligible), and backend errors.
public class CardReplacementResult
- Inheritance
-
objectCardReplacementResult
Properties
ErrorCode
Machine-readable error code for frontend/analytics consumption.
public string? ErrorCode { get; init; }
Property Value
- string
ErrorMessage
Human-readable error message.
public string? ErrorMessage { get; init; }
Property Value
- string
IsPolicyRejection
Whether the failure is a policy rejection (household not eligible for portal card replacement) rather than a technical backend error.
public bool IsPolicyRejection { get; init; }
Property Value
- bool
IsSuccess
Whether the replacement was successfully initiated.
public bool IsSuccess { get; init; }
Property Value
- bool
Methods
BackendError(string, string)
The state backend returned an error.
public static CardReplacementResult BackendError(string code, string message)
Parameters
codestringmessagestring
Returns
PolicyRejected(string, string)
The household is not eligible to request a replacement via the portal.
public static CardReplacementResult PolicyRejected(string code, string message)
Parameters
codestringmessagestring
Returns
Success()
The replacement was initiated successfully.
public static CardReplacementResult Success()