3.0.267 merged

This commit is contained in:
Oliver Hauff 2022-01-04 18:54:03 +01:00
parent b6fb6394db
commit 67999ef4ae
171 changed files with 6473 additions and 1093 deletions

View file

@ -122,13 +122,13 @@ namespace TINK.Model.Connector
Log.ForContext<Command>().Error("Unexpected booking request detected. No user logged in.");
await Task.CompletedTask;
}
public async Task<MiniSurveyModel> DoReturn(
public async Task<BookingFinishedModel> DoReturn(
Bikes.Bike.BluetoothLock.IBikeInfoMutable bike,
LocationDto location,
ISmartDevice smartDevice)
{
Log.ForContext<Command>().Error("Unexpected returning request detected. No user logged in.");
return await Task.FromResult(new MiniSurveyModel());
return await Task.FromResult(new BookingFinishedModel());
}
/// <summary>

View file

@ -248,7 +248,7 @@ namespace TINK.Model.Connector
/// <param name="bike">Bike to return.</param>
/// <param name="locaton">Position of the bike.</param>
/// <param name="smartDevice">Provides info about hard and software.</param>
public async Task<MiniSurveyModel> DoReturn(
public async Task<BookingFinishedModel> DoReturn(
Bikes.Bike.BluetoothLock.IBikeInfoMutable bike,
LocationDto location,
ISmartDevice smartDevice)
@ -258,7 +258,7 @@ namespace TINK.Model.Connector
throw new ArgumentNullException("Can not return bike. No bike object available.");
}
ReservationCancelReturnResponse response;
DoReturnResponse response;
try
{
response = (await CopriServer.DoReturn(bike.Id, location, smartDevice, bike.OperatorUri)).GetIsReturnBikeResponseOk(bike.Id);
@ -270,7 +270,7 @@ namespace TINK.Model.Connector
}
bike.Load(Bikes.Bike.BC.NotifyPropertyChangedLevel.None);
return response?.Create() ?? new MiniSurveyModel();
return response?.Create() ?? new BookingFinishedModel();
}
/// <summary>

View file

@ -50,7 +50,7 @@ namespace TINK.Model.Connector
/// <param name="bike">Bike to return.</param>
/// <param name="location">Geolocation of lock when returning bike.</param>
/// <param name="smartDevice">Provides info about hard and software.</param>
Task<MiniSurveyModel> DoReturn(Bikes.Bike.BluetoothLock.IBikeInfoMutable bike, LocationDto geolocation = null, ISmartDevice smartDevice = null);
Task<BookingFinishedModel> DoReturn(Bikes.Bike.BluetoothLock.IBikeInfoMutable bike, LocationDto geolocation = null, ISmartDevice smartDevice = null);
/// <summary> True if connector has access to copri server, false if cached values are used. </summary>
bool IsConnected { get; }