Skip to main content

Class: CurrencyService

Hierarchy

  • Copy to Clipboard

    Copy to Clipboard

Constructors

constructor

new CurrencyService(

Copy to Clipboard
)

Parameters

NameType
Copy to Clipboard
Copy to Clipboard

Overrides

TransactionBaseService.constructor

Defined in

packages/medusa/src/services/currency.ts:32

Properties

__configModule__

Copy to Clipboard
Copy to Clipboard
Copy to Clipboard
__configModule__:
Copy to Clipboard
<
Copy to Clipboard
,
Copy to Clipboard
>

Inherited from

TransactionBaseService.__configModule__

Defined in

packages/medusa/src/interfaces/transaction-base-service.ts:10


__container__

Copy to Clipboard
Copy to Clipboard
__container__:
Copy to Clipboard

Inherited from

TransactionBaseService.__container__

Defined in

packages/medusa/src/interfaces/transaction-base-service.ts:9


currencyRepository_

Copy to Clipboard
Copy to Clipboard
currencyRepository_: typeof
Copy to Clipboard

Defined in

packages/medusa/src/services/currency.ts:28


eventBusService_

Copy to Clipboard
Copy to Clipboard
eventBusService_:
Copy to Clipboard

Defined in

packages/medusa/src/services/currency.ts:29


featureFlagRouter_

Copy to Clipboard
Copy to Clipboard
featureFlagRouter_:
Copy to Clipboard

Defined in

packages/medusa/src/services/currency.ts:30


manager_

Copy to Clipboard
manager_:
Copy to Clipboard

Overrides

TransactionBaseService.manager_

Defined in

packages/medusa/src/services/currency.ts:25


transactionManager_

Copy to Clipboard
transactionManager_:
Copy to Clipboard
|
Copy to Clipboard

Overrides

TransactionBaseService.transactionManager_

Defined in

packages/medusa/src/services/currency.ts:26


Events

Copy to Clipboard
Copy to Clipboard
Events:
Copy to Clipboard

Type declaration

NameType
Copy to Clipboard
Copy to Clipboard

Defined in

packages/medusa/src/services/currency.ts:21

Methods

atomicPhase_

Copy to Clipboard
atomicPhase_<
Copy to Clipboard
,
Copy to Clipboard
>(
Copy to Clipboard
,
Copy to Clipboard
,
Copy to Clipboard
):
Copy to Clipboard
<
Copy to Clipboard
>

Wraps some work within a transactional block. If the service already has a transaction manager attached this will be reused, otherwise a new transaction manager is created.

Type parameters

Name
Copy to Clipboard
Copy to Clipboard

Parameters

NameTypeDescription
Copy to Clipboard
(
Copy to Clipboard
:
Copy to Clipboard
) =>
Copy to Clipboard
<
Copy to Clipboard
>
the transactional work to be done
Copy to Clipboard
Copy to Clipboard
| (
Copy to Clipboard
:
Copy to Clipboard
) =>
Copy to Clipboard
<
Copy to Clipboard
|
Copy to Clipboard
>
the isolation level to be used for the work.
Copy to Clipboard
(
Copy to Clipboard
:
Copy to Clipboard
) =>
Copy to Clipboard
<
Copy to Clipboard
|
Copy to Clipboard
>
Potential error handler

Returns

Copy to Clipboard
<
Copy to Clipboard
>

the result of the transactional work

Inherited from

TransactionBaseService.atomicPhase_

Defined in

packages/medusa/src/interfaces/transaction-base-service.ts:50


listAndCount

listAndCount(

Copy to Clipboard
,
Copy to Clipboard
):
Copy to Clipboard
<[
Copy to Clipboard
[],
Copy to Clipboard
]>

Lists currencies based on the provided parameters and includes the count of currencies that match the query.

Parameters

NameTypeDescription
Copy to Clipboard
Copy to Clipboard
<
Copy to Clipboard
>
an object that defines rules to filter currencies by
Copy to Clipboard
Copy to Clipboard
<
Copy to Clipboard
>
object that defines the scope for what should be returned

Returns

Copy to Clipboard
<[
Copy to Clipboard
[],
Copy to Clipboard
]>

an array containing the currencies as the first element and the total count of products that matches the query as the second element.

Defined in

packages/medusa/src/services/currency.ts:81


retrieveByCode

retrieveByCode(

Copy to Clipboard
):
Copy to Clipboard
<
Copy to Clipboard
>

Return the currency

Parameters

NameTypeDescription
Copy to Clipboard
Copy to Clipboard
The code of the currency that must be retrieve

Returns

Copy to Clipboard
<
Copy to Clipboard
>

The currency

Defined in

packages/medusa/src/services/currency.ts:50


shouldRetryTransaction_

Copy to Clipboard
shouldRetryTransaction_(
Copy to Clipboard
):
Copy to Clipboard

Parameters

NameType
Copy to Clipboard
Copy to Clipboard
<
Copy to Clipboard
,
Copy to Clipboard
> | {
Copy to Clipboard
:
Copy to Clipboard
}

Returns

Copy to Clipboard

Inherited from

TransactionBaseService.shouldRetryTransaction_

Defined in

packages/medusa/src/interfaces/transaction-base-service.ts:31


update

update(

Copy to Clipboard
,
Copy to Clipboard
):
Copy to Clipboard
<
Copy to Clipboard
|
Copy to Clipboard
>

Update a currency

Parameters

NameTypeDescription
Copy to Clipboard
Copy to Clipboard
The code of the currency to update
Copy to Clipboard
Copy to Clipboard
The data that must be updated on the currency

Returns

Copy to Clipboard
<
Copy to Clipboard
|
Copy to Clipboard
>

The updated currency

Defined in

packages/medusa/src/services/currency.ts:103


withTransaction

withTransaction(

Copy to Clipboard
):
Copy to Clipboard

Parameters

NameType
Copy to Clipboard
Copy to Clipboard

Returns

Inherited from

TransactionBaseService.withTransaction

Defined in

packages/medusa/src/interfaces/transaction-base-service.ts:13