Files
medusa-store/www/apps/docs/content/references/medusa/interfaces/medusa.ITaxService.mdx
Shahed Nasser 7d650771d1 docs: generate medusa-react reference (#6004)
* add new plugin for better organization

* added handling in theme for mutations and query types

* added tsdoc to hooks

* added tsdocs to utility functions

* added tsdoc to providers

* generated reference

* general fixes for generated reference

* generated api reference specs + general fixes

* add missing import react

* split utilities into different directories

* added overview page

* added link to customer authentication section

* fix lint errors

* added changeset

* fix readme

* fixed build error

* added expand fields + other sections to overview

* updated what's new section

* general refactoring

* remove unnecessary query field

* fix links

* added ignoreApi option
2024-01-05 17:03:38 +02:00

26 lines
3.0 KiB
Plaintext

---
displayed_sidebar: homepage
---
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
Retrieves the numerical tax lines for a calculation context.
#### Parameters
<ParameterTypes parameters={[{"name":"itemLines","type":"[ItemTaxCalculationLine](../types/medusa.ItemTaxCalculationLine.mdx)[]","description":"the line item calculation lines","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"shippingLines","type":"[ShippingTaxCalculationLine](../types/medusa.ShippingTaxCalculationLine.mdx)[]","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"context","type":"[TaxCalculationContext](../types/medusa.TaxCalculationContext.mdx)","description":"other details relevant to the tax determination","optional":false,"defaultValue":"","expandable":false,"children":[{"name":"allocation_map","type":"[LineAllocationsMap](../types/medusa.LineAllocationsMap.mdx)","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"customer","type":"[Customer](../../entities/classes/entities.Customer.mdx)","description":"A customer can make purchases in your store and manage their profile.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"is_return","type":"`boolean`","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"region","type":"[Region](../../entities/classes/entities.Region.mdx)","description":"A region holds settings specific to a geographical location, including the currency, tax rates, and fulfillment and payment providers. A Region can consist of multiple countries to accomodate common shopping settings across countries.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"shipping_address","type":"[Address](../../entities/classes/entities.Address.mdx) \\| `null`","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"shipping_methods","type":"[ShippingMethod](../../entities/classes/entities.ShippingMethod.mdx)[]","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]}]}]} expandUrl="https://docs.medusajs.com/development/entities/repositories#retrieving-a-list-of-records"/>
#### Returns
<ParameterTypes parameters={[{"name":"Promise","type":"Promise&#60;[ProviderTaxLine](../types/medusa.ProviderTaxLine.mdx)[]&#62;","optional":false,"defaultValue":"","description":"numerical tax rates that should apply to the provided calculation\n lines","expandable":false,"children":[{"name":"ProviderTaxLine[]","type":"[ProviderTaxLine](../types/medusa.ProviderTaxLine.mdx)[]","optional":false,"defaultValue":"","description":"","expandable":false,"children":[]}]}]} expandUrl="https://docs.medusajs.com/development/entities/repositories#retrieving-a-list-of-records"/>