private static void ShowNotifications(RateReply reply)
 {
     Debug.WriteLine("Notifications");
     for (var i = 0; i < reply.Notifications.Length; i++)
     {
         var notification = reply.Notifications[i];
         Debug.WriteLine("Notification no. {0}", i);
         Debug.WriteLine(" Severity: {0}", notification.Severity);
         Debug.WriteLine(" Code: {0}", notification.Code);
         Debug.WriteLine(" Message: {0}", notification.Message);
         Debug.WriteLine(" Source: {0}", notification.Source);
     }
 }
        private void ProcessReply(RateReply reply)
        {
            foreach (var rateReplyDetail in reply.RateReplyDetails)
            {
                var netCharge = rateReplyDetail.RatedShipmentDetails.Max(x => x.ShipmentRateDetail.TotalNetCharge.Amount);

                var key = rateReplyDetail.ServiceType.ToString();
                var deliveryDate = rateReplyDetail.DeliveryTimestampSpecified ? rateReplyDetail.DeliveryTimestamp : DateTime.Now.AddDays(30);
                AddRate(key, _serviceCodes[key], netCharge, deliveryDate);
            }
        }