2024-02-24 21:17:37 +00:00
|
|
|
using BotSharp.Abstraction.Messaging.Enums;
|
2024-04-18 18:54:43 +00:00
|
|
|
using Newtonsoft.Json;
|
2024-02-24 21:17:37 +00:00
|
|
|
|
2023-12-18 22:38:12 +00:00
|
|
|
namespace BotSharp.Abstraction.Messaging.Models.RichContent.Template;
|
|
|
|
|
|
|
|
|
|
/// <summary>
|
|
|
|
|
/// https://developers.facebook.com/docs/messenger-platform/send-messages/buttons
|
|
|
|
|
/// </summary>
|
|
|
|
|
public class ButtonTemplateMessage : IRichMessage, ITemplateMessage
|
|
|
|
|
{
|
|
|
|
|
[JsonPropertyName("rich_type")]
|
2024-04-18 18:54:43 +00:00
|
|
|
[JsonProperty("rich_type")]
|
2024-02-24 21:17:37 +00:00
|
|
|
public string RichType => RichTypeEnum.ButtonTemplate;
|
2023-12-18 22:38:12 +00:00
|
|
|
|
|
|
|
|
[JsonPropertyName("text")]
|
2024-04-18 18:54:43 +00:00
|
|
|
[JsonProperty("text")]
|
2023-12-18 22:38:12 +00:00
|
|
|
public string Text { get; set; } = string.Empty;
|
|
|
|
|
|
|
|
|
|
[JsonPropertyName("template_type")]
|
2024-04-18 18:54:43 +00:00
|
|
|
[JsonProperty("template_type")]
|
2024-02-24 21:17:37 +00:00
|
|
|
public string TemplateType => TemplateTypeEnum.Button;
|
2023-12-18 22:38:12 +00:00
|
|
|
|
|
|
|
|
[JsonPropertyName("buttons")]
|
2024-04-18 18:54:43 +00:00
|
|
|
[JsonProperty("buttons")]
|
2024-04-02 19:09:42 +00:00
|
|
|
public ElementButton[] Buttons { get; set; } = new ElementButton[0];
|
2024-03-21 01:14:05 +00:00
|
|
|
|
|
|
|
|
[JsonPropertyName("is_horizontal")]
|
2024-04-18 18:54:43 +00:00
|
|
|
[JsonProperty("is_horizontal")]
|
2024-03-21 01:14:05 +00:00
|
|
|
public bool IsHorizontal { get; set; }
|
2023-12-18 22:38:12 +00:00
|
|
|
}
|