2022-06-28 07:05:02 +02:00
|
|
|
using BTCPayServer.Models.AppViewModels;
|
2022-07-18 20:51:53 +02:00
|
|
|
using BTCPayServer.Plugins.PointOfSale.Models;
|
2022-06-28 07:05:02 +02:00
|
|
|
using Newtonsoft.Json;
|
|
|
|
|
|
|
|
namespace BTCPayServer.Services.Invoices;
|
|
|
|
|
|
|
|
public class PosAppData
|
|
|
|
{
|
|
|
|
[JsonProperty(PropertyName = "cart")]
|
|
|
|
public PosAppCartItem[] Cart { get; set; }
|
2023-01-06 14:18:07 +01:00
|
|
|
|
2022-06-28 07:05:02 +02:00
|
|
|
[JsonProperty(PropertyName = "customAmount")]
|
|
|
|
public decimal CustomAmount { get; set; }
|
2023-01-06 14:18:07 +01:00
|
|
|
|
2022-06-28 07:05:02 +02:00
|
|
|
[JsonProperty(PropertyName = "discountPercentage")]
|
|
|
|
public decimal DiscountPercentage { get; set; }
|
2023-01-06 14:18:07 +01:00
|
|
|
|
2022-06-28 07:05:02 +02:00
|
|
|
[JsonProperty(PropertyName = "discountAmount")]
|
|
|
|
public decimal DiscountAmount { get; set; }
|
2023-01-06 14:18:07 +01:00
|
|
|
|
2022-06-28 07:05:02 +02:00
|
|
|
[JsonProperty(PropertyName = "tip")]
|
|
|
|
public decimal Tip { get; set; }
|
|
|
|
|
|
|
|
[JsonProperty(PropertyName = "subTotal")]
|
|
|
|
public decimal Subtotal { get; set; }
|
|
|
|
|
|
|
|
[JsonProperty(PropertyName = "total")]
|
|
|
|
public decimal Total { get; set; }
|
|
|
|
}
|
|
|
|
|
|
|
|
public class PosAppCartItem
|
|
|
|
{
|
|
|
|
[JsonProperty(PropertyName = "id")]
|
|
|
|
public string Id { get; set; }
|
2023-01-06 14:18:07 +01:00
|
|
|
|
2022-06-28 07:05:02 +02:00
|
|
|
[JsonProperty(PropertyName = "price")]
|
|
|
|
public PosAppCartItemPrice Price { get; set; }
|
2023-01-06 14:18:07 +01:00
|
|
|
|
2022-06-28 07:05:02 +02:00
|
|
|
[JsonProperty(PropertyName = "title")]
|
|
|
|
public string Title { get; set; }
|
2023-01-06 14:18:07 +01:00
|
|
|
|
2022-06-28 07:05:02 +02:00
|
|
|
[JsonProperty(PropertyName = "count")]
|
|
|
|
public int Count { get; set; }
|
2023-01-06 14:18:07 +01:00
|
|
|
|
2022-06-28 07:05:02 +02:00
|
|
|
[JsonProperty(PropertyName = "inventory")]
|
|
|
|
public int? Inventory { get; set; }
|
2023-01-06 14:18:07 +01:00
|
|
|
|
2022-06-28 07:05:02 +02:00
|
|
|
[JsonProperty(PropertyName = "image")]
|
|
|
|
public string Image { get; set; }
|
|
|
|
}
|
|
|
|
|
|
|
|
public class PosAppCartItemPrice
|
|
|
|
{
|
|
|
|
[JsonProperty(PropertyName = "formatted")]
|
|
|
|
public string Formatted { get; set; }
|
2023-01-06 14:18:07 +01:00
|
|
|
|
2022-06-28 07:05:02 +02:00
|
|
|
[JsonProperty(PropertyName = "value")]
|
|
|
|
public decimal Value { get; set; }
|
2023-01-06 14:18:07 +01:00
|
|
|
|
2022-06-28 07:05:02 +02:00
|
|
|
[JsonProperty(PropertyName = "type")]
|
2023-05-23 02:18:57 +02:00
|
|
|
public ViewPointOfSaleViewModel.ItemPriceType Type { get; set; }
|
2022-06-28 07:05:02 +02:00
|
|
|
}
|