针对Fixed-Price的Item,其Inventory Revise和Price Revise可以使用接口ReviseInventoryStatusCall来完成。

其使用非常简单,ItemID为必填(如果使用SKU方式的话,见"参考帖子")。之后,只需指定了Quantity就可以修改库存,指定了StartPrice就可以修改价格,真的是轻量好用!

 

参考帖子:

http://community.ebay.cn/thread-1200162924-1-1.html#userconsent#

 

2.Usage

针对多SKU的Item,则需同时指定Item和SKU即可。

  1. public void InventoryChange(ApiContext context, string itemID, string SKU, int quantity)
  2. {
  3.     try
  4.     {
  5.         var call = new ReviseInventoryStatusCall(context);
  6.  
  7.         var coll = new InventoryStatusTypeCollection();
  8.         var status = new InventoryStatusType();
  9.         status.ItemID = itemID;
  10.         status.SKU = SKU;
  11.         status.Quantity = quantity;
  12. //status.StartPrice = new AmountType(); 指定价格
  13. //status.StartPrice.Value = price;
  14.         coll.Add(status);
  15.  
  16.         var result = call.ReviseInventoryStatus(coll);
  17.     }
  18.     catch (Exception ex)
  19.     {
  20.         throw new EbayAPIExpcetion(ex.Message, ex.InnerException == null ? ex : ex.InnerException);
  21.     }
  22. }

 

 

 

相关文章:

  • 2022-01-15
  • 2022-01-18
  • 2021-04-22
  • 2021-09-05
  • 2021-05-18
  • 2022-12-23
  • 2022-12-23
猜你喜欢
  • 2021-09-26
  • 2022-12-23
  • 2022-01-09
  • 2021-09-29
  • 2021-08-24
  • 2022-12-23
  • 2022-12-23
相关资源
相似解决方案