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
key
LanguageBasedKey<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
keys
IEnumerable<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
shopId
string
DeleteStockGroup(string)
public void DeleteStockGroup(string stockGroupId)
Parameters
stockGroupId
string
DeleteStockLocation(StockLocation)
public void DeleteStockLocation(StockLocation theStockLocation)
Parameters
theStockLocation
StockLocation
DeleteStockLocation(StockLocation, long)
[Obsolete]
public void DeleteStockLocation(StockLocation theStockLocation, long id)
Parameters
theStockLocation
StockLocationid
long
DeleteStockLocationCategory(string)
public void DeleteStockLocationCategory(string locationCategoryId)
Parameters
locationCategoryId
string
DeleteStockLocationRelation(string, long)
public void DeleteStockLocationRelation(string shopId, long stockLocationId)
Parameters
DeleteStockLocationRelations(StockLocation)
public void DeleteStockLocationRelations(StockLocation theStockLocation)
Parameters
theStockLocation
StockLocation
DeleteStockStatus(StockStatus)
public void DeleteStockStatus(StockStatus theStockStatus)
Parameters
theStockStatus
StockStatus
DeleteStockStatusesByGroupId(string)
public void DeleteStockStatusesByGroupId(string groupId)
Parameters
groupId
string
DeleteStockUnit(StockUnitIdentifier)
public void DeleteStockUnit(StockUnitIdentifier identifier)
Parameters
identifier
StockUnitIdentifier
DeleteStockUnitDetail(StockUnitDetail)
public void DeleteStockUnitDetail(StockUnitDetail detail)
Parameters
detail
StockUnitDetail
DeleteStockUnitDetail(StockUnitDetailIdentifier)
public void DeleteStockUnitDetail(StockUnitDetailIdentifier identifier)
Parameters
identifier
StockUnitDetailIdentifier
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
id
string
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
stockLocationId
long
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
id
string
Returns
GetStockLocationRelations(string)
public IEnumerable<StockLocation> GetStockLocationRelations(string shopId)
Parameters
shopId
string
Returns
GetStockLocations()
public IEnumerable<StockLocation> GetStockLocations()
Returns
GetStockLocations(Product)
public IEnumerable<StockLocation> GetStockLocations(Product product)
Parameters
product
Product
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
sortByOrder
bool
Returns
GetStockLocations(long)
[Obsolete("Use the GetStockLocation instead and then use Translations on the stock location.")]
public IEnumerable<StockLocation> GetStockLocations(long groupId)
Parameters
groupId
long
Returns
GetStockLocations(string)
[Obsolete("Use the overload without languageId and then use Translations on the stock location.")]
public IEnumerable<StockLocation> GetStockLocations(string languageId)
Parameters
languageId
string
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
id
string
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
identifier
StockUnitIdentifier
Returns
GetStockUnit(int)
[Obsolete("Use other GetStockUnit overload.")]
public StockUnit GetStockUnit(int rowId)
Parameters
rowId
int
Returns
GetStockUnit(string, string, string, StockLocation)
public StockUnit GetStockUnit(string productId, string variantId, string unitId, StockLocation stockLocation)
Parameters
productId
stringvariantId
stringunitId
stringstockLocation
StockLocation
Returns
GetStockUnitDetail(StockUnitDetailIdentifier)
public StockUnitDetail GetStockUnitDetail(StockUnitDetailIdentifier identifier)
Parameters
identifier
StockUnitDetailIdentifier
Returns
GetStockUnits(string, string)
public IEnumerable<StockUnit> GetStockUnits(string productId, string variantId)
Parameters
Returns
GetStockUnitsByUnitId(string)
public IEnumerable<StockUnit> GetStockUnitsByUnitId(string unitId)
Parameters
unitId
string
Returns
GetStockUnitsWithVariants(Product)
[Obsolete("Use GetStockUnitsWithVariants(productId) instead.")]
public IEnumerable<StockUnit> GetStockUnitsWithVariants(Product product)
Parameters
product
Product
Returns
GetStockUnitsWithVariants(string)
public IEnumerable<StockUnit> GetStockUnitsWithVariants(string productId)
Parameters
productId
string
Returns
GetStockUnitTotals(Product, string)
public Tuple<double, double, double> GetStockUnitTotals(Product product, string unitId)
Parameters
Returns
SaveStockGroup(StockGroup)
public StockGroup SaveStockGroup(StockGroup theStockGroup)
Parameters
theStockGroup
StockGroup
Returns
SaveStockLocation(StockLocation)
public void SaveStockLocation(StockLocation theStockLocation)
Parameters
theStockLocation
StockLocation
SaveStockLocationCategory(StockLocationCategory)
public void SaveStockLocationCategory(StockLocationCategory stockLocationCategory)
Parameters
stockLocationCategory
StockLocationCategory
SaveStockStatus(StockStatus)
public void SaveStockStatus(StockStatus theStockStatus)
Parameters
theStockStatus
StockStatus
SaveStockStatus(StockStatus, string)
[Obsolete("Use SaveStockStatus(StockStatus) overload instead.")]
public void SaveStockStatus(StockStatus theStockStatus, string id)
Parameters
theStockStatus
StockStatusid
string
SaveStockUnit(StockUnit)
public void SaveStockUnit(StockUnit theStockUnit)
Parameters
theStockUnit
StockUnit
SaveStockUnitDetail(StockUnitDetail)
public void SaveStockUnitDetail(StockUnitDetail detail)
Parameters
detail
StockUnitDetail