com.messagebird.objects.conversations.ConversationWebhookBaseRequest Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of messagebird-api Show documentation
Show all versions of messagebird-api Show documentation
The MessageBird API provides a API to the MessageBird SMS and voicemail services located at https://www.messagebird.com.
The newest version!
package com.messagebird.objects.conversations;
import java.util.List;
import java.util.stream.Collectors;
/**
* Contains common fields for webhook requests.
*/
public abstract class ConversationWebhookBaseRequest {
protected String url;
protected List events;
public String getUrl() {
return url;
}
public void setUrl(String url) {
this.url = url;
}
public List getEvents() {
return events;
}
public void setEvents(List events) {
this.events = events;
}
protected abstract String getRequestName();
protected abstract String getStringRepresentationOfExtraParameters();
@Override
public String toString() {
return getRequestName() + "{" +
getStringRepresentationOfExtraParameters() + '\'' +
", url='" + url + '\'' +
", events=" + events.stream().map(ConversationWebhookEvent::toString).collect(Collectors.joining(",")) +
'}';
}
}