Class ColoradoAddressUpdateService
- Namespace
- SEBT.Portal.StatePlugins.CO
- Assembly
- SEBT.Portal.StatePlugins.CO.dll
Colorado address updates via CBMS update-std-dtls (student mailing address).
Resolves the household with get-account-details using SEBT.Portal.StatePlugins.CO.PhoneNormalizer on
HouseholdIdentifierValue; uses the same normalization as ColoradoSummerEbtCaseService phone lookup.
When multiple children are on the account, CBMS receives one PATCH whose body is an array of update payloads
(same portal address mapped per student row from get-account-details).
Successful updates require CBMS respCd 200 (OpenAPI example) or 00 (observed UAT); other codes are failure.
After a successful PATCH the cached household response is updated in-memory and written through to the cache
so that subsequent reads reflect the change without a round-trip to CBMS.
[Export(typeof(IAddressUpdateService))]
[Export(typeof(IStatePlugin))]
[ExportMetadata("StateCode", "CO")]
public class ColoradoAddressUpdateService : ColoradoCbmsServiceBase, IAddressUpdateService, IStatePlugin
- Inheritance
-
objectColoradoAddressUpdateService
- Implements
- Inherited Members
Constructors
ColoradoAddressUpdateService(IServiceProvider, IConfiguration?, ILoggerFactory?, HybridCache?)
[ImportingConstructor]
public ColoradoAddressUpdateService(IServiceProvider hostProvider, IConfiguration? configuration = null, ILoggerFactory? loggerFactory = null, HybridCache? cache = null)
Parameters
hostProviderIServiceProviderconfigurationIConfigurationloggerFactoryILoggerFactorycacheHybridCache
Methods
GetOrCreateClient(CbmsConnectionOptions)
Overrides the base GetOrCreateClient(CbmsConnectionOptions) when a test HTTP handler has been injected via the internal constructor. This preserves the test seam for the PATCH path while the read path is served by the SEBT.Portal.StatePlugins.CO.Cbms.Cache.PluginCache substitute. In production (where SEBT.Portal.StatePlugins.CO.ColoradoAddressUpdateService._testHttpMessageHandler is null) the base implementation is used.
protected CbmsSebtApiClient GetOrCreateClient(CbmsConnectionOptions options)
Parameters
optionsCbmsConnectionOptions
Returns
UpdateAddressAsync(AddressUpdateRequest, CancellationToken)
Persists a mailing address update for the identified household.
public Task<AddressUpdateResult> UpdateAddressAsync(AddressUpdateRequest request, CancellationToken cancellationToken = default)
Parameters
requestAddressUpdateRequestThe address update request containing household identifier and new address.
cancellationTokenCancellationTokenCancellation token.
Returns
- Task<AddressUpdateResult>
Result indicating success, policy rejection, or backend error.