Skip to main content

Class: CustomShippingOptionService

Hierarchy

  • TransactionBaseServiceCopy to Clipboard

    CustomShippingOptionServiceCopy to Clipboard

Constructors

constructor

new CustomShippingOptionService(__namedParametersCopy to Clipboard)

Parameters

NameType
__namedParametersCopy to ClipboardInjectedDependenciesCopy to Clipboard

Overrides

TransactionBaseService.constructor

Defined in

packages/medusa/src/services/custom-shipping-option.ts:20

Properties

__configModule__

ProtectedCopy to Clipboard OptionalCopy to Clipboard ReadonlyCopy to Clipboard __configModule__: RecordCopy to Clipboard<stringCopy to Clipboard, unknownCopy to Clipboard>

Inherited from

TransactionBaseService.__configModule__

Defined in

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


__container__

ProtectedCopy to Clipboard ReadonlyCopy to Clipboard __container__: anyCopy to Clipboard

Inherited from

TransactionBaseService.__container__

Defined in

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


__moduleDeclaration__

ProtectedCopy to Clipboard OptionalCopy to Clipboard ReadonlyCopy to Clipboard __moduleDeclaration__: RecordCopy to Clipboard<stringCopy to Clipboard, unknownCopy to Clipboard>

Inherited from

TransactionBaseService.__moduleDeclaration__

Defined in

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


customShippingOptionRepository_

ProtectedCopy to Clipboard customShippingOptionRepository_: typeof CustomShippingOptionRepositoryCopy to Clipboard

Defined in

packages/medusa/src/services/custom-shipping-option.ts:18


manager_

ProtectedCopy to Clipboard manager_: EntityManagerCopy to Clipboard

Overrides

TransactionBaseService.manager_

Defined in

packages/medusa/src/services/custom-shipping-option.ts:15


transactionManager_

ProtectedCopy to Clipboard transactionManager_: undefinedCopy to Clipboard | EntityManagerCopy to Clipboard

Overrides

TransactionBaseService.transactionManager_

Defined in

packages/medusa/src/services/custom-shipping-option.ts:16

Methods

atomicPhase_

ProtectedCopy to Clipboard atomicPhase_<TResultCopy to Clipboard, TErrorCopy to Clipboard>(workCopy to Clipboard, isolationOrErrorHandler?Copy to Clipboard, maybeErrorHandlerOrDontFail?Copy to Clipboard): PromiseCopy to Clipboard<TResultCopy 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
TResultCopy to Clipboard
TErrorCopy to Clipboard

Parameters

NameTypeDescription
workCopy to Clipboard(transactionManagerCopy to Clipboard: EntityManagerCopy to Clipboard) => PromiseCopy to Clipboard<TResultCopy to Clipboard>the transactional work to be done
isolationOrErrorHandler?Copy to ClipboardIsolationLevelCopy to Clipboard | (errorCopy to Clipboard: TErrorCopy to Clipboard) => PromiseCopy to Clipboard<voidCopy to Clipboard | TResultCopy to Clipboard>the isolation level to be used for the work.
maybeErrorHandlerOrDontFail?Copy to Clipboard(errorCopy to Clipboard: TErrorCopy to Clipboard) => PromiseCopy to Clipboard<voidCopy to Clipboard | TResultCopy to Clipboard>Potential error handler

Returns

PromiseCopy to Clipboard<TResultCopy to Clipboard>

the result of the transactional work

Inherited from

TransactionBaseService.atomicPhase_

Defined in

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


create

create(dataCopy to Clipboard): PromiseCopy to Clipboard<CustomShippingOptionCopy to Clipboard>

Creates a custom shipping option

Parameters

NameTypeDescription
dataCopy to ClipboardCreateCustomShippingOptionInputCopy to Clipboardthe custom shipping option to create

Returns

PromiseCopy to Clipboard<CustomShippingOptionCopy to Clipboard>

resolves to the creation result

Defined in

packages/medusa/src/services/custom-shipping-option.ts:89


list

list(selectorCopy to Clipboard, config?Copy to Clipboard): PromiseCopy to Clipboard<CustomShippingOptionCopy to Clipboard[]>

Fetches all custom shipping options based on the given selector

Parameters

NameTypeDescription
selectorCopy to ClipboardSelectorCopy to Clipboard<CustomShippingOptionCopy to Clipboard>the query object for find
configCopy to ClipboardFindConfigCopy to Clipboard<CustomShippingOptionCopy to Clipboard>the configuration used to find the objects. contains relations, skip, and take.

Returns

PromiseCopy to Clipboard<CustomShippingOptionCopy to Clipboard[]>

custom shipping options matching the query

Defined in

packages/medusa/src/services/custom-shipping-option.ts:65


retrieve

retrieve(idCopy to Clipboard, config?Copy to Clipboard): PromiseCopy to Clipboard<CustomShippingOptionCopy to Clipboard>

Retrieves a specific shipping option.

Parameters

NameTypeDescription
idCopy to ClipboardstringCopy to Clipboardthe id of the custom shipping option to retrieve.
configCopy to ClipboardFindConfigCopy to Clipboard<CustomShippingOptionCopy to Clipboard>any options needed to query for the result.

Returns

PromiseCopy to Clipboard<CustomShippingOptionCopy to Clipboard>

the requested custom shipping option.

Defined in

packages/medusa/src/services/custom-shipping-option.ts:37


shouldRetryTransaction_

ProtectedCopy to Clipboard shouldRetryTransaction_(errCopy to Clipboard): booleanCopy to Clipboard

Parameters

NameType
errCopy to ClipboardRecordCopy to Clipboard<stringCopy to Clipboard, unknownCopy to Clipboard> | { codeCopy to Clipboard: stringCopy to Clipboard }

Returns

booleanCopy to Clipboard

Inherited from

TransactionBaseService.shouldRetryTransaction_

Defined in

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


withTransaction

withTransaction(transactionManager?Copy to Clipboard): CustomShippingOptionServiceCopy to Clipboard

Parameters

NameType
transactionManager?Copy to ClipboardEntityManagerCopy to Clipboard

Returns

CustomShippingOptionServiceCopy to Clipboard

Inherited from

TransactionBaseService.withTransaction

Defined in

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