PolicyHeaderService¶
Facade over IPolicyHeaderApiClient that fetches the policy header and its relationships and trims the associations an external user may see.
Purpose¶
- Load the header and, for external users with a customer id, replace associations (
POLCY) or filter them byAgencyId(AGNCY) (BR-BOLMIDDLEWARE-013).
Context¶
- Namespace:
BolMiddleware.Services.Headers.Policy - Assembly/package:
BolMiddleware
Public members¶
| Member | Signature | Purpose |
|---|---|---|
| Constructor | PolicyHeaderService(IPolicyHeaderApiClient client, ISaifLogService logService) |
Receives the API client and logger. |
GetHeader |
PolicyHeader GetHeader(long policyNumber, long? customerId, string? userTypeCode) |
Calls the API with the policy number and an external flag, then applies the POLCY or AGNCY branch when the customer id is above zero. |
GetRelationships |
List<PolicyAssociation> GetRelationships(long policyNumber) |
Calls the API for related policies. |
Behavioral notes¶
- Errors are logged by the facade; how they surface to callers is shown in the policy page model.
Constraints and usage notes¶
- The
AGNCYfilter is applied after the API call, so the API still returns every association; thePOLCYbranch replaces them from a second call.
Sources¶
- src/BolMiddleware/Services/Headers/Policy/PolicyHeaderService.cs