chore: refactoring some code to introduce a common base class for all api classes
This commit is contained in:
52
src/Clients/Models/Client.cs
Normal file
52
src/Clients/Models/Client.cs
Normal 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}";
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user