PricingService
Allows retrieval of prices.
Properties
__configModule__
Record<string, unknown>__container__
anyRequired__moduleDeclaration__
Record<string, unknown>getPricingModuleVariantMoneyAmounts
anyRequiredgetProductPricing_
anyRequiredgetProductVariantPricingModulePricing_
anyRequiredgetProductVariantPricing_
anyRequiredmanager_
EntityManagerRequiredtransactionManager_
undefined | EntityManagerRequiredAccessors
activeManager_
Returns
EntityManager
EntityManagerRequiredpricingModuleService
Returns
addPrices
(data: AddPricesDTO, sharedContext?: Context) => Promise<PriceSetDTO>(data: AddPricesDTO[], sharedContext?: Context) => Promise<PriceSetDTO[]>RequiredaddRules
(data: AddRulesDTO, sharedContext?: Context) => Promise<PriceSetDTO>(data: AddRulesDTO[], sharedContext?: Context) => Promise<PriceSetDTO[]>RequiredcalculatePrices
(filters: PricingFilters, context?: PricingContext, sharedContext?: Context) => Promise<CalculatedPriceSetDTO>Requiredcreate
(data: CreatePriceSetDTO, sharedContext?: Context) => Promise<PriceSetDTO>(data: CreatePriceSetDTO[], sharedContext?: Context) => Promise<PriceSetDTO[]>RequiredcreateCurrencies
(data: CreateCurrencyDTO[], sharedContext?: Context) => Promise<CurrencyDTO[]>RequiredcreateMoneyAmounts
(data: CreateMoneyAmountDTO[], sharedContext?: Context) => Promise<MoneyAmountDTO[]>RequiredcreatePriceRules
(data: CreatePriceRuleDTO[], sharedContext?: Context) => Promise<PriceRuleDTO[]>RequiredcreatePriceSetMoneyAmountRules
(data: CreatePriceSetMoneyAmountRulesDTO[], sharedContext?: Context) => Promise<PriceSetMoneyAmountRulesDTO[]>RequiredcreateRuleTypes
(data: CreateRuleTypeDTO[], sharedContext?: Context) => Promise<RuleTypeDTO[]>Requiredlist
(filters?: FilterablePriceSetProps, config?: FindConfig<PriceSetDTO>, sharedContext?: Context) => Promise<PriceSetDTO[]>RequiredlistAndCount
(filters?: FilterablePriceSetProps, config?: FindConfig<PriceSetDTO>, sharedContext?: Context) => Promise<[PriceSetDTO[], number]>RequiredlistAndCountCurrencies
(filters?: FilterableCurrencyProps, config?: FindConfig<CurrencyDTO>, sharedContext?: Context) => Promise<[CurrencyDTO[], number]>RequiredlistAndCountMoneyAmounts
(filters?: FilterableMoneyAmountProps, config?: FindConfig<MoneyAmountDTO>, sharedContext?: Context) => Promise<[MoneyAmountDTO[], number]>RequiredlistAndCountPriceRules
(filters?: FilterablePriceRuleProps, config?: FindConfig<PriceRuleDTO>, sharedContext?: Context) => Promise<[PriceRuleDTO[], number]>RequiredlistAndCountPriceSetMoneyAmountRules
(filters?: FilterablePriceSetMoneyAmountRulesProps, config?: FindConfig<PriceSetMoneyAmountRulesDTO>, sharedContext?: Context) => Promise<[PriceSetMoneyAmountRulesDTO[], number]>RequiredlistAndCountPriceSetMoneyAmounts
(filters?: FilterablePriceSetMoneyAmountProps, config?: FindConfig<PriceSetMoneyAmountDTO>, sharedContext?: Context) => Promise<[PriceSetMoneyAmountDTO[], number]>RequiredlistAndCountRuleTypes
(filters?: FilterableRuleTypeProps, config?: FindConfig<RuleTypeDTO>, sharedContext?: Context) => Promise<[RuleTypeDTO[], number]>RequiredlistCurrencies
(filters?: FilterableCurrencyProps, config?: FindConfig<CurrencyDTO>, sharedContext?: Context) => Promise<CurrencyDTO[]>RequiredlistMoneyAmounts
(filters?: FilterableMoneyAmountProps, config?: FindConfig<MoneyAmountDTO>, sharedContext?: Context) => Promise<MoneyAmountDTO[]>RequiredlistPriceRules
(filters?: FilterablePriceRuleProps, config?: FindConfig<PriceRuleDTO>, sharedContext?: Context) => Promise<PriceRuleDTO[]>RequiredlistPriceSetMoneyAmountRules
(filters?: FilterablePriceSetMoneyAmountRulesProps, config?: FindConfig<PriceSetMoneyAmountRulesDTO>, sharedContext?: Context) => Promise<PriceSetMoneyAmountRulesDTO[]>RequiredlistPriceSetMoneyAmounts
(filters?: FilterablePriceSetMoneyAmountProps, config?: FindConfig<PriceSetMoneyAmountDTO>, sharedContext?: Context) => Promise<PriceSetMoneyAmountDTO[]>RequiredlistRuleTypes
(filters?: FilterableRuleTypeProps, config?: FindConfig<RuleTypeDTO>, sharedContext?: Context) => Promise<RuleTypeDTO[]>Requiredretrieve
(id: string, config?: FindConfig<PriceSetDTO>, sharedContext?: Context) => Promise<PriceSetDTO>RequiredretrieveCurrency
(code: string, config?: FindConfig<CurrencyDTO>, sharedContext?: Context) => Promise<CurrencyDTO>RequiredretrieveMoneyAmount
(id: string, config?: FindConfig<MoneyAmountDTO>, sharedContext?: Context) => Promise<MoneyAmountDTO>RequiredretrievePriceRule
(id: string, config?: FindConfig<PriceRuleDTO>, sharedContext?: Context) => Promise<PriceRuleDTO>RequiredretrievePriceSetMoneyAmountRules
(id: string, config?: FindConfig<PriceSetMoneyAmountRulesDTO>, sharedContext?: Context) => Promise<PriceSetMoneyAmountRulesDTO>RequiredretrieveRuleType
(id: string, config?: FindConfig<RuleTypeDTO>, sharedContext?: Context) => Promise<RuleTypeDTO>RequiredupdateCurrencies
(data: UpdateCurrencyDTO[], sharedContext?: Context) => Promise<CurrencyDTO[]>RequiredupdateMoneyAmounts
(data: UpdateMoneyAmountDTO[], sharedContext?: Context) => Promise<MoneyAmountDTO[]>RequiredupdatePriceRules
(data: UpdatePriceRuleDTO[], sharedContext?: Context) => Promise<PriceRuleDTO[]>RequiredupdatePriceSetMoneyAmountRules
(data: UpdatePriceSetMoneyAmountRulesDTO[], sharedContext?: Context) => Promise<PriceSetMoneyAmountRulesDTO[]>RequiredupdateRuleTypes
(data: UpdateRuleTypeDTO[], sharedContext?: Context) => Promise<RuleTypeDTO[]>RequiredremoteQuery
Returns
RemoteQueryFunction
(query: string | RemoteJoinerQuery | object, variables?: Record<string, unknown>) => Promise<any> | nullRequiredMethods
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.
Parameters
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
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
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
{ quantity?: number ; variantId: string }[]RequiredReturns
getShippingOptionPricing
Gets the prices for a shipping option.
Parameters
Returns
setAdminProductPricing
Parameters
Returns
setAdminVariantPricing
Parameters
context
PriceSelectionContextReturns
setProductPrices
Set additional prices on a list of products.
Parameters
context
PriceSelectionContextReturns
setShippingOptionPrices
Set additional prices on a list of shipping options.
Parameters
context
Omit<PriceSelectionContext, "region_id">Returns
setVariantPrices
Set additional prices on a list of product variants.
Parameters
context
PriceSelectionContextReturns
shouldRetryTransaction_
Parameters
err
Record<string, unknown> | { code: string }RequiredReturns
boolean
booleanwithTransaction
Parameters
transactionManager
EntityManager