Class ProviderCall
- Namespace
- Integrations.Application.Common
- Assembly
- Integrations.Application.dll
One call to an external provider, as recorded for audit.
public sealed record ProviderCall : IEquatable<ProviderCall>
- Inheritance
-
ProviderCall
- Implements
- Inherited Members
Constructors
ProviderCall(string, string, string?, bool, TimeSpan, string?, string?, string?)
One call to an external provider, as recorded for audit.
public ProviderCall(string Provider, string Operation, string? SubjectId, bool Succeeded, TimeSpan Duration, string? ErrorCode = null, string? ErrorMessage = null, string? RequestHash = null)
Parameters
ProviderstringProvider name (
AvaTax,BankOfCanada, ...).OperationstringOperation called (e.g.
CreateTransaction).SubjectIdstringWhat the call was about (document id, party code, ...).
SucceededboolWhether it succeeded.
DurationTimeSpanHow long it took.
ErrorCodestringProvider or transport error code on failure.
ErrorMessagestringError message on failure (never payload data).
RequestHashstringSHA-256 of the request, to match retries without storing the payload.
Properties
Duration
How long it took.
public TimeSpan Duration { get; init; }
Property Value
ErrorCode
Provider or transport error code on failure.
public string? ErrorCode { get; init; }
Property Value
ErrorMessage
Error message on failure (never payload data).
public string? ErrorMessage { get; init; }
Property Value
Operation
Operation called (e.g. CreateTransaction).
public string Operation { get; init; }
Property Value
Provider
Provider name (AvaTax, BankOfCanada, ...).
public string Provider { get; init; }
Property Value
RequestHash
SHA-256 of the request, to match retries without storing the payload.
public string? RequestHash { get; init; }
Property Value
SubjectId
What the call was about (document id, party code, ...).
public string? SubjectId { get; init; }
Property Value
Succeeded
Whether it succeeded.
public bool Succeeded { get; init; }