All Downloads are FREE. Search and download functionalities are using the official Maven repository.

esendex.sdk.java.model.domain.impl.SentMessageCollectionResponseAssembler Maven / Gradle / Ivy

Go to download

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.domain.impl;

import java.util.ArrayList;
import java.util.List;

import esendex.sdk.java.model.domain.response.SentMessageCollectionResponse;
import esendex.sdk.java.model.domain.response.SentMessageResponse;
import esendex.sdk.java.model.transfer.message.MessageCollectionResponseDto;
import esendex.sdk.java.model.transfer.message.MessageResponseDto;

public class SentMessageCollectionResponseAssembler extends MessageCollectionResponseAssembler {

	public SentMessageCollectionResponseAssembler(MessageCollectionResponseDto dto) {
		super(dto);
	}
	
	public SentMessageCollectionResponse createResponse() {
		
		List messages = new ArrayList();
		for (MessageResponseDto dto : collection) {
			SentMessageResponseAssembler assembler = new SentMessageResponseAssembler(dto);
			messages.add(assembler.createResponse());
		}
		
		SentMessageCollectionResponseImpl response = new SentMessageCollectionResponseImpl(messages);
		populateResponse(response);
		return response;
	}

	protected void populateResponse(SentMessageCollectionResponseImpl response) {
		super.populateResponse(response);
	}
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy