esendex.sdk.java.model.transfer.message.MessageCollectionResponseDto Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of org.everit.osgi.bundles.com.esendex.javasdk Show documentation
Show all versions of org.everit.osgi.bundles.com.esendex.javasdk Show documentation
The Esendex Java SDK is an easy to use client for our REST API that you can use to integrate SMS and Voice messaging into your Java application.
The newest version!
package esendex.sdk.java.model.transfer.message;
import java.util.ArrayList;
import java.util.Iterator;
import java.util.List;
import esendex.sdk.java.model.transfer.PageableDto;
/**
* The root object for message responses. Contains a collection of
* MessageResponses.
* @author Mike Whittaker
*/
public class MessageCollectionResponseDto extends PageableDto implements Iterable {
private String batchid;
private List messageheaders;
// ensure none null when no messages
private Object readResolve() {
if (messageheaders == null)
messageheaders = new ArrayList();
return this;
}
/**
* Gets the messages.
* @return the messages
*/
public List getMessageheaders() {
return messageheaders;
}
public String getBatchid() {
return batchid;
}
/**
* {@inheritDoc}
*/
@Override
public String toString() {
return super.toString() +
"\nmessageheaders: " + messageheaders;
}
@Override
public Iterator iterator() {
return messageheaders.iterator();
}
}