Skip to main content
Skip to main content

update - Pricing Module Reference

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

update(id, data, sharedContext?): Promise<PriceSetDTO>

This method is used to update a price set.

Example

const priceSet = await pricingModuleService.update(
"pset_123",
{
rules: [{ rule_attribute: "region_id" }],
}
)

Parameters

idstringRequired
The ID of the price set to be updated.
dataUpdatePriceSetDTORequired
The attributes of the price set to be updated
sharedContextContext
A context used to share resources, such as transaction manager, between the application and the module.

Returns

PromisePromise<PriceSetDTO>Required
The updated price set.

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

This method is used to update a list of price sets determined by the selector filters.

Example

const priceSets = await pricingModuleService.update(
{
id: ["pset_123", "pset_321"],
},
{
rules: [{ rule_attribute: "region_id" }],
}
)

Parameters

selectorFilterablePriceSetPropsRequired
The filters that will determine which price sets will be updated.
dataUpdatePriceSetDTORequired
The attributes to be updated on the selected price sets
sharedContextContext
A context used to share resources, such as transaction manager, between the application and the module.

Returns

PromisePromise<PriceSetDTO[]>Required
The updated price sets.
Was this section helpful?