mirror of
https://dev.azure.com/TeilRad/sharee.bike%20App/_git/Code
synced 2025-04-19 11:37:28 +02:00
Manually merged.
This commit is contained in:
parent
d5832e010e
commit
c7c9f252af
112 changed files with 1127 additions and 352 deletions
|
@ -204,7 +204,7 @@ namespace TINK.Repository
|
|||
/// <param name="smartDevice">Provides info about hard and software.</param>
|
||||
/// <param name="operatorUri">Holds the uri of the operator or null, in case of single operator setup.</param>
|
||||
/// <returns>Response on returning request.</returns>
|
||||
public async Task<ReservationCancelReturnResponse> DoReturn(
|
||||
public async Task<DoReturnResponse> DoReturn(
|
||||
string bikeId,
|
||||
LocationDto location,
|
||||
ISmartDevice smartDevice,
|
||||
|
@ -615,16 +615,16 @@ namespace TINK.Repository
|
|||
#endif
|
||||
}
|
||||
|
||||
public static async Task<ReservationCancelReturnResponse> DoReturn(
|
||||
public static async Task<DoReturnResponse> DoReturn(
|
||||
string copriHost,
|
||||
string command,
|
||||
string userAgent = null)
|
||||
{
|
||||
#if !WINDOWS_UWP
|
||||
string cancelOrReturnResponse;
|
||||
string doReturnResponse;
|
||||
try
|
||||
{
|
||||
cancelOrReturnResponse = await PostAsync(copriHost, command, userAgent);
|
||||
doReturnResponse = await PostAsync(copriHost, command, userAgent);
|
||||
}
|
||||
catch (System.Exception l_oException)
|
||||
{
|
||||
|
@ -642,7 +642,7 @@ namespace TINK.Repository
|
|||
}
|
||||
|
||||
// Extract bikes from response.
|
||||
return JsonConvertRethrow.DeserializeObject<ResponseContainer<ReservationCancelReturnResponse>>(cancelOrReturnResponse)?.shareejson;
|
||||
return JsonConvertRethrow.DeserializeObject<ResponseContainer<DoReturnResponse>>(doReturnResponse)?.shareejson;
|
||||
#else
|
||||
return null;
|
||||
#endif
|
||||
|
|
|
@ -1625,14 +1625,12 @@ namespace TINK.Repository
|
|||
return null;
|
||||
}
|
||||
|
||||
public Task<ReservationCancelReturnResponse> DoReturn(
|
||||
public Task<DoReturnResponse> DoReturn(
|
||||
string bikeId,
|
||||
LocationDto geolocation,
|
||||
ISmartDevice smartDevice,
|
||||
Uri operatorUri)
|
||||
{
|
||||
return null;
|
||||
}
|
||||
=> null;
|
||||
|
||||
public Task<SubmitFeedbackResponse> DoSubmitFeedback(string bikeId, string message, bool isBikeBroken, Uri operatorUri)
|
||||
=> null;
|
||||
|
|
|
@ -172,14 +172,12 @@ namespace TINK.Repository
|
|||
throw new System.Exception("Buchung im Offlinemodus nicht möglich!");
|
||||
}
|
||||
|
||||
public Task<ReservationCancelReturnResponse> DoReturn(
|
||||
public Task<DoReturnResponse> DoReturn(
|
||||
string bikeId,
|
||||
LocationDto geolocation,
|
||||
ISmartDevice smartDevice,
|
||||
Uri operatorUri)
|
||||
{
|
||||
throw new System.Exception("Rückgabe im Offlinemodus nicht möglich!");
|
||||
}
|
||||
=> throw new System.Exception("Rückgabe im Offlinemodus nicht möglich!");
|
||||
|
||||
public Task<SubmitFeedbackResponse> DoSubmitFeedback(string bikeId, string message, bool isBikeBroken, Uri operatorUri) =>
|
||||
throw new System.Exception("Übermittlung von Feedback im Offlinemodus nicht möglich!");
|
||||
|
|
|
@ -4,7 +4,7 @@ namespace TINK.Repository.Exception
|
|||
{
|
||||
public class ReturnBikeException : ResponseException
|
||||
{
|
||||
public ReturnBikeException(ReservationCancelReturnResponse response, string message) : base(response, message)
|
||||
public ReturnBikeException(BikesReservedOccupiedResponse response, string message) : base(response, message)
|
||||
{ }
|
||||
}
|
||||
}
|
||||
|
|
|
@ -80,7 +80,7 @@ namespace TINK.Repository
|
|||
/// <param name="smartDevice">Provides info about hard and software.</param>
|
||||
/// <param name="operatorUri">Holds the uri of the operator or null, in case of single operator setup.</param>
|
||||
/// <returns>Response on returning request.</returns>
|
||||
Task<ReservationCancelReturnResponse> DoReturn(
|
||||
Task<DoReturnResponse> DoReturn(
|
||||
string bikeId,
|
||||
LocationDto location,
|
||||
ISmartDevice smartDevice,
|
||||
|
|
15
TINKLib/Repository/Response/DoReturnResponse.cs
Normal file
15
TINKLib/Repository/Response/DoReturnResponse.cs
Normal file
|
@ -0,0 +1,15 @@
|
|||
using System.Runtime.Serialization;
|
||||
|
||||
namespace TINK.Repository.Response
|
||||
{
|
||||
public class DoReturnResponse : BikesReservedOccupiedResponse
|
||||
{
|
||||
/// <summary> Mini survey.</summary>
|
||||
[DataMember]
|
||||
public MiniSurveyResponse user_miniquery { get; private set; }
|
||||
|
||||
[DataMember]
|
||||
public string co2saving { get; private set; }
|
||||
|
||||
}
|
||||
}
|
|
@ -1,5 +1,4 @@
|
|||
|
||||
using System.Runtime.Serialization;
|
||||
|
||||
namespace TINK.Repository.Response
|
||||
{
|
||||
|
|
|
@ -181,8 +181,8 @@ namespace TINK.Repository.Response
|
|||
/// <param name="textOfAction">Text describing request which is shown if validation fails.</param>
|
||||
/// <param name="bikeId">Id of bike.</param>
|
||||
/// <returns>Verified response.</returns>
|
||||
public static ReservationCancelReturnResponse GetIsReturnBikeResponseOk(
|
||||
this ReservationCancelReturnResponse returnBikeResponse,
|
||||
public static DoReturnResponse GetIsReturnBikeResponseOk(
|
||||
this DoReturnResponse returnBikeResponse,
|
||||
string bikeId)
|
||||
{
|
||||
// Check if bike is at station.
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue