using System; using ShareeBike.Model.State; using ShareeBike.Repository; using ShareeBike.Repository.Response; using ShareeBike.Repository.Response.Stations; namespace ShareeBike.Model.Services.CopriApi { public interface ICopriCache : ICopriServer { /// Gets a value indicating whether stations are expired or not. bool IsStationsExpired { get; } /// Adds a stations all response to cache. /// Stations to add. void AddToCache(StationsAvailableResponse stations); /// Gets a value indicating whether stations are expired or not. bool IsBikesAvailableExpired { get; } /// Adds a bikes response to cache. /// Bikes to add. /// Uri of the operator host to get bikes from or null if bikes have to be gotten form primary host. /// Id of station which is used for filtering bikes. Null if no filtering should be applied. /// Id of bike to get. void AddToCache(BikesAvailableResponse bikes, Uri operatorUri = null, string stationId = null, string bikeId = null); /// Gets a value indicating whether stations are expired or not. bool IsBikesOccupiedExpired { get; } /// Adds a bikes response to cache. /// Bikes to add. void AddToCache(BikesReservedOccupiedResponse bikes); /// /// Updates cache from bike which changed rental state. /// /// void Update(BikeInfoReservedOrBooked response); /// Updates cache from bike which changed rental state (reservation/ booking canceled). void Update(BookingActionResponse response); } }