OrderEditService
constructor
Parameters
__namedParameters
InjectedDependenciesRequiredProperties
__configModule__
Record<string, unknown>__container__
anyRequired__moduleDeclaration__
Record<string, unknown>manager_
EntityManagerRequiredtransactionManager_
undefined | EntityManagerRequiredEvents
objectRequiredEvents.CANCELED
stringRequiredDefault: "order-edit.canceled"
Events.CONFIRMED
stringRequiredDefault: "order-edit.confirmed"
Events.CREATED
stringRequiredDefault: "order-edit.created"
Events.DECLINED
stringRequiredDefault: "order-edit.declined"
Events.REQUESTED
stringRequiredDefault: "order-edit.requested"
Events.UPDATED
stringRequiredDefault: "order-edit.updated"
Accessors
activeManager_
Returns
EntityManager
EntityManagerRequiredinventoryService_
Returns
undefined \| IInventoryService
undefined | IInventoryServiceMethods
addLineItem
Parameters
orderEditId
stringRequireddata
AddOrderEditLineItemInputRequiredReturns
Promise
Promise<void>RequiredatomicPhase_
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>Requiredthe transactional work to be done
isolationOrErrorHandler
IsolationLevel | (error: TError) => Promise<void | TResult>the isolation level to be used for the work.
maybeErrorHandlerOrDontFail
(error: TError) => Promise<void | TResult>Potential error handler
Returns
Promise
Promise<TResult>Requiredthe result of the transactional work
cancel
Parameters
orderEditId
stringRequiredcontext
objectRequiredDefault: {}
context.canceledBy
stringReturns
confirm
Parameters
orderEditId
stringRequiredcontext
objectRequiredDefault: {}
context.confirmedBy
stringReturns
create
Parameters
data
CreateOrderEditInputRequiredcontext
objectRequiredcontext.createdBy
stringRequiredReturns
decline
Parameters
orderEditId
stringRequiredcontext
objectRequiredcontext.declinedBy
stringcontext.declinedReason
stringReturns
decorateTotals
Parameters
Returns
delete
Parameters
id
stringRequiredReturns
Promise
Promise<void>RequireddeleteClonedItems
Parameters
orderEditId
stringRequiredReturns
Promise
Promise<void>RequireddeleteItemChange
Parameters
orderEditId
stringRequireditemChangeId
stringRequiredReturns
Promise
Promise<void>Requiredlist
Parameters
config
FindConfig<OrderEdit>Returns
listAndCount
Parameters
config
FindConfig<OrderEdit>Returns
refreshAdjustments
Parameters
orderEditId
stringRequiredconfig
objectRequiredconfig.preserveCustomAdjustments
booleanRequiredDefault: false
Returns
Promise
Promise<void>RequiredremoveLineItem
Parameters
orderEditId
stringRequiredlineItemId
stringRequiredReturns
Promise
Promise<void>RequiredrequestConfirmation
Parameters
orderEditId
stringRequiredcontext
objectRequiredDefault: {}
context.requestedBy
stringReturns
retrieve
Parameters
orderEditId
stringRequiredDefault: {}
Returns
retrieveActive
Parameters
orderId
stringRequiredDefault: {}
Returns
shouldRetryTransaction_
Parameters
err
Record<string, unknown> | objectRequiredReturns
boolean
booleanupdate
Parameters
orderEditId
stringRequiredReturns
updateLineItem
Create or update order edit item change line item and apply the quantity
- If the item change already exists then update the quantity of the line item as well as the line adjustments
- If the item change does not exist then create the item change of type update and apply the quantity as well as update the line adjustments
Parameters
orderEditId
stringRequireditemId
stringRequireddata
objectRequireddata.quantity
numberRequiredReturns
Promise
Promise<void>RequiredwithTransaction
Parameters
transactionManager
EntityManagerReturns
OrderEditService
objectRequiredisOrderEditActive
Parameters
Returns
boolean
booleanWas this section helpful?