Files
medusa-store/www/apps/docs/content/references/js-client/classes/internal-8.internal.AbstractTaxService.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.9 KiB

displayed_sidebar
displayed_sidebar
jsClientSidebar

Class: AbstractTaxService

internal.internal.AbstractTaxService

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.

Hierarchy

  • unknown

    AbstractTaxService

Implements

Properties

identifier

Static Protected identifier: string

Defined in

packages/medusa/dist/interfaces/tax-service.d.ts:54

Methods

getIdentifier

getIdentifier(): string

Returns

string

Defined in

packages/medusa/dist/interfaces/tax-service.d.ts:55


getTaxLines

Abstract getTaxLines(itemLines, shippingLines, context): Promise<ProviderTaxLine[]>

Retrieves the numerical tax lines for a calculation context.

Parameters

Name Type Description
itemLines ItemTaxCalculationLine[] the line item calculation lines
shippingLines ShippingTaxCalculationLine[] -
context TaxCalculationContext other details relevant to the tax determination

Returns

Promise<ProviderTaxLine[]>

numerical tax rates that should apply to the provided calculation lines

Implementation of

ITaxService.getTaxLines

Defined in

packages/medusa/dist/interfaces/tax-service.d.ts:56