ShipmentService
Documentation for Merch's ShipmentService
The Shipment service is used to manage shipments in Merch.
The ShipmentService is exposed through the
MerchelloContextvar shipmentService = MerchelloContext.Current.Services.ShipmentService;
Class
public class ShipmentService : MerchelloRepositoryService,
IShipmentService, IService
Constructors
| Name | Description |
|---|---|
| ShipmentService() | Initializes a new instance of the ShipmentService class. |
| ShipmentService(ILogger) | Initializes a new instance of the ShipmentService class. |
| ShipmentService(RepositoryFactory, ILogger) | Initializes a new instance of the ShipmentService class. |
| ShipmentService(IDatabaseUnitOfWorkProvider, RepositoryFactory, ILogger, IStoreSettingService) | Initializes a new instance of the ShipmentService class. |
| ShipmentService(IDatabaseUnitOfWorkProvider, RepositoryFactory, ILogger, IEventMessagesFactory, IStoreSettingService) | Initializes a new instance of the ShipmentService class. |
Public Methods
| Name | Description |
|---|---|
| CreateShipment(IShipmentStatus, Boolean) | Creates a IShipment without persisting it to the database. |
| CreateShipment(IShipmentStatus, IAddress, IAddress, Boolean) | Creates a IShipment without persisting it to the database. |
| CreateShipment(IShipmentStatus, IAddress, IAddress, LineItemCollection, Boolean) | Creates a IShipment without persisting it to the database. |
| Delete(IShipment, Boolean) | Deletes a single IShipment |
| Delete(IEnumerable(IShipment), Boolean) | Deletes a collection of IShipment |
| GetAllShipmentStatuses | Returns a collection of all IShipmentStatus |
| GetByKey | Gets an IShipment object by its 'UniqueId' |
| GetByKeys | Gets list of IShipment objects given a list of Unique keys |
| GetShipmentsByOrderKey | Gets a collection of IShipment give an order key |
| GetShipmentsByShipMethodKey | Gets a list of IShipment object given a ship method Key |
| GetShipmentStatusByKey | Saves a single IShipment |
| Save(IShipment, Boolean) | Saves a single IShipment |
| Save(IEnumerable(IShipment), Boolean) | Saves a collection of IShipment |
Events
| Name | Description |
|---|---|
| Creating | Occurs before create |
| Deleting | Occurs before delete |
| Deleted | Occurs after delete |
| Saving | Occurs before save |
| Saved | Occurs after save |
| StatusChanging | Occurs before a shipment status has changed |
| StatusChanged | Occurs after a shipment status has changed |
| UpdatedOrder | Special event that fires when an order record is updated |
Interface on GitHub
Updated less than a minute ago
