Skip to main content
Skip to main content

update - Store Module Reference

This documentation provides a reference to the update method. This belongs to the Store Module.

update(id, data, sharedContext?): Promise<StoreDTO>

This method updates an existing store.

Example

const store = await storeModuleService.update("store_123", {
name: "Acme",
})

Parameters

idstringRequired
The ID of the store.
dataUpdateStoreDTORequired
The attributes to update in the store.
sharedContextContext
A context used to share resources, such as transaction manager, between the application and the module.

Returns

PromisePromise<StoreDTO>Required
The updated store.

update(selector, data, sharedContext?): Promise<StoreDTO[]>

This method updates existing stores matching the specified filters.

Example

const store = await storeModuleService.update(
{
name: ["Acme"],
},
{
default_currency_code: "usd",
}
)

Parameters

selectorFilterableStorePropsRequired
The filters specifying which stores to update.
dataUpdateStoreDTORequired
The attributes to update in the store.
sharedContextContext
A context used to share resources, such as transaction manager, between the application and the module.

Returns

PromisePromise<StoreDTO[]>Required
The updated stores.
Was this section helpful?