Class StockService
- Namespace
- Dynamicweb.Ecommerce.Stocks
- Assembly
- Dynamicweb.Ecommerce.dll
public class StockService : ICacheStorage<LanguageBasedKey<string>, IEnumerable<ProductStock>>, ICacheStorage<LanguageBasedKey<string>>, ICacheStorage
- Inheritance
-
StockService
- Implements
- Inherited Members
Constructors
StockService()
public StockService()
Methods
ClearCache()
Resets all keys to the default value for objects stored in the object cache
public void ClearCache()
ClearCache(LanguageBasedKey<string>)
Resets the specified key to the default value for objects stored in the object cache
public void ClearCache(LanguageBasedKey<string> key)
Parameters
keyLanguageBasedKey<string>- Key to reset
ClearCache(IEnumerable<LanguageBasedKey<string>>)
Resets the specified keys to the default value for objects stored in the object cache
public void ClearCache(IEnumerable<LanguageBasedKey<string>> keys)
Parameters
keysIEnumerable<LanguageBasedKey<string>>- Keys to reset
ClearStockGroupCache()
public void ClearStockGroupCache()
CreateStockLocationRelation(string, long)
public void CreateStockLocationRelation(string shopId, long stockLocationId)
Parameters
DeleteAllStockLocationRelationsFromShop(string)
public void DeleteAllStockLocationRelationsFromShop(string shopId)
Parameters
shopIdstring
DeleteStockGroup(string)
public void DeleteStockGroup(string stockGroupId)
Parameters
stockGroupIdstring
DeleteStockLocation(StockLocation)
public void DeleteStockLocation(StockLocation theStockLocation)
Parameters
theStockLocationStockLocation
DeleteStockLocation(StockLocation, long)
[Obsolete]
public void DeleteStockLocation(StockLocation theStockLocation, long id)
Parameters
theStockLocationStockLocationidlong
DeleteStockLocationCategory(string)
public void DeleteStockLocationCategory(string locationCategoryId)
Parameters
locationCategoryIdstring
DeleteStockLocationRelation(string, long)
public void DeleteStockLocationRelation(string shopId, long stockLocationId)
Parameters
DeleteStockLocationRelations(StockLocation)
public void DeleteStockLocationRelations(StockLocation theStockLocation)
Parameters
theStockLocationStockLocation
DeleteStockStatus(StockStatus)
public void DeleteStockStatus(StockStatus theStockStatus)
Parameters
theStockStatusStockStatus
DeleteStockStatusesByGroupId(string)
public void DeleteStockStatusesByGroupId(string groupId)
Parameters
groupIdstring
DeleteStockUnit(StockUnitIdentifier)
public void DeleteStockUnit(StockUnitIdentifier identifier)
Parameters
identifierStockUnitIdentifier
DeleteStockUnitDetail(StockUnitDetail)
public void DeleteStockUnitDetail(StockUnitDetail detail)
Parameters
detailStockUnitDetail
DeleteStockUnitDetail(StockUnitDetailIdentifier)
public void DeleteStockUnitDetail(StockUnitDetailIdentifier identifier)
Parameters
identifierStockUnitDetailIdentifier
DeleteStockUnits(string, string)
public void DeleteStockUnits(string productId, string variantId)
Parameters
DeleteStockUnits(string, string, string, long)
public void DeleteStockUnits(string productId, string variantId, string unitId, long stockLocationId)
Parameters
GetMaxStockUnitRowId()
[Obsolete("Never worked as intended.")]
public int GetMaxStockUnitRowId()
Returns
GetStockGroup(string)
public StockGroup GetStockGroup(string id)
Parameters
idstring
Returns
GetStockGroups()
public IEnumerable<StockGroup> GetStockGroups()
Returns
GetStockLocation(Product, long)
[Obsolete("Use the GetStockLocation instead.")]
public StockLocation GetStockLocation(Product product, long stockLocationId)
Parameters
Returns
GetStockLocation(long)
public StockLocation GetStockLocation(long stockLocationId)
Parameters
stockLocationIdlong
Returns
GetStockLocation(long, string)
[Obsolete("Use the overload without languageId and then use Translations on the stock location.")]
public StockLocation GetStockLocation(long stockLocationId, string languageId)
Parameters
Returns
GetStockLocationCategories()
public IEnumerable<StockLocationCategory> GetStockLocationCategories()
Returns
GetStockLocationCategory(string)
public StockLocationCategory GetStockLocationCategory(string id)
Parameters
idstring
Returns
GetStockLocationRelations(string)
public IEnumerable<StockLocation> GetStockLocationRelations(string shopId)
Parameters
shopIdstring
Returns
GetStockLocations()
public IEnumerable<StockLocation> GetStockLocations()
Returns
GetStockLocations(Product)
public IEnumerable<StockLocation> GetStockLocations(Product product)
Parameters
productProduct
Returns
GetStockLocations(Product, string)
[Obsolete("Use the overload without languageId and then use Translations on the stock location.")]
public IEnumerable<StockLocation> GetStockLocations(Product product, string languageId)
Parameters
Returns
GetStockLocations(bool)
public IEnumerable<StockLocation> GetStockLocations(bool sortByOrder)
Parameters
sortByOrderbool
Returns
GetStockLocations(long)
[Obsolete("Use the GetStockLocation instead and then use Translations on the stock location.")]
public IEnumerable<StockLocation> GetStockLocations(long groupId)
Parameters
groupIdlong
Returns
GetStockLocations(string)
[Obsolete("Use the overload without languageId and then use Translations on the stock location.")]
public IEnumerable<StockLocation> GetStockLocations(string languageId)
Parameters
languageIdstring
Returns
GetStockLocations(string, bool)
[Obsolete("Use the overload without languageId and then use Translations on the stock location.")]
public IEnumerable<StockLocation> GetStockLocations(string languageId, bool showUntranslated)
Parameters
Returns
GetStockStatus(string)
public StockStatus GetStockStatus(string id)
Parameters
idstring
Returns
GetStockStatus(string, string)
[Obsolete("Use GetStockStatus(string) overload instead.")]
public StockStatus GetStockStatus(string id, string languageId)
Parameters
Returns
GetStockStatuses(string, bool)
public IEnumerable<StockStatus> GetStockStatuses(string statusGroupId, bool orderBy)
Parameters
Returns
GetStockStatuses(string, bool, string)
[Obsolete("Use GetStockStatuses(String, Bool) overload instead.")]
public IEnumerable<StockStatus> GetStockStatuses(string statusGroupId, bool orderBy, string languageId)
Parameters
Returns
GetStockUnit(StockUnitIdentifier)
public StockUnit GetStockUnit(StockUnitIdentifier identifier)
Parameters
identifierStockUnitIdentifier
Returns
GetStockUnit(int)
[Obsolete("Use other GetStockUnit overload.")]
public StockUnit GetStockUnit(int rowId)
Parameters
rowIdint
Returns
GetStockUnit(string, string, string, StockLocation)
public StockUnit GetStockUnit(string productId, string variantId, string unitId, StockLocation stockLocation)
Parameters
productIdstringvariantIdstringunitIdstringstockLocationStockLocation
Returns
GetStockUnitDetail(StockUnitDetailIdentifier)
public StockUnitDetail GetStockUnitDetail(StockUnitDetailIdentifier identifier)
Parameters
identifierStockUnitDetailIdentifier
Returns
GetStockUnits(string, string)
public IEnumerable<StockUnit> GetStockUnits(string productId, string variantId)
Parameters
Returns
GetStockUnitsByUnitId(string)
public IEnumerable<StockUnit> GetStockUnitsByUnitId(string unitId)
Parameters
unitIdstring
Returns
GetStockUnitsWithVariants(Product)
[Obsolete("Use GetStockUnitsWithVariants(productId) instead.")]
public IEnumerable<StockUnit> GetStockUnitsWithVariants(Product product)
Parameters
productProduct
Returns
GetStockUnitsWithVariants(string)
public IEnumerable<StockUnit> GetStockUnitsWithVariants(string productId)
Parameters
productIdstring
Returns
GetStockUnitTotals(Product, string)
public Tuple<double, double, double> GetStockUnitTotals(Product product, string unitId)
Parameters
Returns
SaveStockGroup(StockGroup)
public StockGroup SaveStockGroup(StockGroup theStockGroup)
Parameters
theStockGroupStockGroup
Returns
SaveStockLocation(StockLocation)
public void SaveStockLocation(StockLocation theStockLocation)
Parameters
theStockLocationStockLocation
SaveStockLocationCategory(StockLocationCategory)
public void SaveStockLocationCategory(StockLocationCategory stockLocationCategory)
Parameters
stockLocationCategoryStockLocationCategory
SaveStockStatus(StockStatus)
public void SaveStockStatus(StockStatus theStockStatus)
Parameters
theStockStatusStockStatus
SaveStockStatus(StockStatus, string)
[Obsolete("Use SaveStockStatus(StockStatus) overload instead.")]
public void SaveStockStatus(StockStatus theStockStatus, string id)
Parameters
theStockStatusStockStatusidstring
SaveStockUnit(StockUnit)
public void SaveStockUnit(StockUnit theStockUnit)
Parameters
theStockUnitStockUnit
SaveStockUnitDetail(StockUnitDetail)
public void SaveStockUnitDetail(StockUnitDetail detail)
Parameters
detailStockUnitDetail