예제 #1
0
        public void ExecuteRequest()
        {
            RateService service = new RateService();

            try
            {
                if (RequestedShipment == null)
                {
                    return;
                }

                RateReply reply = service.getRates(this);
                if (reply.HighestSeverity == NotificationSeverityType.SUCCESS || reply.HighestSeverity == NotificationSeverityType.NOTE || reply.HighestSeverity == NotificationSeverityType.WARNING)
                {
                    foreach (var rateReplyDetail in reply.RateReplyDetails)
                    {
                        foreach (var shipmentDetail in rateReplyDetail.RatedShipmentDetails)
                        {
                            if (shipmentDetail == null)
                            {
                                continue;
                            }
                            if (shipmentDetail.ShipmentRateDetail == null)
                            {
                                continue;
                            }

                            _shipmentRate.Add(Mapper.Map <EisShipmentRate>(shipmentDetail.ShipmentRateDetail));
                        }
                    }
                }
            }
            catch (SoapException e)
            {
            }
            catch (Exception e)
            {
            }
        }
예제 #2
0
        public EisReply Send()
        {
            RateService service = new RateService();

            return(Mapper.Map <EisReply>(service.getRates(this)));
        }