Skip to main content
Skip to main content

createAddresses - Order Module Reference

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

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

This method creates {return type}(s)

Example

await orderModuleService.createAddresses([
{
first_name: "John",
last_name: "Doe",
address_1: "123 Main St",
city: "Anytown",
country_code: "US",
province: "AnyState",
postal_code: "12345"
}
]);

Parameters

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

Returns

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

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

This method creates {return type}(s)

Example

const orderAddressData: CreateOrderAddressDTO = {
orderId: '123',
line1: '123 Main St',
city: 'Metropolis',
state: 'NY',
postalCode: '12345',
country: 'USA'
};

const result = await orderModuleService.createAddresses(orderAddressData);

Parameters

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

Returns

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