Пример #1
0
        public UPSTrackService.TrackRequest CreateUPSTrackRequest(string trackingNumber)
        {
            UPSTrackService.TrackRequest request = new UPSTrackService.TrackRequest();
            RequestType requestType = new RequestType()
            {
                RequestOption = new string[] { "0", "1", "2", "3", "4", "5", "6", "7" }
                //SubVersion = "",
                //TransactionReference = new TransactionReferenceType() { }
            };

            request.Request       = requestType;
            request.InquiryNumber = trackingNumber;

            return(request);
        }
Пример #2
0
        public TrackResponse GetUPSTrack(string userName, string password, string accessKey, UPSTrackService.TrackRequest request)
        {
            TrackResponse response = null;

            UPSTrackService.TrackService svc = new UPSTrackService.TrackService();
            svc.UPSSecurityValue = CreateUPSAuthentication(userName, password, accessKey);

            response = svc.ProcessTrack(request);

            return(response);
        }