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

com.github.messenger4j.send.message.template.button.CallButton Maven / Gradle / Ivy

Go to download

The ultimate Java library for building Chatbots on the Facebook Messenger Platform

There is a newer version: 1.1.0
Show newest version
package com.github.messenger4j.send.message.template.button;

import lombok.EqualsAndHashCode;
import lombok.NonNull;
import lombok.ToString;

/**
 * @author Max Grabenhorst
 * @since 1.0.0
 */
@ToString(callSuper = true)
@EqualsAndHashCode(callSuper = true)
public final class CallButton extends Button {

    private final String title;
    private final String payload;

    public static CallButton create(@NonNull String title, @NonNull String payload) {
        return new CallButton(title, payload);
    }

    private CallButton(String title, String payload) {
        super(Type.PHONE_NUMBER);
        this.title = title;
        this.payload = payload;
    }

    public String title() {
        return title;
    }

    public String payload() {
        return payload;
    }
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy