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

com.messagebird.objects.conversations.ConversationWebhookBaseRequest Maven / Gradle / Ivy

Go to download

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(",")) +
                '}';
    }
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy