Skip to main content
Skip to main content

AbstractTaxService

internal.internal.AbstractTaxService

Interface to be implemented by tax provider plugins. The interface defines a single method getTaxLines that returns numerical rates to apply to line items and shipping methods.

Implements

Properties

identifierstringRequired

Methods

getIdentifier

getIdentifier(): string

Returns

string

stringstring

getTaxLines

Abstract getTaxLines(itemLines, shippingLines, context): Promise<ProviderTaxLine[]>

Retrieves the numerical tax lines for a calculation context.

Parameters

itemLinesItemTaxCalculationLine[]Required
the line item calculation lines
shippingLinesShippingTaxCalculationLine[]Required
contextTaxCalculationContextRequired
other details relevant to the tax determination

Returns

Promise<ProviderTaxLine[]>

PromisePromise<ProviderTaxLine[]>Required
numerical tax rates that should apply to the provided calculation lines

Implementation of

ITaxService.getTaxLines

Was this section helpful?