public function addAttachment($type, $name, $data)
    {
        $this->attachments[] = array(
            'type' => $type,
            'name' => $name,
            'content' => $data
        );

        return $this;
    }