Table of Contents

Class SmartyAddressVerificationService

Namespace
SEBT.Portal.Infrastructure.Services
Assembly
SEBT.Portal.Infrastructure.dll

Calls Smarty US Street Address API to validate and normalize US mailing addresses.

public sealed class SmartyAddressVerificationService : IAddressVerificationService
Inheritance
object
SmartyAddressVerificationService
Implements

Constructors

SmartyAddressVerificationService(IHttpClientFactory, IOptionsSnapshot<SmartySettings>, IOptionsSnapshot<AddressValidationPolicySettings>, ILogger<SmartyAddressVerificationService>)

Calls Smarty US Street Address API to validate and normalize US mailing addresses.

public SmartyAddressVerificationService(IHttpClientFactory httpClientFactory, IOptionsSnapshot<SmartySettings> smartySettingsSnapshot, IOptionsSnapshot<AddressValidationPolicySettings> policySettingsSnapshot, ILogger<SmartyAddressVerificationService> logger)

Parameters

httpClientFactory IHttpClientFactory
smartySettingsSnapshot IOptionsSnapshot<SmartySettings>
policySettingsSnapshot IOptionsSnapshot<AddressValidationPolicySettings>
logger ILogger<SmartyAddressVerificationService>

Methods

ValidateAndNormalizeAsync(AddressUpdateOperationRequest, CancellationToken)

Validates the address with Smarty (or pass-through when disabled), applies per-state policy (e.g. General Delivery), and returns a normalized address or structured validation errors.

public Task<Result<AddressUpdateSuccess>> ValidateAndNormalizeAsync(AddressUpdateOperationRequest request, CancellationToken cancellationToken = default)

Parameters

request AddressUpdateOperationRequest
cancellationToken CancellationToken

Returns

Task<Result<AddressUpdateSuccess>>