createMoneyAmounts - Pricing Module Reference
BetaThis documentation provides a reference to the createMoneyAmounts
method. This belongs to the Pricing Module.
This method creates money amounts.
Example
import {
initialize as initializePricingModule,
} from "@medusajs/pricing"
async function retrieveMoneyAmounts () {
const pricingService = await initializePricingModule()
const moneyAmounts = await pricingService.createMoneyAmounts([
{
amount: 500,
currency_code: "USD",
},
{
amount: 400,
currency_code: "USD",
min_quantity: 0,
max_quantity: 4
}
])
// do something with the money amounts or return them
}
Parameters
The money amounts to create.
Returns
The list of created money amounts.
Was this section helpful?