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 |