using System.Collections.Generic;
public static void Main()
APIProductSalesChannelLink p = new APIProductSalesChannelLink();
PropertyInfo[] properties = p.GetType().GetProperties();
StringBuilder sb = new StringBuilder();
sb.Append("<table><thead><tr><th>Property</th><th>Type</th><th>Default</th></tr></thead><tbody>");
foreach (var x in properties)
string sType = x.PropertyType.ToString();
sType =sType.Replace("System.Int32", "int32");
sType = sType.Replace("System.String", "string");
sType = sType.Replace("System.Nullable`1[System.Single]", "single");
sType = sType.Replace("System.Nullable`1[int32]", "int32");
sType = sType.Replace("System.Nullable`1[int32]", "int32");
sType = sType.Replace("Program+", "");
sType = sType.Replace("System.Collections.Generic.List`1[APIProduct]", "APIProduct[]");
sType = sType.Replace("System.DateTime", "datetime");
sType = sType.Replace("System.Collections.Generic.List`1[APIProductSupplierLink]", "APIProductSupplierLink[]");
sType = sType.Replace("System.Decimal" , "decimal");
sType = sType.Replace("System.Boolean", "bool");
sType = sType.Replace("System.Collections.Generic.List`1[APIProductRangeOptionValue]", "APIProductRangeOptionValue[]");
sType = sType.Replace("System.Collections.Generic.List`1[APIProductImage]", "APIProductImage[]" );
sType = sType.Replace("System.Collections.Generic.List`1[APIAmazonVariation]", "APIAmazonVariation[]");
sType = sType.Replace("System.Collections.Generic.List`1[APIEbayVariation]", "APIEbayVariation[]");
sType = sType.Replace("System.Collections.Generic.List`1[PackageProductWithQuantity]", "PackageProductWithQuantity[]");
sType = sType.Replace("System.Collections.Generic.List`1[APISalesChannelLink]", "APISalesChannelLink[]");
sType = sType.Replace("System.Collections.Generic.List`1[ItemBayStockLevel]", "ItemBayStockLevel[]");
sType = sType.Replace("System.Collections.Generic.List`1[SupplierOrderItem]", "SupplierOrderItem[]");
string sDefault = (sType == "int32" || sType == "single") ? "0": "";
sb.Append($"<tr><td>{sName}</td><td>{sType}</td><td>{sDefault}</td></tr>");
sb.Append("</tbody></table>");
Console.WriteLine(sb.ToString());
public int ID { get; set; }
public int BrandID { get; set; }
public string Name { get; set; }
public string Description { get; set; }
public string ManufacturerSKU { get; set; }
public DateTime DateAdded { get; set; }
public List<APIProductSupplierLink> SupplierProductLinks { get; set; }
public decimal BasePrice { get; set; }
public decimal ChannelPrice { get; set; }
public int VATRateID { get; set; }
public string BarCodeNumber { get; set; } = string.Empty;
public string AdditionalBarCodes { get; set; } = string.Empty;
public string ASIN { get; set; } = string.Empty;
public int AmazonVariationID { get; set; }
public string EbayListingID { get; set; } = string.Empty;
public int EbayVariationID { get; set; }
public int ProductRangeID { get; set; }
public bool PreOrder { get; set; }
public bool EndOfLine { get; set; }
public int LengthMM { get; set; }
public int WidthMM { get; set; }
public int HeightMM { get; set; }
public int WeightGM { get; set; }
public bool LargeLetterCompatible { get; set; }
public int ProductType { get; set; }
public int ProductVATRate { get; set; }
public string SearchText { get; set; } = string.Empty;
public StatusID StatusID { get; set; }
public bool AdditionalShippingLabel { get; set; }
public string ExternalProductId { get; set; } = string.Empty;
public string Thumbs200x200 { get; set; } = string.Empty;
public string Thumbs75x75 { get; set; } = string.Empty;
public string MatchOptions { get; set; } = string.Empty;
public int StockLevel { get; set; }
public int ChannelPseudoStockLevel { get; set; }
public List<APIProductRangeOptionValue> SelectedProductRangeOptionValues { get; set; }
public List<string> imageB64Strings { get; set; }
public List<APIProductImage> images { get; set; }
public List<APIAmazonVariation> AmazonVariations { get; set; } = new List<APIAmazonVariation>();
public List<APIEbayVariation> EbayVariations { get; set; } = new List<APIEbayVariation>();
public List<PackageProductWithQuantity> packItems { get; set; } = new List<PackageProductWithQuantity>();
public List<APISalesChannelLink> SalesChannelLinks { get; set; } = new List<APISalesChannelLink>();
public int PurchaseOrderMaxStock { get; set; }
public int PurchaseOrderAtStockQuantity { get; set; }
public int PurchaseOrderStockType { get; set; }
public int PurchaseOrderBoxQuantity { get; set; }
public int ProductStockType { get; set; }
public int DispatchIdentifierOption { get; set; }
public List<ItemBayStockLevel> StockLocations { get; set; }
public List<SupplierOrderItem> OnOrder { get; set; }
public class APIProductList
public int TotalCount = 0;
public int TotalProductsInBrand = 0;
public int TotalProductsInSalesChannel = 0;
public List<APIProduct> products { get; set; }
public class APIProductSupplierLink{}
public int ID { get; set; }
public int BrandID { get; set; }
public string Name { get; set; }
public string Description { get; set; }
public string ManufacturerSKU { get; set; }
public DateTime DateAdded { get; set; }
public List<APIProductSupplierLink> SupplierProductLinks { get; set; }
public decimal BasePrice { get; set; }
public decimal ChannelPrice { get; set; }
public int VATRateID { get; set; }
public string BarCodeNumber = string.Empty;
public string AdditionalBarCodes = string.Empty;
public string ASIN = string.Empty;
public int AmazonVariationID { get; set; }
public string EbayListingID = string.Empty;
public int EbayVariationID { get; set; }
public int ProductRangeID { get; set; }
public bool PreOrder { get; set; }
public bool EndOfLine { get; set; }
public int LengthMM { get; set; }
public int WidthMM { get; set; }
public int HeightMM { get; set; }
public int WeightGM { get; set; }
public bool LargeLetterCompatible { get; set; }
public int ProductType { get; set; }
public int ProductVATRate { get; set; }
public string SearchText = string.Empty;
public StatusID StatusID { get; set; }
public bool AdditionalShippingLabel { get; set; }
public string ExternalProductId = string.Empty;
public string Thumbs200x200 = string.Empty;
public string Thumbs75x75 = string.Empty;
public string MatchOptions = string.Empty;
public int StockLevel { get; set; }
public int ChannelPseudoStockLevel { get; set; }
public List<APIProductRangeOptionValue> SelectedProductRangeOptionValues { get; set; }
public List<string> imageB64Strings;
public List<APIProductImage> images { get; set; }
public List<APIAmazonVariation> AmazonVariations { get; set; } = new List<APIAmazonVariation>();
public List<APIEbayVariation> EbayVariations { get; set; } = new List<APIEbayVariation>();
public List<PackageProductWithQuantity> packItems { get; set; } = new List<PackageProductWithQuantity>();
public List<APISalesChannelLink> SalesChannelLinks { get; set; } = new List<APISalesChannelLink>();
public List<ItemBayStockLevel> StockLocations { get; set; }
public List<SupplierOrderItem> OnOrder { get; set; }
public class APIProductRangeOptionValue{}
public class APIProductImage {}
public class APIAmazonVariation{}
public class APIEbayVariation{}
public class PackageProductWithQuantity{}
public class APISalesChannelLink{}
public class ItemBayStockLevel{}
public class SupplierOrderItem{}
public class APISalesChannel
public int ID { get; set; }
public string Name { get; set; }
public string Type { get; set; }
public string Country { get; set; }
public int ExternalShopID { get; set; }
public int ID { get; set; }
public APICustomerType CustomerType { get; set; }
public int BrandID { get; set; }
public int SalesChannelID { get; set; }
public string FirstName { get; set; }
public string LastName { get; set; }
public string EmailAddress { get; set; }
public string UserName = "";
public string Password = "";
public string CompanyName { get; set; }
public string TradingName { get; set; }
public string VATNumber = "";
public APICustomerPaymentTerms PaymentTerms { get; set; }
public string TelNo { get; set; }
public string FaxNo { get; set; }
public string MobNo { get; set; }
public string Address1 { get; set; }
public string Address2 { get; set; }
public string TownCity { get; set; }
public string CountyRegion { get; set; }
public string Postcode { get; set; }
public string Country { get; set; }
public int LoginID { get; set; }
public enum APICustomerType
public enum APICustomerPaymentTerms
FullPaymentBeforeDespatch = 1,
FullPaymentWith10PercentEarlyPaymentDiscount = 4,
FiftyPercentUpfrontBalancein30Days = 5,
ThirtyPercentDepositBalanceOnDelivery = 6,
public class APIProductSalesChannelLink
public int ID { get; set; }
public int BrandID { get; set; }
public int ProductRangeID { get; set; }
public int SalesChannelID { get; set; }
public int ProductID { get; set; }
public string SKU { get; set; }
public decimal Price { get; set; }
public int VATRateID { get; set; }
public class ApiOrderQuery
public int BrandID { get; set; }
public DateTime StartDate { get; set; }
public DateTime EndDate { get; set; }
public int Skip { get; set; } = 0;
public int Take { get; set; } = 200;
public int SalesChannelID { get; set; }
public List<Enums.CustomerOrderStatusType> CustomerOrderStatusTypes { get; set; }
public enum CustomerOrderStatusType : int
advanceddropshipemailsent = 9,
DeliveryAddressChange = 10,
BillingAddressChange = 11,
StatusDescriptionChange = 13,