Skip to main content
Skip to main content

create - Store Module Reference

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

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

This method creates stores.

Example

const stores = await storeModuleService.create([
{
name: "Acme",
supported_currency_codes: ["usd", "eur"],
default_currency_code: "usd",
},
{
name: "Acme 2",
supported_currency_codes: ["usd"],
default_currency_code: "usd",
},
])

Parameters

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

Returns

PromisePromise<StoreDTO[]>Required
The created stores.

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

This method creates a store.

Example

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

Parameters

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

Returns

PromisePromise<StoreDTO>Required
The created store.
Was this section helpful?