Skip to main content
Skip to main content

createTypes - Product Module Reference

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

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

This method is used to create a product type.

Example

const productTypes = await productModuleService.createTypes([
{
value: "digital",
},
])

Parameters

dataCreateProductTypeDTO[]Required
The product types to be created.
sharedContextContext
A context used to share resources, such as transaction manager, between the application and the module.

Returns

PromisePromise<ProductTypeDTO[]>Required
The list of created product types.

createTypes(data, sharedContext?): Promise<ProductTypeDTO>

This method is used to create a product type.

Example

const productType = await productModuleService.createTypes({
value: "digital",
})

Parameters

The product type to be created.
sharedContextContext
A context used to share resources, such as transaction manager, between the application and the module.

Returns

PromisePromise<ProductTypeDTO>Required
The created product type.
Was this section helpful?