Skip to main content
Skip to main content

deleteAddresses - Customer Module Reference

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

deleteAddresses(addressId, sharedContext?): Promise<void>

This method deletes an address by its ID.

Example

await customerModuleService.deleteAddresses("cuaddr_123")

Parameters

addressIdstringRequired
The address's ID.
sharedContextContext
A context used to share resources, such as transaction manager, between the application and the module.

Returns

PromisePromise<void>Required
Resolves when the address is deleted successfully.

deleteAddresses(addressIds, sharedContext?): Promise<void>

This method deletes addresses by their IDs.

Example

await customerModuleService.deleteAddresses([
"cuaddr_123",
"cuaddr_321",
])

Parameters

addressIdsstring[]Required
The IDs of addresses.
sharedContextContext
A context used to share resources, such as transaction manager, between the application and the module.

Returns

PromisePromise<void>Required
Resolves when the addresses are deleted successfully.

deleteAddresses(selector, sharedContext?): Promise<void>

This method deletes addresses matching the specified filters.

Example

await customerModuleService.deleteAddresses({
first_name: "John",
last_name: "Smith",
})

Parameters

The filters that specify which addresses should be deleted.
sharedContextContext
A context used to share resources, such as transaction manager, between the application and the module.

Returns

PromisePromise<void>Required
Resolves when the addresses are deleted successfully.
Was this section helpful?