Previous Docs Version

The documentation you are viewing is for a previous version of the Vendr product. Click here to jump to the current stable version.

VendrStockServiceBase

API reference for VendrStockServiceBase in Vendr, the eCommerce solution for Umbraco v8+

VendrStockServiceBase

public abstract class VendrStockServiceBase : ServiceBase, IStockService

Inheritance

Namespace

Constructors

VendrStockServiceBase

public VendrStockServiceBase(ILicensingService licensingService, 
    IRepositoryFactory repositoryFactory, IUnitOfWorkProvider uowProvider, ILogger logger, 
    ICacheAccessor cacheAccessor)

Methods

GetStock (1 of 2)

public virtual decimal? GetStock(string productReference)

GetStock (2 of 2)

public virtual decimal? GetStock(string productReference, string productVariantReference)

IncreaseStock (1 of 2)

public virtual void IncreaseStock(string productReference, decimal increaseBy)

IncreaseStock (2 of 2)

public virtual void IncreaseStock(string productReference, string productVariantReference, 
    decimal increaseBy)

InvalidateStockCache

public void InvalidateStockCache()

InvalidateStockCache

public void InvalidateStockCache(string productReference, string productVariantReference)

ReduceStock (1 of 2)

public virtual void ReduceStock(string productReference, decimal reduceBy)

ReduceStock (2 of 2)

public virtual void ReduceStock(string productReference, string productVariantReference, 
    decimal reduceBy)

SetStock (1 of 2)

public virtual void SetStock(string productReference, decimal value)

SetStock (2 of 2)

public virtual void SetStock(string productReference, string productVariantReference, decimal value)

TryGetStock (1 of 2)

public virtual bool TryGetStock(string productReference, out decimal? stock)

TryGetStock (2 of 2)

public virtual bool TryGetStock(string productReference, string productVariantReference, 
    out decimal? stock)

TryIncreaseStock (1 of 2)

public virtual bool TryIncreaseStock(string productReference, decimal increaseBy)

TryIncreaseStock (2 of 2)

public virtual bool TryIncreaseStock(string productReference, string productVariantReference, 
    decimal increaseBy)

TryReduceStock (1 of 2)

public virtual bool TryReduceStock(string productReference, decimal reduceBy)

TryReduceStock (2 of 2)

public virtual bool TryReduceStock(string productReference, string productVariantReference, 
    decimal reduceBy)

TrySetStock (1 of 2)

public virtual bool TrySetStock(string productReference, decimal value)

TrySetStock (2 of 2)

public virtual bool TrySetStock(string productReference, string productVariantReference, 
    decimal value)

Edit this page on GitHub

Site + logo design © 2022 Outfield Digital Ltd. Content contributions licensed under MIT.
Vendr® is a Registered Trademark of Outfield Digital Ltd.