Files
medusa-store/www/apps/docs/content/references/services/interfaces/ITaxService.mdx
github-actions[bot] 39649b3552 chore(docs): Generated References (#5602)
Generated the following references:
- `pricing`
- `product`

Co-authored-by: Oli Juhl <59018053+olivermrbl@users.noreply.github.com>
Co-authored-by: Shahed Nasser <27354907+shahednasser@users.noreply.github.com>
2023-11-10 17:31:02 +00: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`<[`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": []
}
]} />