private static InventoryItemStockView Map(InventoryItemCreated e, InventoryItemStockView v) { return(new InventoryItemStockView { IsActive = v.IsActive ?? true, Sku = e.Id, Count = v.Count, OverStockLimit = v.OverStockLimit }); }
private static InventoryItemStockView Map(InventoryItemDeactivated e, InventoryItemStockView v) { return(new InventoryItemStockView { IsActive = false, Sku = v.Sku, Count = v.Count, OverStockLimit = v.OverStockLimit }); }
private static InventoryItemStockView Map(ItemsCheckedInToInventory e, InventoryItemStockView v) { return(new InventoryItemStockView { IsActive = v.IsActive, Sku = v.Sku, Count = v.Count + e.Count, OverStockLimit = v.OverStockLimit }); }
private static InventoryItemStockView Map(InventoryItemStockLimitChanged e, InventoryItemStockView v) { return(new InventoryItemStockView { IsActive = v.IsActive, Sku = v.Sku, Count = v.Count, OverStockLimit = e.Limit }); }
private static InventoryItemStockView Map(ItemsRemovedFromInventory e, InventoryItemStockView v) { return(new InventoryItemStockView { IsActive = v.IsActive, Sku = v.Sku, Count = v.Count - e.Count, OverStockLimit = v.OverStockLimit }); }