Table of Contents

Class TaxCodeMapping

Namespace
Integrations.Domain.Tax
Assembly
Integrations.Domain.dll

Maps PVC work classification (work type / sub type / trade) and line category to a provider tax code. Data, not code: the Modernization work-type redesign only changes rows. The most specific active match wins; null columns are wildcards. Tax Research at Avalara is the authority on which code to use.

public sealed class TaxCodeMapping
Inheritance
TaxCodeMapping
Inherited Members

Properties

Category

Line category to match.

public LineCategory Category { get; set; }

Property Value

LineCategory

Country

Null = any country.

public string? Country { get; set; }

Property Value

string

EffectiveFrom

First date the row applies.

public DateOnly EffectiveFrom { get; set; }

Property Value

DateOnly

EffectiveTo

Last date the row applies; null is open-ended.

public DateOnly? EffectiveTo { get; set; }

Property Value

DateOnly?

EntityId

Null = applies to every entity.

public string? EntityId { get; set; }

Property Value

string

Id

Mapping id.

public Guid Id { get; init; }

Property Value

Guid

IsActive

Inactive rows are ignored.

public bool IsActive { get; set; }

Property Value

bool

Notes

Why the mapping exists.

public string? Notes { get; set; }

Property Value

string

Specificity

Higher = more specific. Used to pick between matching rows.

public int Specificity { get; }

Property Value

int

TaxCode

Provider tax code to use, e.g. SL010000.

public string TaxCode { get; set; }

Property Value

string

Trade

Trade to match; null matches any.

public string? Trade { get; set; }

Property Value

string

UpdatedAt

When the row last changed.

public DateTimeOffset UpdatedAt { get; set; }

Property Value

DateTimeOffset

WorkSubType

Work sub-type to match; null matches any.

public string? WorkSubType { get; set; }

Property Value

string

WorkType

Work type to match; null matches any.

public string? WorkType { get; set; }

Property Value

string

Methods

Matches(string, string, string?, string?, string?, LineCategory, DateOnly)

True when the row is active on date and every non-null filter column equals the line's value (case-insensitive).

public bool Matches(string entityId, string country, string? workType, string? workSubType, string? trade, LineCategory category, DateOnly date)

Parameters

entityId string
country string
workType string
workSubType string
trade string
category LineCategory
date DateOnly

Returns

bool