Code updated to 3.0.238

This commit is contained in:
Oliver Hauff 2021-06-26 20:57:55 +02:00
parent 3302d80678
commit 9c6a1fa92b
257 changed files with 7763 additions and 2861 deletions

View file

@ -1,6 +1,7 @@
using System;
using TINK.Model.Device;
namespace TINK.Model.Repository.Request
namespace TINK.Repository.Request
{
/// <summary> Defines members to create requests.</summary>
public interface IRequestBuilder
@ -41,17 +42,17 @@ namespace TINK.Model.Repository.Request
/// <summary> Gets reservation request (synonym: reservation == request == reservieren). </summary>
/// <param name="bikeId">Id of the bike to reserve.</param>
/// <returns>Requst to reserve bike.</returns>
string DoReserve(int bikeId);
string DoReserve(string bikeId);
/// <summary> Gets request to cancel reservation. </summary>
/// <param name="bikeId">Id of the bike to cancel reservation for.</param>
/// <returns>Requst on cancel booking request.</returns>
string DoCancelReservation(int bikeId);
string DoCancelReservation(string bikeId);
/// <summary> Request to get keys. </summary>
/// <param name="bikeId">Id of the bike to get keys for.</param>
/// <returns>Request to get keys.</returns>
string CalculateAuthKeys(int bikeId);
string CalculateAuthParameters(string bikeId);
/// <summary> Gets the request for updating lock state for a booked bike. </summary>
/// <param name="bikeId">Id of the bike to update locking state for.</param>
@ -59,7 +60,7 @@ namespace TINK.Model.Repository.Request
/// <param name="state">New locking state.</param>
/// <returns>Request to update locking state.</returns>
string UpateLockingState(
int bikeId,
string bikeId,
LocationDto location,
lock_state state,
double batteryPercentage);
@ -69,20 +70,21 @@ namespace TINK.Model.Repository.Request
/// <param name="guid">Used to publish GUID from app to copri. Used for initial setup of bike in copri.</param>
/// <param name="batteryPercentage">Holds the filling level percentage of the battery.</param>
/// <returns>Request to booking bike.</returns>
string DoBook(int bikeId, Guid guid, double batteryPercentage);
string DoBook(string bikeId, Guid guid, double batteryPercentage);
/// <summary> Gets request for returning the bike. </summary>
/// <param name="bikeId">Id of the bike to return.</param>
/// <param name="location">Geolocation of lock when returning bike.</param>
/// <returns>Requst on returning request.</returns>
string DoReturn(int bikeId, LocationDto location);
string DoReturn(string bikeId, LocationDto location, ISmartDevice smartDevice);
/// <summary>
/// Gets request for submiting feedback to copri server.
/// </summary>
/// <param name="bikeId">Id of the bike to which the feedback is related to.</param>
/// <param name="message">General purpose message or error description.</param>
/// <param name="isBikeBroken">True if bike is broken.</param>
string DoSubmitFeedback(string message = null, bool isBikeBroken = false);
string DoSubmitFeedback(string bikeId, string message = null, bool isBikeBroken = false);
}
/// <summary> Copri locking states</summary>
@ -92,6 +94,7 @@ namespace TINK.Model.Repository.Request
unlocked
}
/// <summary> Holds lockation info.</summary>
public class LocationDto
{
public double Latitude { get; private set; }