Files
medusa-store/www/apps/docs/content/references/js-client/interfaces/internal-8.internal.ITaxCalculationStrategy.md
github-actions[bot] daea35fe73 chore(docs): Generated JS Client Reference (#5334)
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>
2023-10-10 17:47:07 +00:00

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