123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119 |
- 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<PromotionRequestItem> Items { get; set; }
- public List<Payment> Payments { get; set; }
- /// <summary>
- /// Coupon applied in this Trx.
- /// </summary>
- public List<string> CouponUidList { get; set; }
- /// <summary>
- /// Discounts applied in this Trx.
- /// </summary>
- public List<string> 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<string> productBarCodes { get; set; }
- public object productCategories { get; set; }
- public double saleAmount { get; set; }
- public IList<ProductSubDiscount> productSubDiscounts { get; set; }
- }
- public class Discounts
- {
- public double amountAfterDiscount { get; set; }
- public double discountAmount { get; set; }
- public IList<ProductDiscount> productDiscounts { get; set; }
- public IList<DiscountTypeList> 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
- }
|