Skip to main content
Skip to main content

updateTypes - Product Module Reference

This documentation provides a reference to the updateTypes method. This belongs to the Product Module.

updateTypes(id, data, sharedContext?): Promise<ProductTypeDTO>

This method is used to update a type.

Example

const productType = await productModuleService.updateTypes(
"ptyp_123",
{
value: "Digital",
}
)

Parameters

idstringRequired
The ID of the type to be updated.
The attributes of the type to be updated
sharedContextContext
A context used to share resources, such as transaction manager, between the application and the module.

Returns

PromisePromise<ProductTypeDTO>Required
The updated type.

updateTypes(selector, data, sharedContext?): Promise<ProductTypeDTO[]>

This method is used to update a list of types matching the specified filters.

Example

const productTypes = await productModuleService.updateTypes(
{
id: ["ptyp_123", "ptyp_321"],
},
{
value: "Digital",
}
)

Parameters

The filters specifying which types to update.
The attributes to be updated on the selected types
sharedContextContext
A context used to share resources, such as transaction manager, between the application and the module.

Returns

PromisePromise<ProductTypeDTO[]>Required
The updated types.
Was this section helpful?