Skip to main content

Class: CustomShippingOptionService

Hierarchy

  • "medusa-interfaces"

    CustomShippingOptionService

Constructors

constructor

new CustomShippingOptionService(__namedParameters)

Parameters

NameType
__namedParametersObject

Overrides

BaseService.constructor

Defined in

services/custom-shipping-option.js:5

Methods

create

create(data, config?): Promise<CustomShippingOption>

Creates a custom shipping option associated with a given author

Parameters

NameTypeDescription
dataanythe custom shipping option to create
configanyany configurations if needed, including meta data

Returns

Promise<CustomShippingOption>

resolves to the creation result

Defined in

services/custom-shipping-option.js:88


list

list(selector, config?): Promise<CustomShippingOption[]>

Fetches all custom shipping options related to the given selector

Parameters

NameTypeDescription
selectoranythe query object for find
configanythe configuration used to find the objects. contains relations, skip, and take.

Returns

Promise<CustomShippingOption[]>

custom shipping options matching the query

Defined in

services/custom-shipping-option.js:65


retrieve

retrieve(id, config?): Promise<CustomShippingOption>

Retrieves a specific shipping option.

Parameters

NameTypeDescription
idstringthe id of the custom shipping option to retrieve.
configanyany options needed to query for the result.

Returns

Promise<CustomShippingOption>

which resolves to the requested custom shipping option.

Defined in

services/custom-shipping-option.js:40


withTransaction

withTransaction(manager): CustomShippingOptionService

Sets the service's manager to a given transaction manager

Parameters

NameTypeDescription
managerEntityManagerthe manager to use

Returns

CustomShippingOptionService

a cloned CustomShippingOption service

Defined in

services/custom-shipping-option.js:20