示例#1
0
        /// <summary>
        /// Получение заказов
        /// </summary>
        public async Task <EasyMSList <Order> > GetAllAsync(OrderQueryBuilder builder)
        {
            builder.Path = OrdersPath;
            builder.ValidateGet();

            return(await Gateway.SendGetRequestAsync <EasyMSList <Order> >(builder.BuildUri()));
        }
        public void Test_No_Parameters()
        {
            var builder = new OrderQueryBuilder("1");

            var query = builder.BuildUri();

            Assert.Equal("https://my.easyms.co/api/?organizationId=1", query.ToString());
        }
示例#3
0
        /// <summary>
        /// Получение заказа по его идентификатору
        /// </summary>
        /// <param name="orderId">идентификатор заказа</param>
        /// <param name="organizationId">идентификатор организации</param>
        /// <returns><see cref="Order"/></returns>
        public async Task <Order> GetAsync(string orderId, string organizationId)
        {
            var builder = new OrderQueryBuilder {
                Path = string.Format(OrderPath, orderId), OrganizationId = organizationId
            };

            builder.ValidateGet();

            return(await Gateway.SendGetRequestAsync <Order>(builder.BuildUri()));
        }