Skip to main content

Class: DiscountConditionService

Provides layer to manipulate discount conditions.

Copy to Clipboard

Hierarchy

  • Copy to Clipboard

    Copy to Clipboard

Constructors

constructor

new DiscountConditionService(Copy to Clipboard)

Parameters

NameType
Copy to ClipboardCopy to Clipboard

Overrides

TransactionBaseService.constructor

Defined in

packages/medusa/src/services/discount-condition.ts:37

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


discountConditionRepository_

Copy to Clipboard Copy to Clipboard discountConditionRepository_: typeof Copy to Clipboard

Defined in

packages/medusa/src/services/discount-condition.ts:31


eventBus_

Copy to Clipboard Copy to Clipboard eventBus_: Copy to Clipboard

Defined in

packages/medusa/src/services/discount-condition.ts:32


manager_

Copy to Clipboard manager_: Copy to Clipboard

Overrides

TransactionBaseService.manager_

Defined in

packages/medusa/src/services/discount-condition.ts:34


transactionManager_

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

Overrides

TransactionBaseService.transactionManager_

Defined in

packages/medusa/src/services/discount-condition.ts:35

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 ClipboardCopy 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:48


delete

delete(Copy to Clipboard): Copy to Clipboard<Copy to Clipboard | Copy to Clipboard>

Parameters

NameType
Copy to ClipboardCopy to Clipboard

Returns

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

Defined in

packages/medusa/src/services/discount-condition.ts:213


removeResources

removeResources(Copy to Clipboard): Copy to Clipboard<Copy to Clipboard>

Parameters

NameType
Copy to ClipboardCopy to Clipboard<Copy to Clipboard, Copy to Clipboard> & { Copy to Clipboard: Copy to Clipboard }

Returns

Copy to Clipboard<Copy to Clipboard>

Defined in

packages/medusa/src/services/discount-condition.ts:181


retrieve

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

Parameters

NameType
Copy to ClipboardCopy to Clipboard
Copy to ClipboardCopy to Clipboard<Copy to Clipboard>

Returns

Copy to Clipboard<Copy to Clipboard>

Defined in

packages/medusa/src/services/discount-condition.ts:49


shouldRetryTransaction_

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

Parameters

NameType
Copy to ClipboardCopy 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:29


upsertCondition

upsertCondition(Copy to Clipboard, Copy to Clipboard): Copy to Clipboard<(Copy to Clipboard | Copy to Clipboard | Copy to Clipboard | Copy to Clipboard | Copy to Clipboard)[]>

Parameters

NameTypeDefault value
Copy to ClipboardCopy to ClipboardCopy to Clipboard
Copy to ClipboardCopy to ClipboardCopy to Clipboard

Returns

Copy to Clipboard<(Copy to Clipboard | Copy to Clipboard | Copy to Clipboard | Copy to Clipboard | Copy to Clipboard)[]>

Defined in

packages/medusa/src/services/discount-condition.ts:109


withTransaction

withTransaction(Copy to Clipboard): Copy to Clipboard

Parameters

NameType
Copy to ClipboardCopy to Clipboard

Returns

Copy to Clipboard

Inherited from

TransactionBaseService.withTransaction

Defined in

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


resolveConditionType_

Copy to Clipboard Copy to Clipboard resolveConditionType_(Copy to Clipboard): Copy to Clipboard | { Copy to Clipboard: (Copy to Clipboard | { Copy to Clipboard: Copy to Clipboard })[] ; Copy to Clipboard: Copy to Clipboard }

Parameters

NameType
Copy to ClipboardCopy to Clipboard

Returns

Copy to Clipboard | { Copy to Clipboard: (Copy to Clipboard | { Copy to Clipboard: Copy to Clipboard })[] ; Copy to Clipboard: Copy to Clipboard }

Defined in

packages/medusa/src/services/discount-condition.ts:72