updateOrderClaims - Order Module Reference

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

NoteYou should only use this methods when implementing complex customizations. For common cases, check out available workflows instead.

updateOrderClaims(data, sharedContext?): Promise<OrderClaimDTO[]>#

This method updates existing order claims.

Example#

Code
1const claims = await orderModuleService.updateOrderClaims([2  {3    selector: {4      id: "123"5    },6    data: {7      type: "refund"8    }9  }10])

Parameters#

The filters specifying which order claims to update, and the data to update in them.
sharedContextContextOptional
A context used to share resources, such as transaction manager, between the application and the module.

Returns#

PromisePromise<OrderClaimDTO[]>
The updated order claims.

updateOrderClaims(selector, data, sharedContext?): Promise<OrderClaimDTO[]>#

This method updates existing order claims matching the specified filters.

Example#

Code
1const claims = await orderModuleService.updateOrderClaims({2  id: "123"3}, {4  type: "refund"5})

Parameters#

selectorPartial<FilterableOrderClaimProps>
The filters specifying which order claims to update.
dataPartial<UpdateOrderClaimDTO>
The data to update in the order claims.
sharedContextContextOptional
A context used to share resources, such as transaction manager, between the application and the module.

Returns#

PromisePromise<OrderClaimDTO[]>
The updated order claims.

updateOrderClaims(id, data, sharedContext?): Promise<OrderClaimDTO>#

This method updates an existing order claim.

Example#

Code
1const claim = await orderModuleService.updateOrderClaims("123", {2  type: "refund"3})

Parameters#

idstring
The ID of the order claim.
dataPartial<UpdateOrderClaimDTO>
The data to update in the order claim.
sharedContextContextOptional
A context used to share resources, such as transaction manager, between the application and the module.

Returns#

PromisePromise<OrderClaimDTO>
The updated order claim.
Was this page helpful?
Ask Anything
FAQ
What is Medusa?
How can I create a module?
How can I create a data model?
How do I create a workflow?
How can I extend a data model in the Product Module?
Recipes
How do I build a marketplace with Medusa?
How do I build digital products with Medusa?
How do I build subscription-based purchases with Medusa?
What other recipes are available in the Medusa documentation?
Chat is cleared on refresh
Line break