mirror of
https://dev.azure.com/TeilRad/sharee.bike%20App/_git/Code
synced 2025-06-22 05:47:28 +02:00
Version 3.0.370
This commit is contained in:
parent
f5cf9bb22f
commit
bdb2dec1c1
233 changed files with 10252 additions and 6779 deletions
|
@ -40,7 +40,6 @@ namespace TINK.Repository.Response
|
|||
[DataMember]
|
||||
public string co2saving { get; private set; }
|
||||
|
||||
|
||||
/// <summary>
|
||||
/// Holds information about the returned bike.
|
||||
/// </summary>
|
||||
|
|
|
@ -87,7 +87,7 @@ namespace TINK.Repository.Response
|
|||
this ReservationBookingResponse bookingResponse,
|
||||
string bikeId)
|
||||
{
|
||||
GetIsResponseOk(bookingResponse, string.Format(AppResources.ExceptionTextReservationBikeFailedGeneral, bikeId));
|
||||
GetIsResponseOk(bookingResponse, string.Format(AppResources.ErrorReservingBike, bikeId));
|
||||
|
||||
if (BookingDeclinedException.IsBookingDeclined(bookingResponse.response_state, out BookingDeclinedException exception))
|
||||
{
|
||||
|
@ -99,7 +99,7 @@ namespace TINK.Repository.Response
|
|||
if (bikeInfoRequestedOccupied == null)
|
||||
{
|
||||
throw new System.Exception(string.Format(
|
||||
AppResources.ExceptionTextReservationBikeFailedUnavailalbe,
|
||||
AppResources.ErrorReservingBikeUnavailalbe,
|
||||
bikeId,
|
||||
!string.IsNullOrWhiteSpace(bookingResponse?.response_text) ? $"\r\n{bookingResponse.response_text}" : string.Empty));
|
||||
}
|
||||
|
@ -115,14 +115,14 @@ namespace TINK.Repository.Response
|
|||
this ReservationBookingResponse bookingResponse,
|
||||
string bikeId)
|
||||
{
|
||||
GetIsResponseOk(bookingResponse, string.Format(AppResources.ExceptionTextRentingBikeFailedGeneral, bikeId));
|
||||
GetIsResponseOk(bookingResponse, string.Format(AppResources.ErrorRentingBike, bikeId));
|
||||
|
||||
// Get bike which has to be booked.
|
||||
var bikeInfoRequestedOccupied = bookingResponse?.bikes_occupied?.Values?.FirstOrDefault(x => x.bike == bikeId);
|
||||
if (bikeInfoRequestedOccupied == null)
|
||||
{
|
||||
throw new System.Exception(string.Format(
|
||||
AppResources.ExceptionTextRentingBikeFailedUnavailalbe,
|
||||
AppResources.ErrorRentingBikeUnavailalbe,
|
||||
bikeId,
|
||||
!string.IsNullOrWhiteSpace(bookingResponse?.response_text) ? $"\r\n{bookingResponse.response_text}" : string.Empty));
|
||||
}
|
||||
|
@ -149,7 +149,7 @@ namespace TINK.Repository.Response
|
|||
if (response.response_state.Trim().ToUpper().StartsWith(RESPONSE_AUTHCOOKIE_EXPRIED.ToUpper()))
|
||||
{
|
||||
throw new AuthcookieNotDefinedException(
|
||||
$"{textOfAction}\r\n{AppResources.ExceptionTextSessionExpired}",
|
||||
$"{textOfAction}\r\n{AppResources.ErrorAccountInvalidAuthorization}",
|
||||
response);
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue