docs: TSDoc + reference of fulfillment service (#5761)
This commit is contained in:
@@ -8,13 +8,11 @@ import ParameterTypes from "@site/src/components/ParameterTypes"
|
||||
|
||||
Finds tax providers and assists in tax related operations.
|
||||
|
||||
## Constructors
|
||||
|
||||
#### constructor
|
||||
## constructor
|
||||
|
||||
`**new TaxProviderService**(container)`
|
||||
|
||||
##### Parameters
|
||||
### Parameters
|
||||
|
||||
<ParameterTypes parameters={[
|
||||
{
|
||||
@@ -28,6 +26,8 @@ Finds tax providers and assists in tax related operations.
|
||||
}
|
||||
]} />
|
||||
|
||||
___
|
||||
|
||||
## Properties
|
||||
|
||||
<ParameterTypes parameters={[
|
||||
@@ -141,15 +141,35 @@ Finds tax providers and assists in tax related operations.
|
||||
}
|
||||
]} />
|
||||
|
||||
___
|
||||
|
||||
## Accessors
|
||||
|
||||
#### activeManager\_
|
||||
### activeManager\_
|
||||
|
||||
`Protected` **activeManager\_**: [object Object]
|
||||
`Protected get**activeManager_**(): EntityManager`
|
||||
|
||||
#### Returns
|
||||
|
||||
EntityManager
|
||||
|
||||
<ParameterTypes parameters={[
|
||||
{
|
||||
"name": "EntityManager",
|
||||
"type": "EntityManager",
|
||||
"optional": false,
|
||||
"defaultValue": "",
|
||||
"description": "",
|
||||
"expandable": false,
|
||||
"children": []
|
||||
}
|
||||
]} />
|
||||
|
||||
___
|
||||
|
||||
## Methods
|
||||
|
||||
#### atomicPhase\_
|
||||
### atomicPhase\_
|
||||
|
||||
`Protected **atomicPhase_**<TypeParameter TResult, TypeParameter TError>(work, isolationOrErrorHandler?, maybeErrorHandlerOrDontFail?): Promise<TResult>`
|
||||
|
||||
@@ -157,7 +177,7 @@ Wraps some work within a transactional block. If the service already has
|
||||
a transaction manager attached this will be reused, otherwise a new
|
||||
transaction manager is created.
|
||||
|
||||
##### Type Parameters
|
||||
#### Type Parameters
|
||||
|
||||
<ParameterTypes parameters={[
|
||||
{
|
||||
@@ -180,7 +200,7 @@ transaction manager is created.
|
||||
}
|
||||
]} />
|
||||
|
||||
##### Parameters
|
||||
#### Parameters
|
||||
|
||||
<ParameterTypes parameters={[
|
||||
{
|
||||
@@ -212,7 +232,7 @@ transaction manager is created.
|
||||
}
|
||||
]} />
|
||||
|
||||
##### Returns
|
||||
#### Returns
|
||||
|
||||
Promise<TResult>
|
||||
|
||||
@@ -230,11 +250,11 @@ Promise<TResult>
|
||||
|
||||
___
|
||||
|
||||
#### clearLineItemsTaxLines
|
||||
### clearLineItemsTaxLines
|
||||
|
||||
`**clearLineItemsTaxLines**(itemIds): Promise<void>`
|
||||
|
||||
##### Parameters
|
||||
#### Parameters
|
||||
|
||||
<ParameterTypes parameters={[
|
||||
{
|
||||
@@ -248,7 +268,7 @@ ___
|
||||
}
|
||||
]} />
|
||||
|
||||
##### Returns
|
||||
#### Returns
|
||||
|
||||
Promise<void>
|
||||
|
||||
@@ -266,11 +286,11 @@ Promise<void>
|
||||
|
||||
___
|
||||
|
||||
#### clearTaxLines
|
||||
### clearTaxLines
|
||||
|
||||
`**clearTaxLines**(cartId): Promise<void>`
|
||||
|
||||
##### Parameters
|
||||
#### Parameters
|
||||
|
||||
<ParameterTypes parameters={[
|
||||
{
|
||||
@@ -284,7 +304,7 @@ ___
|
||||
}
|
||||
]} />
|
||||
|
||||
##### Returns
|
||||
#### Returns
|
||||
|
||||
Promise<void>
|
||||
|
||||
@@ -302,14 +322,14 @@ Promise<void>
|
||||
|
||||
___
|
||||
|
||||
#### createShippingTaxLines
|
||||
### createShippingTaxLines
|
||||
|
||||
`**createShippingTaxLines**(shippingMethod, calculationContext): Promise<([LineItemTaxLine](LineItemTaxLine.mdx) \| [ShippingMethodTaxLine](ShippingMethodTaxLine.mdx))[]>`
|
||||
|
||||
Persists the tax lines relevant for a shipping method to the database. Used
|
||||
for return shipping methods.
|
||||
|
||||
##### Parameters
|
||||
#### Parameters
|
||||
|
||||
<ParameterTypes parameters={[
|
||||
{
|
||||
@@ -332,7 +352,7 @@ for return shipping methods.
|
||||
}
|
||||
]} />
|
||||
|
||||
##### Returns
|
||||
#### Returns
|
||||
|
||||
Promise<([LineItemTaxLine](LineItemTaxLine.mdx) \| [ShippingMethodTaxLine](ShippingMethodTaxLine.mdx))[]>
|
||||
|
||||
@@ -350,13 +370,13 @@ Promise<([LineItemTaxLine](LineItemTaxLine.mdx) \| [ShippingMethodTaxLine](S
|
||||
|
||||
___
|
||||
|
||||
#### createTaxLines
|
||||
### createTaxLines
|
||||
|
||||
`**createTaxLines**(cartOrLineItems, calculationContext): Promise<([LineItemTaxLine](LineItemTaxLine.mdx) \| [ShippingMethodTaxLine](ShippingMethodTaxLine.mdx))[]>`
|
||||
|
||||
Persists the tax lines relevant for an order to the database.
|
||||
|
||||
##### Parameters
|
||||
#### Parameters
|
||||
|
||||
<ParameterTypes parameters={[
|
||||
{
|
||||
@@ -379,7 +399,7 @@ Persists the tax lines relevant for an order to the database.
|
||||
}
|
||||
]} />
|
||||
|
||||
##### Returns
|
||||
#### Returns
|
||||
|
||||
Promise<([LineItemTaxLine](LineItemTaxLine.mdx) \| [ShippingMethodTaxLine](ShippingMethodTaxLine.mdx))[]>
|
||||
|
||||
@@ -397,13 +417,13 @@ Promise<([LineItemTaxLine](LineItemTaxLine.mdx) \| [ShippingMethodTaxLine](S
|
||||
|
||||
___
|
||||
|
||||
#### getCacheKey
|
||||
### getCacheKey
|
||||
|
||||
`Private **getCacheKey**(id, regionId): string`
|
||||
|
||||
The cache key to get cache hits by.
|
||||
|
||||
##### Parameters
|
||||
#### Parameters
|
||||
|
||||
<ParameterTypes parameters={[
|
||||
{
|
||||
@@ -426,7 +446,7 @@ The cache key to get cache hits by.
|
||||
}
|
||||
]} />
|
||||
|
||||
##### Returns
|
||||
#### Returns
|
||||
|
||||
`string`
|
||||
|
||||
@@ -444,14 +464,14 @@ The cache key to get cache hits by.
|
||||
|
||||
___
|
||||
|
||||
#### getRegionRatesForProduct
|
||||
### getRegionRatesForProduct
|
||||
|
||||
`**getRegionRatesForProduct**(productIds, region): Promise<Map<string, [TaxServiceRate](../types/TaxServiceRate.mdx)[]>>`
|
||||
|
||||
Gets the tax rates configured for a product. The rates are cached between
|
||||
calls.
|
||||
|
||||
##### Parameters
|
||||
#### Parameters
|
||||
|
||||
<ParameterTypes parameters={[
|
||||
{
|
||||
@@ -474,7 +494,7 @@ calls.
|
||||
}
|
||||
]} />
|
||||
|
||||
##### Returns
|
||||
#### Returns
|
||||
|
||||
Promise<Map<string, [TaxServiceRate](../types/TaxServiceRate.mdx)[]>>
|
||||
|
||||
@@ -492,14 +512,14 @@ Promise<Map<string, [TaxServiceRate](../types/TaxServiceRate.mdx)[]>
|
||||
|
||||
___
|
||||
|
||||
#### getRegionRatesForShipping
|
||||
### getRegionRatesForShipping
|
||||
|
||||
`**getRegionRatesForShipping**(optionId, regionDetails): Promise<[TaxServiceRate](../types/TaxServiceRate.mdx)[]>`
|
||||
|
||||
Gets the tax rates configured for a shipping option. The rates are cached
|
||||
between calls.
|
||||
|
||||
##### Parameters
|
||||
#### Parameters
|
||||
|
||||
<ParameterTypes parameters={[
|
||||
{
|
||||
@@ -522,7 +542,7 @@ between calls.
|
||||
}
|
||||
]} />
|
||||
|
||||
##### Returns
|
||||
#### Returns
|
||||
|
||||
Promise<[TaxServiceRate](../types/TaxServiceRate.mdx)[]>
|
||||
|
||||
@@ -540,7 +560,7 @@ Promise<[TaxServiceRate](../types/TaxServiceRate.mdx)[]>
|
||||
|
||||
___
|
||||
|
||||
#### getShippingTaxLines
|
||||
### getShippingTaxLines
|
||||
|
||||
`**getShippingTaxLines**(shippingMethod, calculationContext): Promise<[ShippingMethodTaxLine](ShippingMethodTaxLine.mdx)[]>`
|
||||
|
||||
@@ -548,7 +568,7 @@ Gets the relevant tax lines for a shipping method. Note: this method
|
||||
doesn't persist the tax lines. Use createShippingTaxLines if you wish to
|
||||
persist the tax lines to the DB layer.
|
||||
|
||||
##### Parameters
|
||||
#### Parameters
|
||||
|
||||
<ParameterTypes parameters={[
|
||||
{
|
||||
@@ -571,7 +591,7 @@ persist the tax lines to the DB layer.
|
||||
}
|
||||
]} />
|
||||
|
||||
##### Returns
|
||||
#### Returns
|
||||
|
||||
Promise<[ShippingMethodTaxLine](ShippingMethodTaxLine.mdx)[]>
|
||||
|
||||
@@ -589,7 +609,7 @@ Promise<[ShippingMethodTaxLine](ShippingMethodTaxLine.mdx)[]>
|
||||
|
||||
___
|
||||
|
||||
#### getTaxLines
|
||||
### getTaxLines
|
||||
|
||||
`**getTaxLines**(lineItems, calculationContext): Promise<([LineItemTaxLine](LineItemTaxLine.mdx) \| [ShippingMethodTaxLine](ShippingMethodTaxLine.mdx))[]>`
|
||||
|
||||
@@ -599,7 +619,7 @@ will be computed from the tax rules and potentially a 3rd party tax plugin.
|
||||
Note: this method doesn't persist the tax lines. Use createTaxLines if you
|
||||
wish to persist the tax lines to the DB layer.
|
||||
|
||||
##### Parameters
|
||||
#### Parameters
|
||||
|
||||
<ParameterTypes parameters={[
|
||||
{
|
||||
@@ -622,7 +642,7 @@ wish to persist the tax lines to the DB layer.
|
||||
}
|
||||
]} />
|
||||
|
||||
##### Returns
|
||||
#### Returns
|
||||
|
||||
Promise<([LineItemTaxLine](LineItemTaxLine.mdx) \| [ShippingMethodTaxLine](ShippingMethodTaxLine.mdx))[]>
|
||||
|
||||
@@ -640,13 +660,13 @@ Promise<([LineItemTaxLine](LineItemTaxLine.mdx) \| [ShippingMethodTaxLine](S
|
||||
|
||||
___
|
||||
|
||||
#### getTaxLinesMap
|
||||
### getTaxLinesMap
|
||||
|
||||
`Protected **getTaxLinesMap**(items, calculationContext): Promise<[TaxLinesMaps](../types/TaxLinesMaps.mdx)>`
|
||||
|
||||
Return a map of tax lines for line items and shipping methods
|
||||
|
||||
##### Parameters
|
||||
#### Parameters
|
||||
|
||||
<ParameterTypes parameters={[
|
||||
{
|
||||
@@ -669,7 +689,7 @@ Return a map of tax lines for line items and shipping methods
|
||||
}
|
||||
]} />
|
||||
|
||||
##### Returns
|
||||
#### Returns
|
||||
|
||||
Promise<[TaxLinesMaps](../types/TaxLinesMaps.mdx)>
|
||||
|
||||
@@ -687,11 +707,11 @@ Promise<[TaxLinesMaps](../types/TaxLinesMaps.mdx)>
|
||||
|
||||
___
|
||||
|
||||
#### list
|
||||
### list
|
||||
|
||||
`**list**(): Promise<[TaxProvider](TaxProvider.mdx)[]>`
|
||||
|
||||
##### Returns
|
||||
#### Returns
|
||||
|
||||
Promise<[TaxProvider](TaxProvider.mdx)[]>
|
||||
|
||||
@@ -709,11 +729,11 @@ Promise<[TaxProvider](TaxProvider.mdx)[]>
|
||||
|
||||
___
|
||||
|
||||
#### registerInstalledProviders
|
||||
### registerInstalledProviders
|
||||
|
||||
`**registerInstalledProviders**(providers): Promise<void>`
|
||||
|
||||
##### Parameters
|
||||
#### Parameters
|
||||
|
||||
<ParameterTypes parameters={[
|
||||
{
|
||||
@@ -727,7 +747,7 @@ ___
|
||||
}
|
||||
]} />
|
||||
|
||||
##### Returns
|
||||
#### Returns
|
||||
|
||||
Promise<void>
|
||||
|
||||
@@ -745,13 +765,13 @@ Promise<void>
|
||||
|
||||
___
|
||||
|
||||
#### retrieveProvider
|
||||
### retrieveProvider
|
||||
|
||||
`**retrieveProvider**(region): [ITaxService](../interfaces/ITaxService.mdx)`
|
||||
|
||||
Retrieves the relevant tax provider for the given region.
|
||||
|
||||
##### Parameters
|
||||
#### Parameters
|
||||
|
||||
<ParameterTypes parameters={[
|
||||
{
|
||||
@@ -765,7 +785,7 @@ Retrieves the relevant tax provider for the given region.
|
||||
}
|
||||
]} />
|
||||
|
||||
##### Returns
|
||||
#### Returns
|
||||
|
||||
[ITaxService](../interfaces/ITaxService.mdx)
|
||||
|
||||
@@ -783,11 +803,11 @@ Retrieves the relevant tax provider for the given region.
|
||||
|
||||
___
|
||||
|
||||
#### shouldRetryTransaction\_
|
||||
### shouldRetryTransaction\_
|
||||
|
||||
`Protected **shouldRetryTransaction_**(err): boolean`
|
||||
|
||||
##### Parameters
|
||||
#### Parameters
|
||||
|
||||
<ParameterTypes parameters={[
|
||||
{
|
||||
@@ -801,7 +821,7 @@ ___
|
||||
}
|
||||
]} />
|
||||
|
||||
##### Returns
|
||||
#### Returns
|
||||
|
||||
`boolean`
|
||||
|
||||
@@ -819,11 +839,11 @@ ___
|
||||
|
||||
___
|
||||
|
||||
#### withTransaction
|
||||
### withTransaction
|
||||
|
||||
`**withTransaction**(transactionManager?): [TaxProviderService](TaxProviderService.mdx)`
|
||||
|
||||
##### Parameters
|
||||
#### Parameters
|
||||
|
||||
<ParameterTypes parameters={[
|
||||
{
|
||||
@@ -837,7 +857,7 @@ ___
|
||||
}
|
||||
]} />
|
||||
|
||||
##### Returns
|
||||
#### Returns
|
||||
|
||||
[TaxProviderService](TaxProviderService.mdx)
|
||||
|
||||
|
||||
Reference in New Issue
Block a user