Skip to main content
Skip to main content

updateOrderItem - Order Module Reference

This documentation provides a reference to the updateOrderItem method. This belongs to the Order Module.

updateOrderItem(selector, data, sharedContext?): Promise<OrderItemDTO[]>

This method updates existing {return type}(s).

Example

await orderModuleService.updateOrderItem(
{ id: "item123" },
{ quantity: "2" }
);

Parameters

selectorPartial<FilterableOrderShippingMethodProps>Required
Make all properties in T optional
dataUpdateOrderItemDTORequired
The attributes to update in the order item.
sharedContextContext
A context used to share resources, such as transaction manager, between the application and the module.

Returns

PromisePromise<OrderItemDTO[]>Required
The updated {return type}(s).

updateOrderItem(orderDetailId, data, sharedContext?): Promise<OrderItemDTO>

This method updates existing {return type}(s).

Example

await orderModuleService.updateOrderItem(
'orderDetailId123',
{
item_id: 'item123',
quantity: 2
}
);

Parameters

orderDetailIdstringRequired
The order detail's ID.
dataPartial<UpdateOrderItemDTO>Required
Make all properties in T optional
sharedContextContext
A context used to share resources, such as transaction manager, between the application and the module.

Returns

PromisePromise<OrderItemDTO>Required
The updated {return type}(s).

updateOrderItem(orderDetailIdOrDataOrSelector, data?, sharedContext?): Promise<OrderItemDTO | OrderItemDTO[]>

This method updates existing {return type}(s).

Example

await orderModuleService.updateOrderItem(
"order-detail-id",
{
quantity: 2,
item_id: 'item123',
}
);

Parameters

orderDetailIdOrDataOrSelectorstring | Partial<OrderItemDTO> | UpdateOrderItemWithSelectorDTO[]Required
The string | partial< order item d t o> | update order item with selector details.
{summary}
sharedContextContext
A context used to share resources, such as transaction manager, between the application and the module.

Returns

PromisePromise<OrderItemDTO | OrderItemDTO[]>Required
The updated {return type}(s).
Was this section helpful?