Skip to main content
Skip to main content

create - Region Module Reference

This documentation provides a reference to the create method. This belongs to the Region Module.

create(data, sharedContext?): Promise<RegionDTO[]>

This method creates regions.

Example

const region = await regionModuleService.create([
{
name: "Europe",
currency_code: "eur",
countries: ["dk", "de", "fr"],
},
{
name: "United States of America",
currency_code: "usd",
countries: ["us"],
},
])

Parameters

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

Returns

PromisePromise<RegionDTO[]>Required
The created regions.

create(data, sharedContext?): Promise<RegionDTO>

This method creates a region.

Example

const region = await regionModuleService.create({
name: "Europe",
currency_code: "eur",
countries: ["dk", "de", "fr"],
})

Parameters

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

Returns

PromisePromise<RegionDTO>Required
The created region.
Was this section helpful?