コード例 #1
0
        public async Task GetOrderStatus_Json()
        {
            var orderstatus = await fakeapi_json.GetOrderStatus("105137040", 304);

            Assert.IsType <GetOrderStatusResponse>(orderstatus);
            //Assert.Equal("105137040", orderstatus.OrderNumber);
            Assert.True(orderstatus.OrderDownloaded);
            Assert.Equal(OrderFulfillmentOption.ShipBySeller, orderstatus.FulfillmentOption);
            Assert.Equal(OrderSalesChannel.NeweggOrder, orderstatus.SalesChannel);
        }
コード例 #2
0
        /// <summary>
        /// Get the status of special order
        /// </summary>
        public void GetOrderStatus()
        {
            Console.WriteLine("GetOrderStatus");

            // Send your request and get response
            var orderstatus = ordercall.GetOrderStatus("145643595").Result;

            // Use the data pre you business
            Console.WriteLine(string.Format("There order status is {0}.", orderstatus.OrderStatusName));
        }
コード例 #3
0
        public async Task GetOrderStatus()
        {
            try
            {
                var orderstatus = await fakeapi.GetOrderStatus("105137040", 304);

                Assert.IsType <GetOrderStatusResponse>(orderstatus);
                Assert.Equal("105137040", orderstatus.OrderNumber);
                Assert.True(orderstatus.OrderDownloaded);
                Assert.Equal(OrderFulfillmentOption.ShipBySeller, orderstatus.FulfillmentOption);
                Assert.Equal(OrderSalesChannel.NeweggOrder, orderstatus.SalesChannel);
            }
            catch (SDK.Base.Exception.ApiException e)
            {
                Assert.True(((SDK.Base.Exception.Errors)e.Details).Count > 0);
            }
        }