Table of Contents

Class TaxDocumentDto

Namespace
Integrations.Contracts.Tax
Assembly
Integrations.Contracts.dll

Amounts are rounded to the currency's minor units. TotalTaxFunctional is in the entity's base currency.

public sealed record TaxDocumentDto : IEquatable<TaxDocumentDto>
Inheritance
TaxDocumentDto
Implements
Inherited Members

Constructors

TaxDocumentDto(Guid, string, TaxDirection, TaxDocumentKind, TaxDocumentStatus, string?, string, string, string, DateOnly, string, string?, string?, string?, string?, string, string, Guid?, decimal?, decimal, decimal, decimal, decimal, decimal, IReadOnlyList<TaxLineDto>, Guid?, string?, DateTimeOffset, DateTimeOffset?, DateTimeOffset?, DateTimeOffset?)

Amounts are rounded to the currency's minor units. TotalTaxFunctional is in the entity's base currency.

public TaxDocumentDto(Guid Id, string EntityId, TaxDirection Direction, TaxDocumentKind Kind, TaxDocumentStatus Status, string? StatusReason, string SourceSystem, string SourceDocumentId, string ProviderDocumentCode, DateOnly DocumentDate, string CounterpartyCode, string? CounterpartyName, string? WorkOrderNumber, string? PurchaseOrderNumber, string? InvoiceNumber, string CurrencyCode, string FunctionalCurrency, Guid? FxLockId, decimal? ExchangeRate, decimal TotalAmount, decimal TotalTaxable, decimal TotalExempt, decimal TotalTax, decimal TotalTaxFunctional, IReadOnlyList<TaxLineDto> Lines, Guid? OriginalDocumentId, string? Provider, DateTimeOffset CreatedAt, DateTimeOffset? CalculatedAt, DateTimeOffset? CommittedAt, DateTimeOffset? VoidedAt)

Parameters

Id Guid

Document id.

EntityId string

Owning entity.

Direction TaxDirection

Receivable or payable.

Kind TaxDocumentKind

Invoice or credit.

Status TaxDocumentStatus

Lifecycle status.

StatusReason string

Why it is PendingTax or Failed, if it is.

SourceSystem string

Calling system (idempotency key).

SourceDocumentId string

Caller's document id (idempotency key).

ProviderDocumentCode string

Code the document has at the tax provider; stable across replacements and retries.

DocumentDate DateOnly

Document and tax date.

CounterpartyCode string

Client or vendor code.

CounterpartyName string

Client or vendor name.

WorkOrderNumber string

Work order reference.

PurchaseOrderNumber string

PO reference.

InvoiceNumber string

Invoice, bill or credit memo number.

CurrencyCode string

Document currency.

FunctionalCurrency string

Entity's base currency.

FxLockId Guid?

Exchange-rate lock used, when the currencies differ.

ExchangeRate decimal?

Locked rate from document to functional currency.

TotalAmount decimal

Sum of line amounts.

TotalTaxable decimal

Sum of taxable amounts.

TotalExempt decimal

Sum of exempt amounts.

TotalTax decimal

Total tax in the document currency.

TotalTaxFunctional decimal

Total tax in the functional currency, at the locked rate.

Lines IReadOnlyList<TaxLineDto>

Calculated lines.

OriginalDocumentId Guid?

On a credit: the invoice it reverses.

Provider string

Tax engine that calculated it.

CreatedAt DateTimeOffset

When it was first received.

CalculatedAt DateTimeOffset?

When tax was last calculated.

CommittedAt DateTimeOffset?

When it was committed.

VoidedAt DateTimeOffset?

When it was voided.

Properties

CalculatedAt

When tax was last calculated.

public DateTimeOffset? CalculatedAt { get; init; }

Property Value

DateTimeOffset?

CommittedAt

When it was committed.

public DateTimeOffset? CommittedAt { get; init; }

Property Value

DateTimeOffset?

CounterpartyCode

Client or vendor code.

public string CounterpartyCode { get; init; }

Property Value

string

CounterpartyName

Client or vendor name.

public string? CounterpartyName { get; init; }

Property Value

string

CreatedAt

When it was first received.

public DateTimeOffset CreatedAt { get; init; }

Property Value

DateTimeOffset

CurrencyCode

Document currency.

public string CurrencyCode { get; init; }

Property Value

string

Direction

Receivable or payable.

public TaxDirection Direction { get; init; }

Property Value

TaxDirection

DocumentDate

Document and tax date.

public DateOnly DocumentDate { get; init; }

Property Value

DateOnly

EntityId

Owning entity.

public string EntityId { get; init; }

Property Value

string

ExchangeRate

Locked rate from document to functional currency.

public decimal? ExchangeRate { get; init; }

Property Value

decimal?

FunctionalCurrency

Entity's base currency.

public string FunctionalCurrency { get; init; }

Property Value

string

FxLockId

Exchange-rate lock used, when the currencies differ.

public Guid? FxLockId { get; init; }

Property Value

Guid?

Id

Document id.

public Guid Id { get; init; }

Property Value

Guid

InvoiceNumber

Invoice, bill or credit memo number.

public string? InvoiceNumber { get; init; }

Property Value

string

Kind

Invoice or credit.

public TaxDocumentKind Kind { get; init; }

Property Value

TaxDocumentKind

Lines

Calculated lines.

public IReadOnlyList<TaxLineDto> Lines { get; init; }

Property Value

IReadOnlyList<TaxLineDto>

OriginalDocumentId

On a credit: the invoice it reverses.

public Guid? OriginalDocumentId { get; init; }

Property Value

Guid?

Provider

Tax engine that calculated it.

public string? Provider { get; init; }

Property Value

string

ProviderDocumentCode

Code the document has at the tax provider; stable across replacements and retries.

public string ProviderDocumentCode { get; init; }

Property Value

string

PurchaseOrderNumber

PO reference.

public string? PurchaseOrderNumber { get; init; }

Property Value

string

SourceDocumentId

Caller's document id (idempotency key).

public string SourceDocumentId { get; init; }

Property Value

string

SourceSystem

Calling system (idempotency key).

public string SourceSystem { get; init; }

Property Value

string

Status

Lifecycle status.

public TaxDocumentStatus Status { get; init; }

Property Value

TaxDocumentStatus

StatusReason

Why it is PendingTax or Failed, if it is.

public string? StatusReason { get; init; }

Property Value

string

TotalAmount

Sum of line amounts.

public decimal TotalAmount { get; init; }

Property Value

decimal

TotalExempt

Sum of exempt amounts.

public decimal TotalExempt { get; init; }

Property Value

decimal

TotalTax

Total tax in the document currency.

public decimal TotalTax { get; init; }

Property Value

decimal

TotalTaxFunctional

Total tax in the functional currency, at the locked rate.

public decimal TotalTaxFunctional { get; init; }

Property Value

decimal

TotalTaxable

Sum of taxable amounts.

public decimal TotalTaxable { get; init; }

Property Value

decimal

VoidedAt

When it was voided.

public DateTimeOffset? VoidedAt { get; init; }

Property Value

DateTimeOffset?

WorkOrderNumber

Work order reference.

public string? WorkOrderNumber { get; init; }

Property Value

string