Skip to main content
Skip to main content

create - Customer Module Reference

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

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

This method creates customers.

Example

const customers = await customerModuleService.create([
{
email: "john@smith.com",
first_name: "John",
last_name: "Smith",
},
])

Parameters

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

Returns

PromisePromise<CustomerDTO[]>Required
The created customers.

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

This method creates a customer.

Example

const customer = await customerModuleService.create({
email: "john@smith.com",
first_name: "John",
last_name: "Smith",
})

Parameters

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

Returns

PromisePromise<CustomerDTO>Required
The created customer.
Was this section helpful?