chore: refactoring some code to introduce a common base class for all api classes

This commit is contained in:
Matthias Langhard
2021-05-21 22:13:04 +02:00
parent ac20e2e1d4
commit 89e7ce8449
34 changed files with 721 additions and 551 deletions

View File

@@ -0,0 +1,52 @@
using Newtonsoft.Json;
using Novaloop.PaymoApi.Shared;
namespace Novaloop.PaymoApi.Clients.Models
{
public class Client : BaseModel
{
[JsonProperty("name")]
public string Name { get; set; }
[JsonProperty("address")]
public string Address { get; set; }
[JsonProperty("city")]
public string City { get; set; }
[JsonProperty("state")]
public string State { get; set; }
[JsonProperty("postal_code")]
public string PostalCode { get; set; }
[JsonProperty("country")]
public string Country { get; set; }
[JsonProperty("phone")]
public string Phone { get; set; }
[JsonProperty("fax")]
public string Fax { get; set; }
[JsonProperty("email")]
public string Email { get; set; }
[JsonProperty("website")]
public string Website { get; set; }
[JsonProperty("image")]
public string Image { get; set; }
[JsonProperty("fiscal_information")]
public string FiscalInformation { get; set; }
[JsonProperty("active")]
public bool Active { get; set; } = true;
public override string ToString()
{
return $"[{Id}] {Name}";
}
}
}