createPriceLists - Pricing Module Reference
BetaThis documentation provides a reference to the createPriceLists
method. This belongs to the Pricing Module.
This method is used to create price lists.
Example
import {
initialize as initializePricingModule,
} from "@medusajs/pricing"
async function createPriceList (items: {
title: string
description: string
starts_at?: string
ends_at?: string
}[]) {
const pricingService = await initializePricingModule()
const priceList = await pricingService.createPriceLists(items)
// do something with the price lists or return them
}
Parameters
The details of each price list to be created.
sharedContext
ContextA context used to share resources, such as transaction manager, between the application and the module.
sharedContext
ContextReturns
The created price lists.
Was this section helpful?