* update dependencies * update onboarding mdx * fixes for mdx issues * fixes for mdx compatibility * resolve mdx errors * fixes in reference * fix check errors * revert change in vale action * fix node version in action * fix summary in markdown
68 lines
1.7 KiB
Plaintext
68 lines
1.7 KiB
Plaintext
---
|
|
displayed_sidebar: servicesSidebar
|
|
---
|
|
|
|
import ParameterTypes from "@site/src/components/ParameterTypes"
|
|
|
|
# ITaxService
|
|
|
|
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.
|
|
|
|
## Methods
|
|
|
|
### getTaxLines
|
|
|
|
`**getTaxLines**(itemLines, shippingLines, context): Promise<[ProviderTaxLine](../types/ProviderTaxLine.mdx)[]>`
|
|
|
|
Retrieves the numerical tax lines for a calculation context.
|
|
|
|
#### Parameters
|
|
|
|
<ParameterTypes parameters={[
|
|
{
|
|
"name": "itemLines",
|
|
"type": "[ItemTaxCalculationLine](../types/ItemTaxCalculationLine.mdx)[]",
|
|
"description": "the line item calculation lines",
|
|
"optional": false,
|
|
"defaultValue": "",
|
|
"expandable": false,
|
|
"children": []
|
|
},
|
|
{
|
|
"name": "shippingLines",
|
|
"type": "[ShippingTaxCalculationLine](../types/ShippingTaxCalculationLine.mdx)[]",
|
|
"description": "",
|
|
"optional": false,
|
|
"defaultValue": "",
|
|
"expandable": false,
|
|
"children": []
|
|
},
|
|
{
|
|
"name": "context",
|
|
"type": "[TaxCalculationContext](../types/TaxCalculationContext.mdx)",
|
|
"description": "other details relevant to the tax determination",
|
|
"optional": false,
|
|
"defaultValue": "",
|
|
"expandable": false,
|
|
"children": []
|
|
}
|
|
]} />
|
|
|
|
#### Returns
|
|
|
|
Promise<[ProviderTaxLine](../types/ProviderTaxLine.mdx)[]>
|
|
|
|
<ParameterTypes parameters={[
|
|
{
|
|
"name": "Promise",
|
|
"type": "Promise<[ProviderTaxLine](../types/ProviderTaxLine.mdx)[]>",
|
|
"optional": false,
|
|
"defaultValue": "",
|
|
"description": "numerical tax rates that should apply to the provided calculation\n lines",
|
|
"expandable": false,
|
|
"children": []
|
|
}
|
|
]} />
|