Migration from Amazon MWS to Selling Partner API

This commit is contained in:
Bobbie Hodgetts
2024-04-11 12:26:13 +01:00
committed by GitHub
parent e054278cdd
commit a7bc00e73a
1318 changed files with 2778105 additions and 5936 deletions

View File

@@ -0,0 +1,103 @@
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace bnhtrade.Core.Model.Product
{
public class ProductInfo
{
private string titleBody;
public ProductInfo(string title, int categoryId, int procurementControlId = 1)
{
Title = title;
ProductCategoryID = categoryId;
ProductProcurementControlID = procurementControlId;
}
public int ProductID { get; set; }
public string Title
{
get
{
if (titleBody != null)
{
if (TitleSuffix == null) { return titleBody; }
else { return titleBody + " (" + TitleSuffix + ")"; }
}
else
{
return null;
}
}
set
{
titleBody = value;
}
}
public string TitleSuffix { get; set; }
public int ProductCategoryID { get; set; }
public int? ProductCategorySubID { get; set; }
//public int? ProductImageID { get; set; }
public DateTime? ReleaseDate { get; set; }
public bool ReleaseDateIsSet
{
get { return ReleaseDate != null; }
}
public decimal? RecommendedRetailPrice { get; set; }
public decimal? MaxPrice { get; set; }
public string AmazonASIN { get; set; }
public string Manufacturer { get; set; }
public decimal? PackageWeightKilogram { get; set; }
public decimal? PackageDimensionHeightMeter { get; private set; }
public decimal? PackageDimensionWidthMeter { get; private set; }
public decimal? PackageDimensionLengthMeter { get; private set; }
public int? CatId { get; set; }
public int ProductProcurementControlID { get; set; }
public bool? ManualCompetativePriceUpdate { get; set; }
public bool? AmazonBuyBoxActive { get; set; }
public DateTime? AmazonBuyBoxActiveUpdated { get; set; }
public bool IsActive { get; set; }
public bool IsDraft { get; set; }
public DateTime RecordCreated { get; set; }
public DateTime RecordModified { get; set; }
public void SetPackageDimension (decimal heightMeter, decimal widthMeter, decimal lengthMeter)
{
if (heightMeter <= 0 || widthMeter <=0 || lengthMeter <= 0)
{
throw new Exception("Dimension must be greater than 0");
}
PackageDimensionHeightMeter = heightMeter;
PackageDimensionWidthMeter = widthMeter;
PackageDimensionLengthMeter = lengthMeter;
}
}
}