updatePriceListRules - Pricing Module Reference
BetaThis documentation provides a reference to the updatePriceListRules
method. This belongs to the Pricing Module.
This method is used to update price list rules.
Example
import {
initialize as initializePricingModule,
} from "@medusajs/pricing"
async function updatePriceListRules (items: {
id: string
rule_type_id?: string
price_list_id?: string
}[]) {
const pricingService = await initializePricingModule()
const priceListRules = await pricingService.updatePriceListRules(items)
// do something with the price list rule or return them
}
Parameters
The attributes to update for each price list rule.
sharedContext
ContextA context used to share resources, such as transaction manager, between the application and the module.
sharedContext
ContextReturns
The updated price list rules.
Was this section helpful?