/// <summary> /// Gets all <see cref="SpeedDial"/>s. /// </summary> /// <returns>Collection of <see cref="SpeedDial"/></returns> /// <exception cref="OdorikException">Throws when Odorik.cz refuses to get SpeedDials. See <see cref="OdorikException.MessageCode" /> for details.</exception> public async Task <IEnumerable <SpeedDial> > GetSpeedDialsAsync() { using (var client = new OdorikClient(Credentials)) { var result = await client.GetAsync(null, SpeedDial); return(DeserializeResult <IEnumerable <SpeedDial> >(result)); } }
/// <summary> /// Gets <see cref="SentSMS"/>s limited by <paramref name="filter"/>. /// </summary> /// <param name="filter"><see cref="SMSFilter"/> contains From and To limitation</param> /// <returns>Collection of <see cref="SentSMS"/></returns> /// <exception cref="OdorikException">Throws when Odorik.cz refuses to get SMSs. See <see cref="OdorikException.MessageCode" /> for details.</exception> public async Task <IEnumerable <SentSMS> > GetSentSMSsAsync(SMSFilter filter) { using (var client = new OdorikClient(Credentials)) { var result = await client.GetAsync(filter, SentSMS); return(DeserializeResult <IEnumerable <SentSMS> >(result)); } }
/// <summary> /// Gets actual balance. /// </summary> /// <returns>Actual account balance.</returns> /// <exception cref="OdorikException">Throws when Odorik.cz refuses to get actual account balance. See <see cref="OdorikException.MessageCode" /> for details.</exception> public async Task <double> GetBalanceAsync() { using (var client = new OdorikClient(Credentials)) { var result = await client.GetAsync(null, Credit); return(DeserializeResult <double>(result)); } }
/// <summary> /// Gets allowed senders for <see cref="NewSMS.Sender"/>. /// </summary> /// <returns>Collection of allowed senders.</returns> public async Task <IEnumerable <string> > GetAllowedSendersAsync() { using (var client = new OdorikClient(Credentials)) { var result = await client.GetAsync(null, AllowedSenders); return(result.Split(new[] { "," }, StringSplitOptions.RemoveEmptyEntries)); } }