protected override IObservable <IPreferences> CallUpdateEndpoint(ITogglApi api, IPreferences entityToUpdate) { var entityWithUpdates = new Ultrawave.Models.Preferences(entityToUpdate); entityWithUpdates.CollapseTimeEntries = !entityWithUpdates.CollapseTimeEntries; return(api.Preferences.Update(entityWithUpdates) .SelectMany(_ => api.Preferences.Get())); }
protected override IDatabasePreferences CreateCleanWithPositiveIdFrom(IDatabasePreferences entity) { var preferences = new Ultrawave.Models.Preferences(entity); return(Preferences.Clean(preferences)); }