Skip to content

Commit

Permalink
properties for new bind tags
Browse files Browse the repository at this point in the history
  • Loading branch information
surabhi-mahawar committed Feb 17, 2022
1 parent e93eb2b commit 0e46f8c
Show file tree
Hide file tree
Showing 2 changed files with 31 additions and 1 deletion.
27 changes: 27 additions & 0 deletions src/main/java/messagerosa/core/model/StylingTag.java
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
package messagerosa.core.model;

public enum StylingTag {
LIST("list"),
QUICKREPLYBTN("buttonsForListItems"),
IMAGE("image"),
AUDIO("audio"),
VIDEO("video");

private String name;

StylingTag(String stylingTag) {
name=stylingTag;
}

public String toString() {
return name;
}

public static StylingTag getEnumByText(String code) {
for (StylingTag e : StylingTag.values()) {
if (e.name.equals(code))
return e;
}
return null;
}
}
5 changes: 4 additions & 1 deletion src/main/java/messagerosa/core/model/XMessagePayload.java
Original file line number Diff line number Diff line change
Expand Up @@ -19,5 +19,8 @@ public class XMessagePayload {
private LocationParams location;
private ContactCard contactCard;
private ArrayList<ButtonChoice> buttonChoices;
private String stylingTag;
private StylingTag stylingTag;
private String flow;
private Integer index;
private String mediaCaption;
}

0 comments on commit 0e46f8c

Please sign in to comment.