createCurrencies - Pricing Module Reference
BetaThis documentation provides a reference to the createCurrencies
method. This belongs to the Pricing Module.
This method is used to create new currencies.
Example
import {
initialize as initializePricingModule,
} from "@medusajs/pricing"
async function createCurrencies () {
const pricingService = await initializePricingModule()
const currencies = await pricingService.createCurrencies([
{
code: "USD",
symbol: "$",
symbol_native: "$",
name: "US Dollar",
}
])
// do something with the currencies or return them
}
Parameters
The currencies to create.
sharedContext
ContextA context used to share resources, such as transaction manager, between the application and the module.
sharedContext
ContextReturns
The list of created currencies.
Was this section helpful?