Skip to main content
Skip to main content

createAddresses - Cart Module Reference

This documentation provides a reference to the createAddresses method. This belongs to the Cart Module.

createAddresses(data, sharedContext?): Promise<CartAddressDTO[]>

This method creates addresses.

Example

const addresses = await cartModuleService.createAddresses([
{
address_1: "412 E Cheyenne Rd",
country_code: "us",
},
{
first_name: "Genevieve",
last_name: "Fox",
address_1: "17350 Northwest Fwy",
country_code: "us",
},
])

Parameters

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

Returns

PromisePromise<CartAddressDTO[]>Required
The created addresses.

createAddresses(data, sharedContext?): Promise<CartAddressDTO>

This method creates a address.

Example

const address = await cartModuleService.createAddresses({
first_name: "Genevieve",
last_name: "Fox",
address_1: "17350 Northwest Fwy",
country_code: "us",
})

Parameters

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

Returns

PromisePromise<CartAddressDTO>Required
The created address.
Was this section helpful?