Ejemplo n.º 1
0
        public void BuyUcdnTrafficTest()
        {
            var entity   = new BuyUcdnTrafficRequest(1, Areacode.cn.ToString());
            var response = ucdn.BuyUcdnTraffic(entity);

            Assert.AreEqual(response.RetCode, 0);
        }
Ejemplo n.º 2
0
        /// <summary>
        /// 购买流量
        /// </summary>
        /// <param name="requestParams">请求参数.</param>
        /// <returns>返回对象<see cref="UCloudSDK.Models.BuyUcdnTrafficResponse"/></returns>
        public BuyUcdnTrafficResponse BuyUcdnTraffic(BuyUcdnTrafficRequest requestParams)
        {
            var request = new RestRequest(Method.GET);

            request.AddUObject(requestParams);
            return(Execute <BuyUcdnTrafficResponse>(request));
        }