Skip to main content
Skip to main content

updateAddresses - Order Module Reference

This documentation provides a reference to the updateAddresses method. This belongs to the Order Module.

updateAddresses(data, sharedContext?): Promise<OrderAddressDTO[]>

This method updates existing {return type}(s).

Example

const updatedAddress: UpdateOrderAddressDTO[] = [
{
id: "address1",
first_name: "John",
last_name: "Doe",
address_1: "123 Main St",
city: "Anytown",
country_code: "US",
province: "AnyState",
postal_code: "12345"
}
];

const result = await orderModuleService.updateAddresses(updatedAddress);

Parameters

dataUpdateOrderAddressDTO[]Required
The attributes to update in the order address.
sharedContextContext
A context used to share resources, such as transaction manager, between the application and the module.

Returns

PromisePromise<OrderAddressDTO[]>Required
The updated {return type}(s).

updateAddresses(data, sharedContext?): Promise<OrderAddressDTO>

This method updates existing {return type}(s).

Example

const updateOrderAddressData: UpdateOrderAddressDTO = {
id: '123',
address_1: '123 Main St',
city: 'Metropolis',
province: 'NY',
postal_code: '12345',
};

const updatedAddress = await orderModuleService.updateAddresses(updateOrderAddressData);

Parameters

The attributes to update in the order address.
sharedContextContext
A context used to share resources, such as transaction manager, between the application and the module.

Returns

PromisePromise<OrderAddressDTO>Required
The updated {return type}(s).
Was this section helpful?