Upload an attachment to the Xero object (from file object).

def put_attachment(self, id, filename, file, content_type, include_online=False):
        """Upload an attachment to the Xero object (from file object)."""
        return self.put_attachment_data(id, filename, file.read(), content_type, include_online=include_online)