docs: TSDoc + reference of fulfillment service (#5761)
This commit is contained in:
@@ -6,13 +6,11 @@ import ParameterTypes from "@site/src/components/ParameterTypes"
|
||||
|
||||
# NewTotalsService
|
||||
|
||||
## Constructors
|
||||
|
||||
#### constructor
|
||||
## constructor
|
||||
|
||||
`**new NewTotalsService**(«destructured»)`
|
||||
|
||||
##### Parameters
|
||||
### Parameters
|
||||
|
||||
<ParameterTypes parameters={[
|
||||
{
|
||||
@@ -26,6 +24,8 @@ import ParameterTypes from "@site/src/components/ParameterTypes"
|
||||
}
|
||||
]} />
|
||||
|
||||
___
|
||||
|
||||
## Properties
|
||||
|
||||
<ParameterTypes parameters={[
|
||||
@@ -103,15 +103,35 @@ import ParameterTypes from "@site/src/components/ParameterTypes"
|
||||
}
|
||||
]} />
|
||||
|
||||
___
|
||||
|
||||
## 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>`
|
||||
|
||||
@@ -119,7 +139,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={[
|
||||
{
|
||||
@@ -142,7 +162,7 @@ transaction manager is created.
|
||||
}
|
||||
]} />
|
||||
|
||||
##### Parameters
|
||||
#### Parameters
|
||||
|
||||
<ParameterTypes parameters={[
|
||||
{
|
||||
@@ -174,7 +194,7 @@ transaction manager is created.
|
||||
}
|
||||
]} />
|
||||
|
||||
##### Returns
|
||||
#### Returns
|
||||
|
||||
Promise<TResult>
|
||||
|
||||
@@ -192,13 +212,13 @@ Promise<TResult>
|
||||
|
||||
___
|
||||
|
||||
#### getGiftCardTotals
|
||||
### getGiftCardTotals
|
||||
|
||||
`**getGiftCardTotals**(giftCardableAmount, «destructured»): Promise<{ tax_total: number ; total: number }>`
|
||||
|
||||
Calculate and return the gift cards totals
|
||||
|
||||
##### Parameters
|
||||
#### Parameters
|
||||
|
||||
<ParameterTypes parameters={[
|
||||
{
|
||||
@@ -248,7 +268,7 @@ Calculate and return the gift cards totals
|
||||
}
|
||||
]} />
|
||||
|
||||
##### Returns
|
||||
#### Returns
|
||||
|
||||
Promise<{ tax_total: number ; total: number }>
|
||||
|
||||
@@ -266,13 +286,13 @@ Promise<{ tax_total: number ; total: number }>
|
||||
|
||||
___
|
||||
|
||||
#### getGiftCardTransactionsTotals
|
||||
### getGiftCardTransactionsTotals
|
||||
|
||||
`**getGiftCardTransactionsTotals**(«destructured»): { tax_total: number ; total: number }`
|
||||
|
||||
Calculate and return the gift cards totals based on their transactions
|
||||
|
||||
##### Parameters
|
||||
#### Parameters
|
||||
|
||||
<ParameterTypes parameters={[
|
||||
{
|
||||
@@ -322,7 +342,7 @@ Calculate and return the gift cards totals based on their transactions
|
||||
}
|
||||
]} />
|
||||
|
||||
##### Returns
|
||||
#### Returns
|
||||
|
||||
`object`
|
||||
|
||||
@@ -361,11 +381,11 @@ Calculate and return the gift cards totals based on their transactions
|
||||
|
||||
___
|
||||
|
||||
#### getGiftCardableAmount
|
||||
### getGiftCardableAmount
|
||||
|
||||
`**getGiftCardableAmount**(«destructured»): number`
|
||||
|
||||
##### Parameters
|
||||
#### Parameters
|
||||
|
||||
<ParameterTypes parameters={[
|
||||
{
|
||||
@@ -424,7 +444,7 @@ ___
|
||||
}
|
||||
]} />
|
||||
|
||||
##### Returns
|
||||
#### Returns
|
||||
|
||||
`number`
|
||||
|
||||
@@ -442,13 +462,13 @@ ___
|
||||
|
||||
___
|
||||
|
||||
#### getLineItemRefund
|
||||
### getLineItemRefund
|
||||
|
||||
`**getLineItemRefund**(lineItem, «destructured»): number`
|
||||
|
||||
Return the amount that can be refund on a line item
|
||||
|
||||
##### Parameters
|
||||
#### Parameters
|
||||
|
||||
<ParameterTypes parameters={[
|
||||
{
|
||||
@@ -534,7 +554,7 @@ Return the amount that can be refund on a line item
|
||||
}
|
||||
]} />
|
||||
|
||||
##### Returns
|
||||
#### Returns
|
||||
|
||||
`number`
|
||||
|
||||
@@ -552,11 +572,11 @@ Return the amount that can be refund on a line item
|
||||
|
||||
___
|
||||
|
||||
#### getLineItemRefundLegacy
|
||||
### getLineItemRefundLegacy
|
||||
|
||||
`Protected **getLineItemRefundLegacy**(lineItem, «destructured»): number`
|
||||
|
||||
##### Parameters
|
||||
#### Parameters
|
||||
|
||||
<ParameterTypes parameters={[
|
||||
{
|
||||
@@ -633,7 +653,7 @@ ___
|
||||
}
|
||||
]} />
|
||||
|
||||
##### Returns
|
||||
#### Returns
|
||||
|
||||
`number`
|
||||
|
||||
@@ -651,13 +671,13 @@ ___
|
||||
|
||||
___
|
||||
|
||||
#### getLineItemTotals
|
||||
### getLineItemTotals
|
||||
|
||||
`**getLineItemTotals**(items, «destructured»): Promise<{ [lineItemId: string]: [LineItemTotals](../types/LineItemTotals.mdx); }>`
|
||||
|
||||
Calculate and return the items totals for either the legacy calculation or the new calculation
|
||||
|
||||
##### Parameters
|
||||
#### Parameters
|
||||
|
||||
<ParameterTypes parameters={[
|
||||
{
|
||||
@@ -707,7 +727,7 @@ Calculate and return the items totals for either the legacy calculation or the n
|
||||
}
|
||||
]} />
|
||||
|
||||
##### Returns
|
||||
#### Returns
|
||||
|
||||
Promise<{ [lineItemId: string]: [LineItemTotals](../types/LineItemTotals.mdx); }>
|
||||
|
||||
@@ -725,13 +745,13 @@ Promise<{ [lineItemId: string]: [LineItemTotals](../types/LineItemTotal
|
||||
|
||||
___
|
||||
|
||||
#### getLineItemTotalsLegacy
|
||||
### getLineItemTotalsLegacy
|
||||
|
||||
`Protected **getLineItemTotalsLegacy**(item, «destructured»): Promise<[LineItemTotals](../types/LineItemTotals.mdx)>`
|
||||
|
||||
Calculate and return the legacy calculated totals using the tax rate
|
||||
|
||||
##### Parameters
|
||||
#### Parameters
|
||||
|
||||
<ParameterTypes parameters={[
|
||||
{
|
||||
@@ -799,7 +819,7 @@ Calculate and return the legacy calculated totals using the tax rate
|
||||
}
|
||||
]} />
|
||||
|
||||
##### Returns
|
||||
#### Returns
|
||||
|
||||
Promise<[LineItemTotals](../types/LineItemTotals.mdx)>
|
||||
|
||||
@@ -817,13 +837,13 @@ Promise<[LineItemTotals](../types/LineItemTotals.mdx)>
|
||||
|
||||
___
|
||||
|
||||
#### getLineItemTotals\_
|
||||
### getLineItemTotals\_
|
||||
|
||||
`Protected **getLineItemTotals_**(item, «destructured»): Promise<[LineItemTotals](../types/LineItemTotals.mdx)>`
|
||||
|
||||
Calculate and return the totals for an item
|
||||
|
||||
##### Parameters
|
||||
#### Parameters
|
||||
|
||||
<ParameterTypes parameters={[
|
||||
{
|
||||
@@ -900,7 +920,7 @@ Calculate and return the totals for an item
|
||||
}
|
||||
]} />
|
||||
|
||||
##### Returns
|
||||
#### Returns
|
||||
|
||||
Promise<[LineItemTotals](../types/LineItemTotals.mdx)>
|
||||
|
||||
@@ -918,13 +938,13 @@ Promise<[LineItemTotals](../types/LineItemTotals.mdx)>
|
||||
|
||||
___
|
||||
|
||||
#### getShippingMethodTotals
|
||||
### getShippingMethodTotals
|
||||
|
||||
`**getShippingMethodTotals**(shippingMethods, «destructured»): Promise<{ [shippingMethodId: string]: [ShippingMethodTotals](../types/ShippingMethodTotals.mdx); }>`
|
||||
|
||||
Calculate and return the shipping methods totals for either the legacy calculation or the new calculation
|
||||
|
||||
##### Parameters
|
||||
#### Parameters
|
||||
|
||||
<ParameterTypes parameters={[
|
||||
{
|
||||
@@ -983,7 +1003,7 @@ Calculate and return the shipping methods totals for either the legacy calculati
|
||||
}
|
||||
]} />
|
||||
|
||||
##### Returns
|
||||
#### Returns
|
||||
|
||||
Promise<{ [shippingMethodId: string]: [ShippingMethodTotals](../types/ShippingMethodTotals.mdx); }>
|
||||
|
||||
@@ -1001,13 +1021,13 @@ Promise<{ [shippingMethodId: string]: [ShippingMethodTotals](../types/S
|
||||
|
||||
___
|
||||
|
||||
#### getShippingMethodTotalsLegacy
|
||||
### getShippingMethodTotalsLegacy
|
||||
|
||||
`Protected **getShippingMethodTotalsLegacy**(shippingMethod, «destructured»): Promise<[ShippingMethodTotals](../types/ShippingMethodTotals.mdx)>`
|
||||
|
||||
Calculate and return the shipping method totals legacy using the tax rate
|
||||
|
||||
##### Parameters
|
||||
#### Parameters
|
||||
|
||||
<ParameterTypes parameters={[
|
||||
{
|
||||
@@ -1057,7 +1077,7 @@ Calculate and return the shipping method totals legacy using the tax rate
|
||||
}
|
||||
]} />
|
||||
|
||||
##### Returns
|
||||
#### Returns
|
||||
|
||||
Promise<[ShippingMethodTotals](../types/ShippingMethodTotals.mdx)>
|
||||
|
||||
@@ -1075,13 +1095,13 @@ Promise<[ShippingMethodTotals](../types/ShippingMethodTotals.mdx)>
|
||||
|
||||
___
|
||||
|
||||
#### getShippingMethodTotals\_
|
||||
### getShippingMethodTotals\_
|
||||
|
||||
`Protected **getShippingMethodTotals_**(shippingMethod, «destructured»): Promise<[ShippingMethodTotals](../types/ShippingMethodTotals.mdx)>`
|
||||
|
||||
Calculate and return the shipping method totals
|
||||
|
||||
##### Parameters
|
||||
#### Parameters
|
||||
|
||||
<ParameterTypes parameters={[
|
||||
{
|
||||
@@ -1140,7 +1160,7 @@ Calculate and return the shipping method totals
|
||||
}
|
||||
]} />
|
||||
|
||||
##### Returns
|
||||
#### Returns
|
||||
|
||||
Promise<[ShippingMethodTotals](../types/ShippingMethodTotals.mdx)>
|
||||
|
||||
@@ -1158,11 +1178,11 @@ Promise<[ShippingMethodTotals](../types/ShippingMethodTotals.mdx)>
|
||||
|
||||
___
|
||||
|
||||
#### shouldRetryTransaction\_
|
||||
### shouldRetryTransaction\_
|
||||
|
||||
`Protected **shouldRetryTransaction_**(err): boolean`
|
||||
|
||||
##### Parameters
|
||||
#### Parameters
|
||||
|
||||
<ParameterTypes parameters={[
|
||||
{
|
||||
@@ -1176,7 +1196,7 @@ ___
|
||||
}
|
||||
]} />
|
||||
|
||||
##### Returns
|
||||
#### Returns
|
||||
|
||||
`boolean`
|
||||
|
||||
@@ -1194,11 +1214,11 @@ ___
|
||||
|
||||
___
|
||||
|
||||
#### withTransaction
|
||||
### withTransaction
|
||||
|
||||
`**withTransaction**(transactionManager?): [NewTotalsService](NewTotalsService.mdx)`
|
||||
|
||||
##### Parameters
|
||||
#### Parameters
|
||||
|
||||
<ParameterTypes parameters={[
|
||||
{
|
||||
@@ -1212,7 +1232,7 @@ ___
|
||||
}
|
||||
]} />
|
||||
|
||||
##### Returns
|
||||
#### Returns
|
||||
|
||||
[NewTotalsService](NewTotalsService.mdx)
|
||||
|
||||
|
||||
Reference in New Issue
Block a user