Automated changes by [create-pull-request](https://github.com/peter-evans/create-pull-request) GitHub action Co-authored-by: Shahed Nasser <27354907+shahednasser@users.noreply.github.com>
1.1 KiB
1.1 KiB
displayed_sidebar
| displayed_sidebar |
|---|
| jsClientSidebar |
Interface: ITaxCalculationStrategy
internal.internal.ITaxCalculationStrategy
Methods
calculate
▸ calculate(items, taxLines, calculationContext): Promise<number>
Calculates the tax amount for a given set of line items under applicable tax conditions and calculation contexts.
Parameters
| Name | Type | Description |
|---|---|---|
items |
LineItem[] |
the line items to calculate the tax total for |
taxLines |
(ShippingMethodTaxLine | LineItemTaxLine)[] |
the tax lines that applies to the calculation |
calculationContext |
TaxCalculationContext |
other details relevant for the calculation |
Returns
Promise<number>
the tax total
Defined in
packages/medusa/dist/interfaces/tax-calculation-strategy.d.ts:14