IPriceSelectionStrategy
Methods
calculateVariantPrice
**calculateVariantPrice**(data, context): Promise<Map<string, [PriceSelectionResult](/references/services/types/PriceSelectionResult)>>
Calculate the original and discount price for a given variant in a set of circumstances described in the context.
Parameters
data
{ quantity?: number ; variantId: string }[]RequiredDetails 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
onVariantsPricesUpdate
**onVariantsPricesUpdate**(variantIds): Promise<void>
Notify price selection strategy that variants prices have been updated.
Parameters
variantIds
string[]RequiredThe ids of the updated variants
Returns
Promise<void>
Promise
Promise<void>RequiredwithTransaction
**withTransaction**(transactionManager?): [IPriceSelectionStrategy](/references/services/interfaces/IPriceSelectionStrategy)
Parameters
transactionManager
EntityManagerReturns
Was this section helpful?