Esempio n. 1
0
        private TAddress UpdateAddressDetail(TAddressRequest address)
        {
            AddressOptions addressOptions = new AddressOptions()
            {
                City         = address.City,
                CustomerName = address.CustomerName,
                FriendlyName = address.FriendlyName,
                PostalCode   = address.PostalCode,
                Region       = address.Region,
                Street       = address.Street
            };
            Address detail = TwilioClient.UpdateAddress(address.AddressSid, addressOptions);

            if (detail.RestException != null)
            {
                throw new Exception(detail.RestException.Message);
            }
            return(Mapper.Map <TAddress>(detail));
        }