sharee.bike-App/SharedBusinessLogic/Repository/Response/ResponseBase.cs

60 lines
1.7 KiB
C#
Raw Normal View History

2023-11-06 12:23:09 +01:00
using System.Runtime.Serialization;
2024-04-09 12:53:23 +02:00
using Newtonsoft.Json;
2021-05-13 20:03:07 +02:00
2024-04-09 12:53:23 +02:00
namespace ShareeBike.Repository.Response
2021-05-13 20:03:07 +02:00
{
2022-09-06 16:08:19 +02:00
[DataContract]
2024-04-09 12:53:23 +02:00
[JsonObject(ItemNullValueHandling = NullValueHandling.Ignore)]
2022-09-06 16:08:19 +02:00
public class ResponseBase : CopriVersion
{
[DataMember]
public string response_state { get; private set; }
[DataMember]
public string response { get; private set; }
[DataMember]
public string response_text { get; private set; }
[DataMember]
public string authcookie { get; private set; }
/// <summary> Message shown to user.</summary>
[DataMember]
public string merchant_message { get; private set; }
/// <summary> Initial map display area.</summary>
[DataMember]
public MapSpan init_map { get; private set; }
/// <summary> Url of page holding agb info. </summary>
[DataMember]
public string agb_html { get; private set; }
/// <summary> Url of page holding instructions how to rent bikes. </summary>
[DataMember]
public string bike_info_html { get; private set; }
/// <summary> Url of page holding privacy info. </summary>
[DataMember]
public string privacy_html { get; private set; }
/// <summary> Url of page holding impress info. </summary>
[DataMember]
public string impress_html { get; private set; }
/// <summary> Url of page holding tariff info. </summary>
[DataMember]
public string tariff_info_html { get; private set; }
/// <summary> Textual description of response. </summary>
2023-11-06 12:23:09 +01:00
public override string ToString()
2022-09-06 16:08:19 +02:00
{
return $"Response state is \"{response_state ?? string.Empty}\", " +
$"auth cookie is \"{authcookie ?? string.Empty}\" and response is \"{response_text ?? string.Empty}\", " +
$"code \"{response ?? string.Empty}\"" +
$"response text \"{response_text ?? string.Empty}\".";
}
}
2021-05-13 20:03:07 +02:00
}