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>
2.4 KiB
displayed_sidebar
| displayed_sidebar |
|---|
| jsClientSidebar |
Interface: IPriceSelectionStrategy
internal.internal.IPriceSelectionStrategy
Hierarchy
-
↳
IPriceSelectionStrategy
Implemented by
Methods
calculateVariantPrice
▸ calculateVariantPrice(data, context): Promise<Map<string, PriceSelectionResult>>
Calculate the original and discount price for a given variant in a set of circumstances described in the context.
Parameters
| Name | Type | Description |
|---|---|---|
data |
{ quantity?: number ; variantId: string }[] |
- |
context |
PriceSelectionContext |
Details relevant to determine the correct pricing of the variant |
Returns
Promise<Map<string, PriceSelectionResult>>
pricing details in an object containing the calculated lowest price, the default price an all valid prices for the given variant
Defined in
packages/medusa/dist/interfaces/price-selection-strategy.d.ts:15
onVariantsPricesUpdate
▸ onVariantsPricesUpdate(variantIds): Promise<void>
Notify price selection strategy that variants prices have been updated.
Parameters
| Name | Type | Description |
|---|---|---|
variantIds |
string[] |
The ids of the updated variants |
Returns
Promise<void>
Defined in
packages/medusa/dist/interfaces/price-selection-strategy.d.ts:23
withTransaction
▸ withTransaction(transactionManager?): IPriceSelectionStrategy
Parameters
| Name | Type |
|---|---|
transactionManager? |
EntityManager |
Returns
Inherited from
ITransactionBaseService.withTransaction
Defined in
packages/types/dist/transaction-base/transaction-base.d.ts:3