Skip to main content

Class: SalesChannelInventoryService

Constructors

constructor

new SalesChannelInventoryService(__namedParameters)

Parameters

NameType
__namedParametersInjectedDependencies

Defined in

packages/medusa/src/services/sales-channel-inventory.ts:21

Properties

eventBusService_

Protected Readonly eventBusService_: EventBusService

Defined in

packages/medusa/src/services/sales-channel-inventory.ts:18


inventoryService_

Protected Readonly inventoryService_: IInventoryService

Defined in

packages/medusa/src/services/sales-channel-inventory.ts:19


manager_

Protected manager_: EntityManager

Defined in

packages/medusa/src/services/sales-channel-inventory.ts:15


salesChannelLocationService_

Protected Readonly salesChannelLocationService_: SalesChannelLocationService

Defined in

packages/medusa/src/services/sales-channel-inventory.ts:17

Methods

retrieveAvailableItemQuantity

retrieveAvailableItemQuantity(salesChannelId, inventoryItemId): Promise<number>

Retrieves the available quantity of an item across all sales channel locations

Parameters

NameTypeDescription
salesChannelIdstringSales channel id
inventoryItemIdstringItem id

Returns

Promise<number>

available quantity of item across all sales channel locations

Defined in

packages/medusa/src/services/sales-channel-inventory.ts:39