Class SmsClient
VonageClient.getSmsClient().-
Constructor Summary
Constructors -
Method Summary
-
Constructor Details
-
SmsClient
Create a new SmsClient.- Parameters:
wrapper- Http Wrapper used to create a Sms Request
-
-
Method Details
-
submitMessage
public SmsSubmissionResponse submitMessage(Message message) throws VonageResponseParseException, VonageClientException Send an SMS message.This uses the supplied object to construct a request and post it to the Vonage API.
This method will respond with an SmsSubmissionResponse object. Depending on the nature and length of the submitted message, Vonage may automatically split the message into multiple sms messages in order to deliver to the handset. For example, a long text sms of greater than 160 chars will need to be split into multiple 'concatenated' sms messages. The Vonage service will handle this automatically for you.
The messages are stored as a Collection of SmsSubmissionResponseMessage objects on the SmsSubmissionResponse object. Each message can potentially have a different status result, and each message will have a different message id. Delivery notifications will be generated for each sms message within this set and will be posted to your application containing the appropriate message id.- Parameters:
message- The message request object that describes the type of message and the contents to be submitted.- Returns:
- SmsSubmissionResponse an object containing a collection of SmsSubmissionResponseMessage objects for each actual sms that was required to submit the message.
- Throws:
VonageClientException- if there was a problem with the Vonage request or response objects.VonageResponseParseException- if the response from the API could not be parsed.
-