Table of Contents

Class UpdateAddressCommand

Namespace
SEBT.Portal.UseCases.Household
Assembly
SEBT.Portal.UseCases.dll

Command to update the mailing address for an authenticated user's household.

public class UpdateAddressCommand : ICommand<AddressValidationResult>, ICommand
Inheritance
object
UpdateAddressCommand
Implements

Properties

AcceptEnteredAddress

When true and address verification produced a normalized suggestion, persist the command fields (what the user entered) instead of returning another suggestion. Used after the user explicitly chooses "address you entered" on the suggestion screen.

public bool AcceptEnteredAddress { get; init; }

Property Value

bool

City

[Required(ErrorMessage = "City is required.")]
[RegularExpression("\\S.*", ErrorMessage = "City cannot be whitespace only.")]
public required string City { get; init; }

Property Value

string

PostalCode

[Required(ErrorMessage = "Postal code is required.")]
[RegularExpression("^\\d{5}(-\\d{4})?$", ErrorMessage = "Postal code must be a valid 5- or 9-digit ZIP code.")]
public required string PostalCode { get; init; }

Property Value

string

State

[Required(ErrorMessage = "State is required.")]
[RegularExpression("\\S.*", ErrorMessage = "State cannot be whitespace only.")]
public required string State { get; init; }

Property Value

string

StreetAddress1

[Required(ErrorMessage = "Street address is required.")]
[RegularExpression("\\S.*", ErrorMessage = "Street address cannot be whitespace only.")]
public required string StreetAddress1 { get; init; }

Property Value

string

StreetAddress2

public string? StreetAddress2 { get; init; }

Property Value

string

User

The authenticated user's claims principal, used to resolve household identity.

[Required]
public required ClaimsPrincipal User { get; init; }

Property Value

ClaimsPrincipal