GetResult<Agency> deserializes the response body directly into an Agency, so
the member returns the entity with no envelope unwrapping. A 404 from the API
is translated by JsonHttpClient into a null result rather than an
exception,† so callers must null-check before dereferencing. All other
non-success statuses throw.
The guard clause is the only client-side validation on this member; agency
number format is not checked, so a malformed number reaches the API and
returns null.
No caching. Two consecutive calls for the same agency number issue two
requests.
GetResults<AgencySummary> deserializes the response body's array into an
IList<AgencySummary>. A search that matches nothing returns an empty list, not
null and not an exception, so callers should test Count rather than
null-check.
The API caps a search at 200 summaries and does not paginate; the client
neither detects nor reports truncation.
AgencySummary is a projection, not Agency: it carries agency number, name,
producer code, and status only. Callers that need mailing or contact details
follow up with GetAgency.
GetResults<Agent> deserializes the response array into an IList<Agent>. An
agency with no active agents returns an empty list. An agency number that does
not exist also returns an empty list rather than null, because the API answers
200 with an empty array for an unknown parent; callers that need to
distinguish the two cases call GetAgency first.
PutJson<AgencyContact> returns an envelope, from which this member selects
Results.FirstOrDefault() and returns the resulting AgencyContact.† The
returned record reflects the API's normalization — state lowered to a two-letter
code, phone digits stripped of formatting — so a caller that needs the stored
form should use the return value rather than the object it sent.
This is a replacement, not a merge. A null or omitted property on
AgencyContactUpdate clears the stored value; the client does not read the
current contact record first.
Results.FirstOrDefault() returns null if the API ever answers with an
empty envelope. No caller has observed this, but the member does not guard
against it.
The call is not idempotent from an audit perspective: the API writes an
AGENCY.CONTACT_AUDIT row per request even when the values are unchanged.*
Note: Statements marked with † were retrieved from dependency library documentation
via the Legends CLI RAG service. They describe inherited behavior from the indicated
origin library and should be verified if the dependency version changes.