PriceListService
Provides layer to manipulate product tags.
constructor
Parameters
__namedParameters
PriceListConstructorPropsRequiredProperties
manager_
EntityManagerRequiredtransactionManager_
undefined | EntityManagerRequired__container__
anyRequiredfeatureFlagRouter_
FlagRouterRequired__configModule__
Record<string, unknown>__moduleDeclaration__
Record<string, unknown>Accessors
activeManager_
Returns
EntityManager
EntityManagerRequiredMethods
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>Requiredretrieve
Retrieves a product tag by id.
Parameters
priceListId
stringRequiredDefault: {}
Returns
listPriceListsVariantIdsMap
Parameters
priceListIds
string | string[]RequiredReturns
Promise
Promise<object>Requiredcreate
Creates a Price List
Parameters
Returns
update
Updates a Price List
Parameters
id
stringRequiredReturns
addPrices
Adds prices to a price list in bulk, optionally replacing all existing prices
Parameters
id
stringRequiredreplace
booleanRequiredDefault: false
Returns
deletePrices
Removes prices from a price list and deletes the removed prices in bulk
Parameters
id
stringRequiredpriceIds
string[]RequiredReturns
Promise
Promise<void>RequiredclearPrices
Removes all prices from a price list and deletes the removed prices in bulk
Parameters
id
stringRequiredReturns
Promise
Promise<void>Requireddelete
Deletes a Price List Will never fail due to delete being idempotent.
Parameters
id
stringRequiredReturns
Promise
Promise<void>Requiredlist
Lists Price Lists
Parameters
Default: {}
Returns
listAndCount
Lists Price Lists and adds count
Parameters
Default: {}
Returns
upsertCustomerGroups_
Parameters
priceListId
stringRequiredcustomerGroups
object[]RequiredReturns
Promise
Promise<void>RequiredlistProducts
Parameters
priceListId
stringRequiredDefault: {}
requiresPriceList
booleanRequiredDefault: false
Returns
listVariants
Parameters
priceListId
stringRequiredDefault: {}
requiresPriceList
booleanRequiredDefault: false
Returns
deleteProductPrices
Parameters
priceListId
stringRequiredproductIds
string[]RequiredReturns
Promise
Promise<[string[], number]>RequireddeleteVariantPrices
Parameters
priceListId
stringRequiredvariantIds
string[]RequiredReturns
Promise
Promise<[string[], number]>RequiredaddCurrencyFromRegion
Add currency_code
to an MA record if region_id
is passed.
Type Parameters
Parameters
prices
T[]RequiredReturns
Promise
Promise<T[]>Requiredprices
list