diff --git a/src/Message/ListMessage.php b/src/Message/ListMessage.php new file mode 100755 index 0000000..34bc434 --- /dev/null +++ b/src/Message/ListMessage.php @@ -0,0 +1,56 @@ +listElements = $listElements; + } + else { + throw new \InvalidArgumentException("Invalid elements array."); + } + } + + /** + * {@inheritdoc} + */ + public function getFormattedMessage() { + return [ + 'attachment' => [ + 'type' => 'template', + 'payload' => [ + 'template_type' => 'list', + 'elements' => $this->listElements, + ], + ], + ]; + } + +}