def download(self, attachment_id, destination):
attachment = self(id=attachment_id)<EOL>if os.path.isdir(destination):<EOL><INDENT>destination = os.path.join(destination, attachment.file_name)<EOL><DEDENT>return self._download_file(attachment.content_url, destination)<EOL>
Download an attachment from Zendesk.

:param attachment_id: id of the attachment to download
:param destination: destination path. If a directory, the file will be placed in the directory with
                    the filename from the Attachment object.
:return: the path the file was written to