PricingService
Allows retrieval of prices.
constructor
Parameters
__namedParameters
InjectedDependenciesRequiredProperties
manager_
EntityManagerRequiredtransactionManager_
undefined | EntityManagerRequired__container__
anyRequiredfeatureFlagRouter
FlagRouterRequired__configModule__
Record<string, unknown>__moduleDeclaration__
Record<string, unknown>Accessors
activeManager_
Returns
EntityManager
EntityManagerRequiredpricingModuleService
Returns
IPricingModuleService
objectRequiredremoteQuery
Returns
RemoteQueryFunction
(query: string | RemoteJoinerQuery | object, variables?: Record<string, unknown>, options?: RemoteJoinerOptions) => Promise<any> | nullRequiredMethods
withTransaction
Parameters
transactionManager
EntityManagerReturns
this
thisRequiredshouldRetryTransaction_
Parameters
err
Record<string, unknown> | objectRequiredReturns
boolean
booleanRequiredatomicPhase_
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>RequiredcollectPricingContext
Collects additional information necessary for completing the price selection.
Parameters
Returns
Promise
Promise<PricingContext>RequiredcalculateTaxes
Gets the prices for a product variant
Parameters
Returns
TaxedPricing
objectRequiredgetProductVariantPricing_
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.
getProductVariantsPricing
Gets the prices for a collection of variants.
Parameters
data
object[]RequiredReturns
Promise
Promise<object>RequiredgetProductPricing_
Parameters
data
object[]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
setVariantPrices
Set additional prices on a list of product variants.
Parameters
Default: {}
Returns
setProductPrices
Set additional prices on a list of products.
Parameters
Default: {}
Returns
setAdminVariantPricing
Parameters
Default: {}
Returns
setAdminProductPricing
Parameters
Returns
getShippingOptionPricing
Gets the prices for a shipping option.
Parameters
Returns
setShippingOptionPrices
Set additional prices on a list of shipping options.
Parameters
Default: {}