Пример #1
0
        public void Update_Success()
        {
            MerchantOrderCreateRequest createRequest = BuildCreateRequest();
            MerchantOrder createdOrder = client.Create(createRequest);

            Thread.Sleep(1000);

            var updateRequest = new MerchantOrderUpdateRequest
            {
                AdditionalInfo = "New Additional Info",
            };
            MerchantOrder order = client.Update(
                createdOrder.Id.GetValueOrDefault(), updateRequest);

            Assert.NotNull(order);
            Assert.NotNull(order.Items);
            Assert.Equal(updateRequest.AdditionalInfo, order.AdditionalInfo);
        }
Пример #2
0
        public async Task UpdateAsync_Success()
        {
            MerchantOrderCreateRequest createRequest = await BuildCreateRequestAsync();

            MerchantOrder createdOrder = await client.CreateAsync(createRequest);

            await Task.Delay(1000);

            var updateRequest = new MerchantOrderUpdateRequest
            {
                AdditionalInfo = "New Additional Info",
            };
            MerchantOrder order = await client.UpdateAsync(
                createdOrder.Id.GetValueOrDefault(), updateRequest);

            Assert.NotNull(order);
            Assert.NotNull(order.Items);
            Assert.Equal(updateRequest.AdditionalInfo, order.AdditionalInfo);
        }