Skip to main content
Skip to main content

update - Promotion Module Reference

This documentation provides a reference to the update method. This belongs to the Promotion Module.

update(data, sharedContext?): Promise<PromotionDTO[]>

This method updates existing promotions.

Example

const promotions = await promotionModuleService.update([
{
id: "promo_123",
is_automatic: true,
},
])

Parameters

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

Returns

PromisePromise<PromotionDTO[]>Required
The updated promotions.

update(data, sharedContext?): Promise<PromotionDTO>

This method updates an existing promotion.

Example

const promotion = await promotionModuleService.update({
id: "promo_123",
is_automatic: true,
})

Parameters

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

Returns

PromisePromise<PromotionDTO>Required
The updated promotion.
Was this section helpful?