IMarketplaceModuleService Reference
This section of the documentation provides a reference to theIMarketplaceModuleService interface’s methods. This is the interface developers use to use the functionalities provided by the Marketplace Module.
The main service interface for the Marketplace Module.
Methods
- createOrderSets
- updateOrderSets
- deleteOrderSets
- retrieveOrderSet
- listOrderSets
- listAndCountOrderSets
- softDeleteOrderSets
- restoreOrderSets
createOrderSets
This section provides a reference to thecreateOrderSets method. This belongs to the Marketplace Module.
createOrderSets(data, sharedContext?): Promise<OrderSetDTO[]>
This method creates order sets.Example
Parameters
The order sets to be created.
A context used to share resources, such as transaction manager, between the application and the module.
Returns
The created order sets.
createOrderSets(data, sharedContext?): Promise<OrderSetDTO>
This method creates an order set.Example
Parameters
The order set to be created.
A context used to share resources, such as transaction manager, between the application and the module.
Returns
The created order set.
updateOrderSets
This section provides a reference to theupdateOrderSets method. This belongs to the Marketplace Module.
updateOrderSets(id, data, sharedContext?): Promise<OrderSetDTO>
This method updates an existing order set.Example
Parameters
The ID of the order set.
The attributes to update in the order set.
A context used to share resources, such as transaction manager, between the application and the module.
Returns
The updated order set.
deleteOrderSets
This section provides a reference to thedeleteOrderSets method. This belongs to the Marketplace Module.
deleteOrderSets(ids, sharedContext?): Promise<void>
This method deletes order sets by their IDs.Example
Parameters
The IDs of the order sets.
A context used to share resources, such as transaction manager, between the application and the module.
Returns
Resolves when the order sets are deleted successfully.
deleteOrderSets(id, sharedContext?): Promise<void>
This method deletes an order set by its ID.Example
Parameters
The ID of the order set.
A context used to share resources, such as transaction manager, between the application and the module.
Returns
Resolves when the order set is deleted successfully.
retrieveOrderSet
This section provides a reference to theretrieveOrderSet method. This belongs to the Marketplace Module.
This method retrieves an order set by its ID.
Example
Parameters
The ID of the order set.
The configurations determining how the order set is retrieved. Its properties, such as
select or relations, accept the attributes or relations associated with an order set.A context used to share resources, such as transaction manager, between the application and the module.
Returns
The retrieved order set.
listOrderSets
This section provides a reference to thelistOrderSets method. This belongs to the Marketplace Module.
This method retrieves a paginated list of order sets based on optional filters and configuration.
Example
To retrieve a list of order sets using their IDs:15 records are retrieved. You can control pagination by specifying the skip and take properties of the config parameter:
Parameters
The filters to apply on the retrieved order sets.
The configurations determining how the order set is retrieved. Its properties, such as
select or relations, accept the attributes or relations associated with an order set.A context used to share resources, such as transaction manager, between the application and the module.
Returns
The list of order sets.
listAndCountOrderSets
This section provides a reference to thelistAndCountOrderSets method. This belongs to the Marketplace Module.
This method retrieves a paginated list of order sets along with the total count of available order sets satisfying the provided filters.
Example
To retrieve a list of order sets using their IDs:15 records are retrieved. You can control pagination by specifying the skip and take properties of the config parameter:
Parameters
The filters to apply on the retrieved order sets.
The configurations determining how the order set is retrieved.
A context used to share resources, such as transaction manager, between the application and the module.
Returns
The list of order sets along with their total count.
softDeleteOrderSets
This section provides a reference to thesoftDeleteOrderSets method. This belongs to the Marketplace Module.
This method soft deletes order sets by their IDs.
Example
Parameters
The IDs of the order sets.
An object that is used to specify an entity’s related entities that should be soft-deleted when the main entity is soft-deleted.
A context used to share resources, such as transaction manager, between the application and the module.
Returns
An object that includes the IDs of related records that were also soft deleted. If there are no related records, the promise resolves to
void.restoreOrderSets
This section provides a reference to therestoreOrderSets method. This belongs to the Marketplace Module.
This method restores soft deleted order sets by their IDs.
Example
Parameters
The IDs of the order sets.
Configurations determining which relations to restore along with each of the order set.
A context used to share resources, such as transaction manager, between the application and the module.
Returns
An object that includes the IDs of related records that were restored. If there are no related records restored, the promise resolves to
void.