예제 #1
0
        public Received GetWarehouses()
        {
            queryWarehouse request = _RequestInit <queryWarehouse>("queryWarehouse", JsonConvert.SerializeObject(new { }));

            request.data = new { };

            Received result = Resfun.funresult(request, api_url);

            return(result);
        }
예제 #2
0
        public Received Create(createOutboundOrder_data data)
        {
            createOutboundOrder request = _RequestInit <createOutboundOrder>("createOutboundOrder", JsonConvert.SerializeObject(data));

            request.data = data;

            Received result = Resfun.funresult(request, api_url);

            return(result);
        }
예제 #3
0
        public Received GetDeliveryWay(string warehouseID)
        {
            object data = new { warehouseID = warehouseID };

            queryDeliveryWay request = _RequestInit <queryDeliveryWay>("queryDeliveryWay", JsonConvert.SerializeObject(data));

            request.data = data;

            Received result = Resfun.funresult(request, api_url);

            return(result);
        }
예제 #4
0
        public Received Void(string outboundOrderNum)
        {
            voidOutboundOrder_data data = new voidOutboundOrder_data()
            {
                outboundOrderNum = outboundOrderNum
            };

            voidOutboundOrder request = _RequestInit <voidOutboundOrder>("voidOutboundOrder", JsonConvert.SerializeObject(data));

            request.data = data;

            return(Resfun.funresult(request, api_url));
        }
예제 #5
0
        public Received Confirm(string outboundOrderNum)
        {
            confirmOutboundOrder_data data = new confirmOutboundOrder_data()
            {
                outboundOrderNum = outboundOrderNum
            };

            confirmOutboundOrder request = _RequestInit <confirmOutboundOrder>("confirmOutboundOrder", JsonConvert.SerializeObject(data));

            request.data = data;

            return(Resfun.funresult(request, api_url));
        }
예제 #6
0
        public Received Order(string outboundOrderNum)
        {
            queryOutboundOrder_data data = new queryOutboundOrder_data()
            {
                outboundOrderNum = outboundOrderNum
            };

            queryOutboundOrder request = _RequestInit <queryOutboundOrder>("queryOutboundOrder", JsonConvert.SerializeObject(data));

            request.data = data;

            Received result = Resfun.funresult(request, api_url);

            return(result);
        }
예제 #7
0
        public Received Tracking(string warehouseID, string outboundNum, string trackingNum = "")
        {
            queryTrack_data data = new queryTrack_data()
            {
                warehouseID = warehouseID,
                outboundNum = outboundNum,
                trackingNum = trackingNum
            };

            queryTrack request = _RequestInit <queryTrack>("queryTrack", JsonConvert.SerializeObject(data));

            request.data = data;

            Received result = Resfun.funresult(request, api_url);

            return(result);
        }
예제 #8
0
        private string _Get_Token()
        {
            getToken request = new getToken()
            {
                action = "getToken",
                data   = new getTokendata()
                {
                    userName = api_userName,
                    passWord = api_password
                }
            };

            Received result = Resfun.funresult(request, api_url);

            if (!result.code.Equals("0"))
            {
                throw (new Exception(result.msg));
            }

            return(result.data);
        }
예제 #9
0
        public Received SearchOrder(string pageNum = "1", string pageSize = "100", int days = 7)
        {
            TimeZoneConvert timeZone  = new TimeZoneConvert();
            DateTime        endDate   = timeZone.ConvertDateTime(QDLogistics.Commons.EnumData.TimeZone.TST);
            DateTime        startDate = endDate.AddDays(-days);

            queryOutboundOrderList_data data = new queryOutboundOrderList_data()
            {
                dateOrderedStartDate = startDate.ToString("yyyy-MM-dd"),
                dateOrderedEndDate   = endDate.ToString("yyyy-MM-dd"),
                status   = "valid",
                pageSize = pageSize,
                pageNum  = pageNum
            };

            queryOutboundOrderList request = _RequestInit <queryOutboundOrderList>("queryOutboundOrderList", JsonConvert.SerializeObject(data));

            request.data = data;

            Received result = Resfun.funresult(request, api_url);

            return(result);
        }