Example #1
0
        public string GetShipToTaxAreaId(MyHerbalife3.Ordering.ServiceProvider.OrderSvc.Address address)
        {
            var proxy = ServiceClientProvider.GetOrderServiceProxy();

            try
            {
                var response = proxy.GetTaxAreaId(new MyHerbalife3.Ordering.ServiceProvider.OrderSvc.GetTaxAreaIdRequest1(new MyHerbalife3.Ordering.ServiceProvider.OrderSvc.GetTaxAreaIdRequest_V01 {
                    Address = address
                })).GetTaxAreaIdResult;
                if (null != response && response.Status == MyHerbalife3.Ordering.ServiceProvider.OrderSvc.ServiceResponseStatusType.Success)
                {
                    var responseV01 = response as MyHerbalife3.Ordering.ServiceProvider.OrderSvc.GetTaxAreaIdResponse_V01;
                    if (null != responseV01)
                    {
                        return(responseV01.TaxAreaId);
                    }
                }
                LoggerHelper.Error("TaxAreaIdProvider: Error GetShipToTaxAreaId null");
                return(string.Empty);
            }
            catch (Exception ex)
            {
                LoggerHelper.Error(string.Format("TaxAreaIdProvider: Error GetShipToTaxAreaId, error message:{0}",
                                                 ex.Message));
                return(string.Empty);
            }
            finally
            {
                proxy.Close();
            }
        }
Example #2
0
        public MyHerbalife3.Ordering.ServiceProvider.ShippingSvc.Address GetToShipping(MyHerbalife3.Ordering.ServiceProvider.OrderSvc.Address address)
        {
            if (address == null)
            {
                return(null);
            }

            return(Mapper.Map <MyHerbalife3.Ordering.ServiceProvider.ShippingSvc.Address>(address));
        }