Example #1
0
        private TAccount GetAccountInfo(string accountSid = "")
        {
            Account account = string.IsNullOrEmpty(accountSid) ? TwilioClient.GetAccount() : TwilioClient.GetAccount(accountSid);

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