Example #1
0
        /// <summary>
        /// 修改卡券库存
        /// </summary>
        /// <returns></returns>
        public ApiResult ModifyStock(ModifyStockRequest model)
        {
            var url    = GetAccessApiUrl("modifystock", ApiName, "https://api.weixin.qq.com");
            var result = Post <ApiResult>(url, model);

            return(result);
        }
        public void ModifyStock()
        {
            var ModifyInfo = new ModifyStockRequest()
            {
                CardId           = "pl0uwwXdAIetRFMDxLlsoqRlBJac",
                ReduceStockValue = 100
            };
            var result = _weChatApi.ModifyStock(ModifyInfo);

            if (!result.IsSuccess())
            {
                Assert.Fail("修改库存失败,错误信息:" + result.DetailResult + ";Msg:" + result.GetFriendlyMessage());
            }
        }