You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
When I call GetTemplateByNameAsync or GetAllTemplatesAsync, the response type does not include properties for buttons if the template has buttons.
This is a correct example of it can be mapped from return json:
public class Template
{
[JsonProperty("name")]
public string Name { get; set; }
[JsonProperty("components")]
public List<Component> Components { get; set; }
[JsonProperty("language")]
public string Language { get; set; }
[JsonProperty("status")]
public string Status { get; set; }
[JsonProperty("category")]
public string Category { get; set; }
[JsonProperty("id")]
public string Id { get; set; }
}
public class Component
{
[JsonProperty("type")]
public string Type { get; set; }
[JsonProperty("format")]
public string Format { get; set; }
[JsonProperty("text")]
public string Text { get; set; }
[JsonProperty("example")]
public Example Example { get; set; }
[JsonProperty("buttons")]
public List<Button> Buttons { get; set; }
}
public class Example
{
[JsonProperty("body_text")]
public List<List> BodyText { get; set; }
[JsonProperty("header_handle")]
public List<string> ImageUrls { get; set; }
}
public class Button
{
[JsonProperty("type")]
public string Type { get; set; }
[JsonProperty("text")]
public string Text { get; set; }
[JsonProperty("url")]
public string Url { get; set; } // For URL type buttons
[JsonProperty("phone_number")]
public string PhoneNumber { get; set; } // For PHONE_NUMBER type buttons
}
The text was updated successfully, but these errors were encountered:
Hello,
When I call GetTemplateByNameAsync or GetAllTemplatesAsync, the response type does not include properties for buttons if the template has buttons.
This is a correct example of it can be mapped from return json:
public class Template
{
[JsonProperty("name")]
public string Name { get; set; }
}
public class Component
{
[JsonProperty("type")]
public string Type { get; set; }
}
public class Example
{
[JsonProperty("body_text")]
public List<List> BodyText { get; set; }
}
public class Button
{
[JsonProperty("type")]
public string Type { get; set; }
}
The text was updated successfully, but these errors were encountered: