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
-
objectSmartyAddressVerificationService
- 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
httpClientFactoryIHttpClientFactorysmartySettingsSnapshotIOptionsSnapshot<SmartySettings>policySettingsSnapshotIOptionsSnapshot<AddressValidationPolicySettings>loggerILogger<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
requestAddressUpdateOperationRequestcancellationTokenCancellationToken
Returns
- Task<Result<AddressUpdateSuccess>>