Table of Contents

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

Provider string

Provider name (AvaTax, BankOfCanada, ...).

Operation string

Operation called (e.g. CreateTransaction).

SubjectId string

What the call was about (document id, party code, ...).

Succeeded bool

Whether it succeeded.

Duration TimeSpan

How long it took.

ErrorCode string

Provider or transport error code on failure.

ErrorMessage string

Error message on failure (never payload data).

RequestHash string

SHA-256 of the request, to match retries without storing the payload.

Properties

Duration

How long it took.

public TimeSpan Duration { get; init; }

Property Value

TimeSpan

ErrorCode

Provider or transport error code on failure.

public string? ErrorCode { get; init; }

Property Value

string

ErrorMessage

Error message on failure (never payload data).

public string? ErrorMessage { get; init; }

Property Value

string

Operation

Operation called (e.g. CreateTransaction).

public string Operation { get; init; }

Property Value

string

Provider

Provider name (AvaTax, BankOfCanada, ...).

public string Provider { get; init; }

Property Value

string

RequestHash

SHA-256 of the request, to match retries without storing the payload.

public string? RequestHash { get; init; }

Property Value

string

SubjectId

What the call was about (document id, party code, ...).

public string? SubjectId { get; init; }

Property Value

string

Succeeded

Whether it succeeded.

public bool Succeeded { get; init; }

Property Value

bool