Upload an attachment to the Xero object.

def _put_attachment_data(self, id, filename, data, content_type, include_online=False):
        """Upload an attachment to the Xero object."""
        uri = '/'.join([self.base_url, self.name, id, 'Attachments', filename])
        params = {'IncludeOnline': 'true'} if include_online else {}
        headers = {'Content-Type': content_type, 'Content-Length': str(len(data))}
        return uri, params, 'put', data, headers, False