protected function genericMessageToArray()
    {
        $message = [];
        $message['recipient'] = $this->recipient;
        $message['notification_type'] = $this->notificationType;
        $message['message']['attachment']['type'] = 'template';
        $message['message']['attachment']['payload']['template_type'] = 'generic';
        $message['message']['attachment']['payload']['elements'] = $this->cards;

        return $message;
    }
protected function genericMessageToArray()
    {
        $message = [];
        $message['recipient'] = $this->recipient;
        $message['notification_type'] = $this->notificationType;
        $message['message']['attachment']['type'] = 'template';
        $message['message']['attachment']['payload']['template_type'] = 'generic';
        $message['message']['attachment']['payload']['elements'] = $this->cards;

        return $message;
    }
protected function genericMessageToArray ( ) { $ message = [ ] ; $ message [ 'recipient' ] = $ this -> recipient ; $ message [ 'notification_type' ] = $ this -> notificationType ; $ message [ 'message' ] [ 'attachment' ] [ 'type' ] = 'template' ; $ message [ 'message' ] [ 'attachment' ] [ 'payload' ] [ 'template_type' ] = 'generic' ; $ message [ 'message' ] [ 'attachment' ] [ 'payload' ] [ 'elements' ] = $ this -> cards ; return $ message ; }
Returns message for Generic Template message.

@return array
Returns message for Generic Template message .