using Newtonsoft.Json; using System; using System.Collections.Generic; using System.Text; namespace Dfs.WayneChina.IPosPlus.ServiceClient { public class Promotion { [JsonProperty("type")] public string Type { get; set; } [JsonProperty("rule")] public string Rule { get; set; } [JsonProperty("description")] public string Description { get; set; } } //COPY FROM CloudService #region copy from cloud service // request part public class PromotionRequestItem { public Guid Id { get; set; } public Guid LineItemId { get; set; } public string Category { get; set; } public string Name { get; set; } public string Barcode { get; set; } public decimal Quantity { get; set; } public decimal Price { get; set; } public decimal Amount { get; set; } } public class PromotionRequest { public string AccountId { get; set; } public Guid OwnerId { get; set; } public Guid Id { get; set; } public decimal Amount { get; set; } public decimal AmountAfterDiscount { get; set; } public string AccountIcCardNo { get; set; } public DateTime Created { get; set; } public List Items { get; set; } public List Payments { get; set; } /// /// Coupon applied in this Trx. /// public List CouponUidList { get; set; } /// /// Discounts applied in this Trx. /// public List DiscountUidList { get; set; } } public class Payment { public string Name { get; set; } public decimal Value { get; set; } } //response part public class ProductDiscount { public string barCode { get; set; } public string lineItemId { get; set; } public double amount { get; set; } } public class ProductSubDiscount { public string barCode { get; set; } public string lineItemId { get; set; } public double amount { get; set; } } public class DiscountTypeList { public string name { get; set; } public string uid { get; set; } public double discountAmount { get; set; } public string discountCaculationAlgorithm { get; set; } public IList productBarCodes { get; set; } public object productCategories { get; set; } public double saleAmount { get; set; } public IList productSubDiscounts { get; set; } } public class Discounts { public double amountAfterDiscount { get; set; } public double discountAmount { get; set; } public IList productDiscounts { get; set; } public IList discountTypeList { get; set; } } public class Data { public string coupons { get; set; } public Discounts discounts { get; set; } } public class DiscountForTrx { public string code { get; set; } public string message { get; set; } public Data data { get; set; } } #endregion }