PricingService
Allows retrieval of prices.
constructor
Parameters
__namedParameters
InjectedDependenciesRequiredProperties
__configModule__
Record<string, unknown>__container__
anyRequired__moduleDeclaration__
Record<string, unknown>featureFlagRouter
FlagRouterRequiredmanager_
EntityManagerRequiredtransactionManager_
undefined | EntityManagerRequiredAccessors
activeManager_
Returns
EntityManager
EntityManagerRequiredpricingModuleService
Returns
IPricingModuleService
objectRequiredremoteQuery
Returns
RemoteQueryFunction
RemoteQueryFunctionRequiredMethods
atomicPhase_
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
TResult
objectRequiredTError
objectRequiredParameters
work
(transactionManager: EntityManager) => Promise<TResult>RequiredisolationOrErrorHandler
IsolationLevel | (error: TError) => Promise<void | TResult>maybeErrorHandlerOrDontFail
(error: TError) => Promise<void | TResult>Returns
Promise
Promise<TResult>RequiredcalculateTaxes
Gets the prices for a product variant
Parameters
Returns
TaxedPricing
objectRequiredcollectPricingContext
Collects additional information necessary for completing the price selection.
Parameters
Returns
Promise
Promise<PricingContext>RequiredgetPricingModuleVariantMoneyAmounts
Parameters
variantIds
string[]RequiredReturns
getProductPricing
Gets all the variant prices for a product. All the product's variants will be fetched.
Parameters
Returns
getProductPricingById
Gets all the variant prices for a product by the product id
Parameters
productId
stringRequiredReturns
getProductPricing_
Parameters
data
object[]RequiredReturns
getProductVariantPricing
Gets the prices for a product variant.
Parameters
Returns
getProductVariantPricingById
Gets the prices for a product variant by a variant id.
Parameters
variantId
stringRequiredReturns
Deprecated
Use getProductVariantsPricing instead.
getProductVariantPricingModulePricing_
Parameters
variantPriceData
object[]RequiredReturns
Promise
Promise<Map<any, any>>RequiredgetProductVariantPricing_
Parameters
data
object[]RequiredReturns
getProductVariantsPricing
Gets the prices for a collection of variants.
Parameters
data
object[]RequiredReturns
Promise
Promise<object>RequiredgetShippingOptionPricing
Gets the prices for a shipping option.
Parameters
Returns
setAdminProductPricing
Parameters
Returns
setAdminVariantPricing
Parameters
Default: {}
Returns
setProductPrices
Set additional prices on a list of products.
Parameters
Default: {}
Returns
setShippingOptionPrices
Set additional prices on a list of shipping options.
Parameters
Default: {}
Returns
setVariantPrices
Set additional prices on a list of product variants.
Parameters
Default: {}
Returns
shouldRetryTransaction_
Parameters
err
Record<string, unknown> | objectRequiredReturns
boolean
booleanwithTransaction
Parameters
transactionManager
EntityManagerReturns
PricingService
objectRequired