private static GetReturnLocationRealtimeResponse ObtainByReasonCode(SalesTransaction order, SalesLine line, string reasonCodeId, RequestContext context)
            {
                GetReturnLocationRealtimeRequest request = new GetReturnLocationRealtimeRequest(order, line, reasonCodeId, false);

                GetReturnLocationRealtimeResponse response = context.Execute <GetReturnLocationRealtimeResponse>(request);

                return(response);
            }
            private static GetReturnLocationRealtimeResponse ObtainByInfoCode(SalesTransaction order, SalesLine line, RequestContext context)
            {
                GetReturnLocationRealtimeRequest request = new GetReturnLocationRealtimeRequest(order, line, null, true);

                GetReturnLocationRealtimeResponse response = context.Execute <GetReturnLocationRealtimeResponse>(request);

                return(response);
            }
Exemplo n.º 3
0
            /// <summary>
            /// Get return location parameters.
            /// </summary>
            /// <param name="request">The transaction service request.</param>
            /// <returns>The transaction service response.</returns>
            private GetReturnLocationRealtimeResponse GetReturnLocaion(GetReturnLocationRealtimeRequest request)
            {
                ReadOnlyCollection <object> transactionServiceResponse = null;
                var transactionService = new TransactionServiceClient(request.RequestContext);

                if (request.IsInfoCode)
                {
                    transactionServiceResponse = transactionService.GetReturnLocationByInfoCode(request.SalesTransaction, request.Line);
                }
                else
                {
                    transactionServiceResponse = transactionService.GetReturnLocationByReasonCode(request.SalesTransaction, request.Line, request.ReasonCodeId);
                }

                return(new GetReturnLocationRealtimeResponse((bool)transactionServiceResponse[0], (string)transactionServiceResponse[1], (string)transactionServiceResponse[2], (string)transactionServiceResponse[3]));
            }