private static void PrintSomeDeserializedElements(PortalUserInfo xmlDeserialized) { Console.WriteLine($"Company {xmlDeserialized.Company}"); Console.WriteLine($"Short name {xmlDeserialized.AgentInfo.ShortName}"); Console.WriteLine($"SmsPhoneNumber {xmlDeserialized.Contacts.SmsPhoneNumber}"); Console.WriteLine($"FilialISN {xmlDeserialized.FilialISN}"); }
public PortalUserInfo GetCurrentUserInfo() { var response = GetResponse <PortalUserInfo>(USER_INFO); if (response.StatusCode != HttpStatusCode.OK || response.Data == null) { throw new ApplicationException("Portal API doesn't work: " + response.Content); } PortalUserInfo userInfo = response.Data; return(userInfo); }