Skip to content

ReservesNodeBuilder

Builds a ReservesNode from the claim's Guidewire reserves (Claim.GetGwReserves()), setting the effective date and populating category-level reserve details in the exact order specified by a caller-supplied cost-category code array, matching each code case-insensitively against the reserve's category details.

Purpose

  • Copies the reserves effective date from the claim's Guidewire reserves data.
  • Adds one reserve category detail per code in the supplied sort order, in that order, so consumers receive reserves in a predictable, consistent category sequence rather than the source data's native order.

Context

  • Namespace: SAIF.Services.Claims.Information.Api
  • Assembly/package: SAIF.Services (packaged inside the SAIF.SAIFCode.Core NuGet package)

Public members

Member Signature Purpose
Node public ReservesNode Node { get; } Exposes the node instance being populated by this builder.
ReservesNodeBuilder(claim, node, categoryOrder, displayAll) public ReservesNodeBuilder(Claim claim, ReservesNode node, string[] categoryOrder, bool displayAll = false) Stores the claim, node, and cost-category sort order; the displayAll parameter is accepted but currently unused by the class.
AddReserves() public ReservesNodeBuilder AddReserves() Sets EffectiveDate from the claim's Guidewire reserves, then adds one matching ReserveCategoryDetail per code in _sortOrder, skipping codes with no matching detail.

Behavioral notes

  • Category matching uses String.Equals(..., StringComparison.CurrentCultureIgnoreCase), so case differences between the requested sort order and the source category codes do not prevent a match.
  • The displayAll constructor parameter is marked with a code-analysis suppression for being unused, indicating a currently inert/reserved flag.*

Constraints and usage notes

  • Reserve categories not present in the supplied categoryOrder array are never added to Node.CategoryDetails, even if present in the underlying reserves data.

Note: Statements marked with * were inferred from code structure, naming conventions, or contextual evidence where direct confirmation was not available in source artifacts. Statements marked with ** could not be confirmed; treat as unknown until verified.

Sources

  • Services/SAIF.Services/Claims/Information/Api/ReservesNodeBuilder.cs