FinancialDataApiClient¶
Concrete client for the Guidewire ClaimCenter FinancialDataApi. It extends HttpClientBase, resolving its base URL from the cc.financial.api.url.v1 configuration key and Basic-auth credentials from cc.gwcreds, and implements IFinancialDataApiClient by creating checks and recoveries and by querying payments and check-related bill data.
Purpose¶
- Creates check and recovery financial transactions against a claim, surfacing non-success responses and transport failures as thrown exceptions with status/content details.
- Retrieves payment records filtered by invoice number or issue date, with an option to include zero-pay payments, and retrieves bill details for a given check number.
Context¶
- Namespace:
SAIF.Data.Guidewire.Clients - Assembly/package:
SAIF.Data.Guidewire(packaged inSAIF.SAIFCode.Core)
Public members¶
| Member | Signature | Purpose |
|---|---|---|
| UrlKey | protected override string UrlKey => "cc.financial.api.url.v1" |
Environment configuration key used to resolve this client's base URL, per SDG-BR-001 |
| AuthKey | protected override string AuthKey => "cc.gwcreds" |
Environment secure-configuration key used to resolve Basic auth credentials, per SDG-BR-002 |
| FinancialDataApiClient(IEnvironmentService, HttpClient, SystemType, string) | [Obsolete] public FinancialDataApiClient(IEnvironmentService environmentService, HttpClient client, SystemType systemType, string baseUrlOverride = "") |
Obsolete constructor; forwards to HttpClientBase's obsolete overload, which builds a DataClientConfiguration with UseCache = false and ignores baseUrlOverride |
| FinancialDataApiClient(IEnvironmentService, HttpClient, IDataClientConfiguration, IReadOnlyPolicyRegistry\<string>) | public FinancialDataApiClient(IEnvironmentService environmentService, HttpClient client, IDataClientConfiguration configuration, IReadOnlyPolicyRegistry<string> policyRegistry) |
Primary constructor; delegates directly to HttpClientBase's primary constructor |
| CreateCheckAsync(long, CheckFinancialData) | public Task<string> CreateCheckAsync(long claimId, CheckFinancialData data) |
Serializes data and synchronously blocks on a POST to {BaseAddress}{claimId}/check; throws per SDG-BR-011 on transport errors or a non-success response, otherwise returns the raw response body |
| CreateRecoveryAsync(long, RecoveryFinancialData) | public Task<string> CreateRecoveryAsync(long claimId, RecoveryFinancialData data) |
Serializes data and asynchronously POSTs to {BaseAddress}{claimId}/recovery; throws per SDG-BR-011 on transport errors or a non-success response, otherwise returns the raw response body |
| GetPaymentsByInvoiceNumber(string, bool) | public Task<PaymentsResponse> GetPaymentsByInvoiceNumber(string invoiceNumber, bool includeZeroPays = false) |
Cached GET of payments?invoiceNumber={urlEncoded}, appending &includeZeroPays=true (lowercase) only when includeZeroPays is true |
| GetPaymentsByIssueDate(DateTime, bool) | public Task<PaymentsResponse> GetPaymentsByIssueDate(DateTime issueDate, bool includeZeroPays = false) |
Cached GET of payments?issueDate={urlEncoded, JSON_DATE_FORMAT}, appending &includeZeroPays=true (lowercase) only when requested, per SDG-BR-013 |
| GetBillDetailsForCheckNumber(long) | public Task<CheckBillData> GetBillDetailsForCheckNumber(long checkNumber) |
Cached GET of checks/{checkNumber}, returning claim/invoice info related to the check |
Inherited public members¶
| Member | Signature | Purpose | Origin |
|---|---|---|---|
| Client | protected HttpClient Client { get; } |
Returns the underlying HttpClient, initializing Basic auth on first access† |
SAIF.Data.Guidewire — HttpClientBase |
| GetAsync(string, bool, CancellationToken) | protected Task<string> GetAsync(string url, bool ensureSuccess = false, CancellationToken cancellationToken = default) |
Issues an uncached GET and returns the raw response body† | SAIF.Data.Guidewire — HttpClientBase |
| GetAsyncCached\<T>(string, bool, CancellationToken) | protected Task<T> GetAsyncCached<T>(string url, bool ensureSuccess = false, CancellationToken cancellationToken = default) |
Executes a cached GET through the configured Polly policy and deserializes the body as T† |
SAIF.Data.Guidewire — HttpClientBase |
| GetAsyncCached\<T>(string, string, bool, CancellationToken) | protected Task<T> GetAsyncCached<T>(string url, string body, bool ensureSuccess = false, CancellationToken cancellationToken = default) |
Executes a cached POST with a JSON body through the configured Polly policy and deserializes the response as T† |
SAIF.Data.Guidewire — HttpClientBase |
Behavioral notes¶
CreateCheckAsyncblocks the calling thread viaGetAwaiter().GetResult()for the POST call itself (documented in the source as intentional, to force Polly/HttpClient pipeline failures to surface at this call site for batch logging), while the subsequent content read remains asynchronous.CreateRecoveryAsyncperforms the POST asynchronously (no blockingGetAwaiter().GetResult()), unlikeCreateCheckAsync.- Both
CreateCheckAsyncandCreateRecoveryAsyncconstruct the request URL by concatenatingClient.BaseAddresswith the claim id and a literal path segment, rather than using a relative path passed toClient.PostAsync. - Zero-pay inclusion for both payment lookup methods only appends the query parameter when
includeZeroPaysis true; the API is documented in source as rejecting non-lowercase boolean literals, per SDG-BR-013. - The obsolete constructor always disables caching for this client and ignores any
baseUrlOverridevalue.
Constraints and usage notes¶
- Depends on
HttpClientBase(documented in this same doc set) for base-address resolution, authentication, and the cached GET/POST helpers. GetPaymentsByIssueDateformatsissueDateusingHttpClientHelper.JSON_DATE_FORMAT("yyyy-MM-dd") before URL-encoding it.
Note: Statements marked with † are derived from dependency library documentation via the Legends CLI. They describe inherited behavior from the indicated origin library and should be verified if the dependency version changes.
Sources¶
Data/SAIF.Data.Guidewire/Clients/FinancialDataApiClient.csData/SAIF.Data.Guidewire/Clients/HttpClientBase.csData/SAIF.Data.Guidewire/Clients/HttpClientHelper.cs