Automatic conversion to lower Camel Case for JSON

This commit is contained in:
lepipele
2017-10-20 22:37:01 -05:00
parent e49f25af09
commit f1f19369a3
5 changed files with 45 additions and 43 deletions

View File

@@ -5,38 +5,31 @@ using System.Threading.Tasks;
namespace BTCPayServer.Models.InvoicingModels
{
// going with lowercase for property names to enable easy ToJson conversion
// down the road I can look into mapper who transforms capital into lower case
// because of different conventions between server and client side
public class PaymentModel
{
public string serverUrl { get; set; }
public string invoiceId { get; set; }
public string btcAddress { get; set; }
public string btcDue { get; set; }
public string customerEmail { get; set; }
public int expirationSeconds { get; set; }
public string status { get; set; }
public string merchantRefLink { get; set; }
public int maxTimeSeconds { get; set; }
public string ServerUrl { get; set; }
public string InvoiceId { get; set; }
public string BtcAddress { get; set; }
public string BtcDue { get; set; }
public string CustomerEmail { get; set; }
public int ExpirationSeconds { get; set; }
public string Status { get; set; }
public string MerchantRefLink { get; set; }
public int MaxTimeSeconds { get; set; }
// These properties are still not used in client side code
// so will stick with C# notation for now
// These properties are not used in client side code
public string StoreName { get; set; }
public string ItemDesc { get; set; }
public string TimeLeft { get; set; }
public string Rate { get; set; }
public string BTCAmount { get; set; }
public string BtcAmount { get; set; }
public string TxFees { get; set; }
public string InvoiceBitcoinUrl { get; set; }
public string BTCTotalDue { get; set; }
public string BtcTotalDue { get; set; }
public int TxCount { get; set; }
public string BTCPaid { get; set; }
public string BtcPaid { get; set; }
public string StoreEmail { get; set; }
public string OrderId
{
get; set;
}
public string OrderId { get; set; }
}
}