createPriceListRules - Pricing Module Reference
BetaThis documentation provides a reference to the createPriceListRules
method. This belongs to the Pricing Module.
This method is used to create price list rules.
Example
import {
initialize as initializePricingModule,
} from "@medusajs/pricing"
async function createPriceListRules (items: {
rule_type_id: string
price_list_id: string
}[]) {
const pricingService = await initializePricingModule()
const priceListRules = await pricingService.createPriceListRules(items)
// do something with the price list rule or return them
}
Parameters
The price list rules to create.
Returns
The created price list rules.
Was this section helpful?