OrderEditService
constructor
Parameters
__namedParameters
InjectedDependenciesRequiredProperties
manager_
EntityManagerRequiredtransactionManager_
undefined | EntityManagerRequired__container__
anyRequiredEvents
objectRequiredEvents.CREATED
stringRequiredDefault: "order-edit.created"
Events.UPDATED
stringRequiredDefault: "order-edit.updated"
Events.DECLINED
stringRequiredDefault: "order-edit.declined"
Events.REQUESTED
stringRequiredDefault: "order-edit.requested"
Events.CANCELED
stringRequiredDefault: "order-edit.canceled"
Events.CONFIRMED
stringRequiredDefault: "order-edit.confirmed"
__configModule__
Record<string, unknown>__moduleDeclaration__
Record<string, unknown>Accessors
activeManager_
Returns
EntityManager
EntityManagerRequiredinventoryService_
Returns
Methods
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>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
retrieve
Parameters
orderEditId
stringRequiredDefault: {}
Returns
listAndCount
Parameters
config
FindConfig<OrderEdit>Returns
list
Parameters
config
FindConfig<OrderEdit>Returns
create
Parameters
data
CreateOrderEditInputRequiredcontext
objectRequiredcontext.createdBy
stringRequiredReturns
update
Parameters
orderEditId
stringRequiredReturns
delete
Parameters
id
stringRequiredReturns
Promise
Promise<void>Requireddecline
Parameters
orderEditId
stringRequiredcontext
objectRequiredcontext.declinedReason
stringcontext.declinedBy
stringReturns
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>RequiredCreate 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
removeLineItem
Parameters
orderEditId
stringRequiredlineItemId
stringRequiredReturns
Promise
Promise<void>RequiredrefreshAdjustments
Parameters
orderEditId
stringRequiredconfig
objectRequiredconfig.preserveCustomAdjustments
booleanRequiredDefault: false
Returns
Promise
Promise<void>RequireddecorateTotals
Parameters
Returns
addLineItem
Parameters
orderEditId
stringRequireddata
AddOrderEditLineItemInputRequiredReturns
Promise
Promise<void>RequireddeleteItemChange
Parameters
orderEditId
stringRequireditemChangeId
stringRequiredReturns
Promise
Promise<void>RequiredrequestConfirmation
Parameters
orderEditId
stringRequiredcontext
objectRequiredDefault: {}
context.requestedBy
stringReturns
cancel
Parameters
orderEditId
stringRequiredcontext
objectRequiredDefault: {}
context.canceledBy
stringReturns
confirm
Parameters
orderEditId
stringRequiredcontext
objectRequiredDefault: {}
context.confirmedBy
stringReturns
retrieveActive
Parameters
orderId
stringRequiredDefault: {}
Returns
deleteClonedItems
Parameters
orderEditId
stringRequiredReturns
Promise
Promise<void>RequiredisOrderEditActive
Parameters
Returns
boolean
booleanRequiredWas this section helpful?