Пример #1
0
        public ActionResult AddPriceToProduct(ApiRequestPrice price)
        {
            var model = _jsonClient.Post <ApiResponsePrice>(ApiEndpoint.DefaultApi + "api/v1/products/" + price.ProductId + "/prices", price);

            return(Json(model, JsonRequestBehavior.AllowGet));
        }
Пример #2
0
        /// <summary>
        /// Make callback to the url provided with the order for the transcoding job.
        /// </summary>
        /// <param name="job">Job that are done or failed</param>
        public void MakeCallback(Job job)
        {
            var status = AutoMapper.Mapper.Map <Model.JobStatus>(job);

            _jsonClient.Post(job.CallbackUrl, status);
        }
Пример #3
0
        public ActionResult AddProduct(ApiRequestProduct product)
        {
            var model = _jsonClient.Post <ApiResponseProduct>(ApiEndpoint.DefaultApi + "api/v1/products/", product);

            return(Json(model ?? new ApiResponseProduct(), JsonRequestBehavior.AllowGet));
        }