defmodule MessengerBot.Component.Message.GenericTemplatePayload do @moduledoc """ Structure and type for generic template payload """ alias MessengerBot.Component.Message.GenericElement @derive [Poison.Encoder] defstruct [template_type: "generic", sharable: nil, image_aspect_ratio: nil, elements: []] @type t :: %__MODULE__{ template_type: String.t, sharable: boolean(), image_aspect_ratio: String.t, elements: list(GenericElement.t) } end