Ejemplo n.º 1
0
        /// <summary>
        /// 更新商品价格
        /// </summary>
        /// <param name="itemId"></param>
        /// <param name="onePrice"></param>
        /// <returns></returns>
        public ApiResult ItemUpdatePrice(long itemId, double onePrice)
        {
            ITopClient        client = GetTopClient();
            ItemUpdateRequest req    = new ItemUpdateRequest();

            req.NumIid = itemId;
            req.Price  = onePrice.ToString("f2");
            ItemUpdateResponse rsp = client.Execute(req, AccessToken);

            return(rsp.AsApiResult());
        }
Ejemplo n.º 2
0
        /// <summary>
        /// 定时上架商品,未测试。
        /// </summary>
        /// <param name="itemId"></param>
        /// <param name="num"></param>
        /// <param name="listTime"></param>
        /// <returns></returns>
        public ApiResult ItemUpdateListWhenTime(long itemId, long?num, DateTime?listTime = null)
        {
            ITopClient        client = GetTopClient();
            ItemUpdateRequest req    = new ItemUpdateRequest();

            req.NumIid        = itemId;
            req.ApproveStatus = "onsale";
            req.ListTime      = listTime;
            req.Num           = num;
            ItemUpdateResponse rsp = client.Execute(req, AccessToken);

            return(rsp.AsApiResult());
        }