public ActionResult UpdateSyncEnables(SyncEnablesUpdateModel input) { var data = _settingsRepository.RetrieveSettings(); data.PullFromShopifyEnabled = input.PullFromShopifyEnabled; data.PullFromAcumaticaEnabled = input.PullFromAcumaticaEnabled; data.SyncOrdersEnabled = input.SyncOrdersEnabled; data.SyncInventoryEnabled = input.SyncInventoryEnabled; data.SyncRefundsEnabled = input.SyncRefundsEnabled; data.SyncFulfillmentsEnabled = input.SyncShipmentsEnabled; _settingsRepository.SaveChanges(); return(JsonNetResult.Success()); }
public ActionResult WarehouseSyncDataUpdate(List <AcumaticaWarehouseModel> input) { using (var transaction = _syncInventoryRepository.BeginTransaction()) { foreach (var item in input) { _syncInventoryRepository.ImprintWarehouseSync( item.AcumaticaWarehouseId, item.ShopifyLocationId); } _statusService.RefreshWarehouseSyncStatus(); transaction.Commit(); } return(JsonNetResult.Success()); }
public ActionResult SettingsSelections(SettingsSelectionsModel selectionsModel) { var data = _settingsRepository.RetrieveSettings(); // Save Settings // data.AcumaticaTimeZone = selectionsModel.AcumaticaTimeZone; data.AcumaticaDefaultItemClass = selectionsModel.AcumaticaDefaultItemClass; data.AcumaticaDefaultPostingClass = selectionsModel.AcumaticaDefaultPostingClass; data.AcumaticaCustomerClass = selectionsModel.AcumaticaDefaultCustomerClass; _settingsRepository.SaveChanges(); // Save Gateways // var gatewayRecords = selectionsModel.PaymentGateways.Select(x => new PaymentGateway() { ShopifyGatewayId = x.ShopifyGatewayId, AcumaticaCashAccount = x.AcumaticaCashAcount, AcumaticaPaymentMethod = x.AcumaticaPaymentMethod, }) .ToList(); _settingsRepository.ImprintPaymentGateways(gatewayRecords); // Save Carrier-to-Ship-Via mappings // var carrierToShipVia = selectionsModel.RateToShipVias.Select(x => new RateToShipVia() { ShopifyRateName = x.ShopifyRateName, AcumaticaShipViaId = x.AcumaticaCarrierId, }) .ToList(); _settingsRepository.ImprintRateToShipVias(carrierToShipVia); // Refresh the Settings Status // _statusService.RefreshSettingsStatus(); return(JsonNetResult.Success()); }
public ActionResult AcumaticaCredentials(AcumaticaCredentialsModel model) { var state = _stateRepository.RetrieveSystemStateNoTracking(); if (state.AcumaticaConnState != StateCode.None) { _connectionRepository .UpdateAcumaticaCredentials(model.UserName, model.Password); } else { _connectionRepository .UpdateAcumaticaCredentials( model.InstanceUrl, model.Branch, model.Company, model.UserName, model.Password); } _oneTimeJobService.ConnectToAcumatica(); return(JsonNetResult.Success()); }
public ActionResult Cleanup() { _jobStatusService.Cleanup(); return(JsonNetResult.Success()); }
public ActionResult StopAll() { _jobStatusService.SendKillSignal(); return(JsonNetResult.Success()); }
public ActionResult AcumaticaTestConnection() { _oneTimeJobService.ConnectToAcumatica(); return(JsonNetResult.Success()); }
public ActionResult TriggerConfigDiagnosis() { _oneTimeJobService.RunDiagnostics(); return(JsonNetResult.Success()); }
public ActionResult SyncWarehouses() { _oneTimeJobService.SyncWarehouseAndLocation(); return(JsonNetResult.Success()); }
public ActionResult AcumaticaRefDataPull() { _oneTimeJobService.RefreshAcumaticaReferenceData(); return(JsonNetResult.Success()); }
public ActionResult PauseEndToEndRecurring() { _recurringJobService.KillEndToEndSync(); return(JsonNetResult.Success()); }
public ActionResult RunSyncWithAcumatica(bool enableInventorySync, List <long> selectedSPIds) { _oneTimeJobService.SyncAcumaticaStockItems(selectedSPIds, enableInventorySync); return(JsonNetResult.Success()); }
public ActionResult BulkSyncEnabled(List <long> monsterVariantIds, bool syncEnabled) { _syncInventoryRepository.UpdateVariantSync(monsterVariantIds, syncEnabled); return(JsonNetResult.Success()); }
public ActionResult RunInventoryRefresh() { _oneTimeJobService.RefreshInventory(); return(JsonNetResult.Success()); }
public ActionResult RunEndToEndImmediatelySingleOrder(long shopifyOrderId) { _oneTimeJobService.EndToEndSyncSingleShopifyOrder(shopifyOrderId); return(JsonNetResult.Success()); }
public ActionResult RunEndToEndImmediately() { _oneTimeJobService.EndToEndSync(); return(JsonNetResult.Success()); }