Namespace Integrations.Application.Tax
Classes
- AddressDtoValidator
Validates AddressDto.
- AddressService
Address validation and geocoding. Results are cached for a day: job sites are validated repeatedly.
- AddressValidationResult
Result of address validation.
- CreateCreditRequestValidator
Validates CreateCreditRequest.
- PendingTaxRecalculationJob
Finishes documents that were deferred while the tax provider was unavailable. Each document runs in its own scope so one failure cannot affect the others. Documents back off exponentially (see TaxDocument.MarkPending).
- ProviderDocumentSummary
A committed document as the provider sees it (for reconciliation).
- TaxCalculationLine
One line of a provider-neutral calculation request.
- TaxCalculationRequest
Provider-neutral calculation request.
- TaxCalculationResult
What the provider calculated.
- TaxCodeMappingService
Maintains the work type → tax code mapping (Avalara Tax Research is the authority on the codes).
- TaxCodeResolver
Picks the tax code for a line: explicit override, else the most specific active mapping for entity / country / work type / sub type / trade / category, else the configured category default. Mappings are cached for CacheFor (by the business clock, so tests control it); admin changes on this replica call Invalidate(), other replicas pick them up when their copy expires.
- TaxEstimateRequestValidator
Validates TaxEstimateRequest.
- TaxLineRequestValidator
Validates TaxLineRequest.
- TaxMapping
Domain ↔ contract mapping. Amounts are rounded to the currency's minor units here and only here.
- TaxOptions
Tax settings (section
Tax).
- TaxService
AR/AP tax documents: estimate, create/replace, commit, void, credit and recalculate.
Documents are persisted before the provider is called, so the provider document code is durable and a crash or retry can never create a second provider document. Provider outages leave the document PendingTax (the caller falls back to the manual process and the recalculation job finishes the work); the service never invents a tax amount.
- UpsertEntityRequestValidator
Validates UpsertEntityRequest.
Interfaces
- IAddressProvider
Address validation and geocoding port.
- ITaxProvider
Tax engine port. Implementations translate transport failures into
ProviderUnavailableException(callers defer and retry) and business rejections intoProviderRejectedException(callers mark the document failed).
Enums
- TaxCalculationMode
What the provider should do with a calculation.
- TaxDocumentOutcome
What a create or credit call did; decides the HTTP status.