public void CallUpdateFulfillmentData(IMarketOrderUpdaterApi api, IList <string> orderNumbers) { using (var db = _dbFactory.GetRWDb()) { var service = new BaseOrderUpdater(api, _log, _time); service.UpdateOrders(db, orderNumbers); } }
public void UpdateOrders(GrouponApi api) { var updater = new BaseOrderUpdater(api, _log, _time); using (var db = _dbFactory.GetRWDb()) { updater.UpdateOrders(db); } }
public void SendOrdersUpdate(SupplieroasisApi api) { var updater = new BaseOrderUpdater(api, _log, _time); using (var db = _dbFactory.GetRWDb()) { updater.UpdateOrders(db); } }
public void CallUpdateFulfillmentData(IMarketOrderUpdaterApi api, string orderString) { using (var db = _dbFactory.GetRWDb()) { var service = new BaseOrderUpdater(api, _log, _time); service.UpdateOrders(db, !String.IsNullOrEmpty(orderString) ? new List <string>() { orderString } : null); } }
protected override void RunCallback() { _api.Connect(); var dbFactory = new DbFactory(); var time = new TimeService(dbFactory); var settings = new SettingsService(dbFactory); using (var db = dbFactory.GetRWDb()) { var lastSyncDate = settings.GetOrdersFulfillmentDate(_api.Market, _api.MarketplaceId); LogWrite("Last sync date=" + lastSyncDate); if (!lastSyncDate.HasValue || (time.GetUtcTime() - lastSyncDate) > _betweenProcessingInverval) { var updater = new BaseOrderUpdater(_api, GetLogger(), time); updater.UpdateOrders(db); settings.SetOrdersFulfillmentDate(time.GetUtcTime(), _api.Market, _api.MarketplaceId); } } }