Skip to main content
Skip to main content

addAddresses - Customer Module Reference

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

addAddresses(addresses, sharedContext?): Promise<CustomerAddressDTO[]>

This method adds addresses to customers.

Example

const addresses = await customerModuleService.addAddresses([
{
customer_id: "cus_123",
address_name: "Home",
address_1: "432 Stierlin Rd",
city: "Mountain View",
country_code: "us",
},
])

Parameters

addressesCreateCustomerAddressDTO[]Required
A list of items, each being the details of the address to add to a customer.
sharedContextContext
A context used to share resources, such as transaction manager, between the application and the module.

Returns

PromisePromise<CustomerAddressDTO[]>Required
The list of created addresses.

addAddresses(address, sharedContext?): Promise<CustomerAddressDTO>

This method adds an address to a customer.

Example

const address = await customerModuleService.addAddresses({
customer_id: "cus_123",
address_name: "Home",
address_1: "432 Stierlin Rd",
city: "Mountain View",
country_code: "us",
})

Parameters

The details of the address to add to a customer.
sharedContextContext
A context used to share resources, such as transaction manager, between the application and the module.

Returns

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