setPriceListRules - Pricing Module Reference
BetaThis documentation provides a reference to the setPriceListRules
method. This belongs to the Pricing Module.
This method is used to set the rules of a price list.
Example
import {
initialize as initializePricingModule,
} from "@medusajs/pricing"
async function setPriceListRules (priceListId: string) {
const pricingService = await initializePricingModule()
const priceList = await pricingService.setPriceListRules({
priceListId,
rules: {
region_id: "US"
}
})
// do something with the price list or return it
}
Parameters
The rules to set for a price list.
Returns
The updated price lists.
Was this section helpful?