Files
medusa-store/www/apps/docs/content/references/services/interfaces/ITaxService.mdx
Shahed Nasser c6dff873de docs: update docusaurus to v3 (#5625)
* 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
2023-11-13 20:11:50 +02:00

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&#60;[ProviderTaxLine](../types/ProviderTaxLine.mdx)[]&#62;
<ParameterTypes parameters={[
{
"name": "Promise",
"type": "Promise&#60;[ProviderTaxLine](../types/ProviderTaxLine.mdx)[]&#62;",
"optional": false,
"defaultValue": "",
"description": "numerical tax rates that should apply to the provided calculation\n lines",
"expandable": false,
"children": []
}
]} />