Files
medusa-store/docs/content/references/services/classes/ProductCollectionService.md
Shahed Nasser e134f6d237 chore: fixed commit branch on generate reference action (#1857)
* fixed commit branch

* fixes after yarn upgrade
2022-07-15 18:08:07 +03:00

4.6 KiB

Class: ProductCollectionService

Hierarchy

  • "medusa-interfaces"

    ProductCollectionService

Constructors

constructor

new ProductCollectionService(__namedParameters)

Parameters

Name Type
__namedParameters Object

Overrides

BaseService.constructor

Defined in

services/product-collection.js:11

Methods

addProducts

addProducts(collectionId, productIds): Promise<any>

Parameters

Name Type
collectionId any
productIds any

Returns

Promise<any>

Defined in

services/product-collection.js:170


create

create(collection): Promise<ProductCollection>

Parameters

Name Type Description
collection any

Returns

Promise<ProductCollection>

Defined in

services/product-collection.js:104


delete

delete(collectionId): Promise<any>

Parameters

Name Type Description
collectionId string

Returns

Promise<any>

Defined in

services/product-collection.js:152


list

list(selector?, config?): Promise<any>

Parameters

Name Type Description
selector any
config any

Returns

Promise<any>

Defined in

services/product-collection.js:206


listAndCount

listAndCount(selector?, config?): Promise<any>

Parameters

Name Type Description
selector any
config any

Returns

Promise<any>

Defined in

services/product-collection.js:221


removeProducts

removeProducts(collectionId, productIds): Promise<any>

Parameters

Name Type
collectionId any
productIds any

Returns

Promise<any>

Defined in

services/product-collection.js:188


retrieve

retrieve(collectionId, config?): Promise<ProductCollection>

Parameters

Name Type Description
collectionId string
config any

Returns

Promise<ProductCollection>

Defined in

services/product-collection.js:55


retrieveByHandle

retrieveByHandle(collectionHandle, config?): Promise<ProductCollection>

Parameters

Name Type Description
collectionHandle string
config any

Returns

Promise<ProductCollection>

Defined in

services/product-collection.js:81


update

update(collectionId, update): Promise<ProductCollection>

Parameters

Name Type Description
collectionId string
update any

Returns

Promise<ProductCollection>

Defined in

services/product-collection.js:125


withTransaction

withTransaction(transactionManager): ProductCollectionService

Parameters

Name Type
transactionManager any

Returns

ProductCollectionService

Defined in

services/product-collection.js:32