Esempio n. 1
0
 /// <summary>
 /// Make a request to register sender name
 /// </summary>
 /// <param name="senderName">New sender name. For digits should be 14 chars maximum. For letters - limit is 11 characters</param>
 /// <param name="country">Country of origin for the name</param>
 /// <returns>Id for the sender name</returns>
 public int RequestSenderRegistration(string senderName, Country country)
 {
     return(Run("registerSender")
            .WithParameter("name", senderName)
            .WithParameter("country", CountriesUtils.AsString(country))
            .Execute()
            .To <ResponsePureImpl <SenderRegisterImpl> >(CheckForError)
            .result.Id);
 }
Esempio n. 2
0
 /// <summary>
 /// Get full information about sender name by name and country
 /// </summary>
 /// <param name="name">Name to search</param>
 /// <param name="country">Country to filter</param>
 /// <returns>Sender name object with full information</returns>
 public ISender GetSender(string name, Country country)
 {
     return
         (Run("getSenderStatus")
          .WithParameter("name", name)
          .WithParameter("country", CountriesUtils.AsString(country))
          .Execute()
          .To <ResponseImpl <ISender, SenderImpl> >(CheckForError)
          .result);
 }