diff --git a/src/main/java/com/whatsapp/api/domain/templates/Button.java b/src/main/java/com/whatsapp/api/domain/templates/Button.java index 092a05abc..c69c3927b 100644 --- a/src/main/java/com/whatsapp/api/domain/templates/Button.java +++ b/src/main/java/com/whatsapp/api/domain/templates/Button.java @@ -13,7 +13,8 @@ @JsonTypeInfo(use = JsonTypeInfo.Id.NAME, include = As.EXISTING_PROPERTY, property = "type") @JsonSubTypes({@JsonSubTypes.Type(value = PhoneNumberButton.class, name = "PHONE_NUMBER"),// @JsonSubTypes.Type(value = UrlButton.class, name = "URL"), // - @JsonSubTypes.Type(value = QuickReplyButton.class, name = "QUICK_REPLY")}) + @JsonSubTypes.Type(value = QuickReplyButton.class, name = "QUICK_REPLY"), // + @JsonSubTypes.Type(value = VoiceCallButton.class, name = "VOICE_CALL")}) public class Button { private ButtonType type; diff --git a/src/main/java/com/whatsapp/api/domain/templates/VoiceCallButton.java b/src/main/java/com/whatsapp/api/domain/templates/VoiceCallButton.java new file mode 100644 index 000000000..76aa3c31e --- /dev/null +++ b/src/main/java/com/whatsapp/api/domain/templates/VoiceCallButton.java @@ -0,0 +1,27 @@ +package com.whatsapp.api.domain.templates; + +import com.fasterxml.jackson.annotation.JsonInclude; +import com.whatsapp.api.domain.templates.type.ButtonType; + +/** + * The type Voice call button. + */ +@JsonInclude(JsonInclude.Include.NON_NULL) +public class VoiceCallButton extends Button { + + /** + * Instantiates a new Voice call button. + */ + protected VoiceCallButton() { + super(ButtonType.VOICE_CALL); + } + + /** + * Instantiates a new Quick reply button. + * + * @param text the text + */ + public VoiceCallButton(String text) { + super(ButtonType.VOICE_CALL, text); + } +} diff --git a/src/main/java/com/whatsapp/api/domain/templates/type/ButtonType.java b/src/main/java/com/whatsapp/api/domain/templates/type/ButtonType.java index 6f8344637..cdd9f7722 100644 --- a/src/main/java/com/whatsapp/api/domain/templates/type/ButtonType.java +++ b/src/main/java/com/whatsapp/api/domain/templates/type/ButtonType.java @@ -15,5 +15,9 @@ public enum ButtonType { /** * Quick reply button type. */ - QUICK_REPLY + QUICK_REPLY, + /** + * Voice call button type. + */ + VOICE_CALL; }