def get_batch_method(self):
        """
        Returns a change batch for SharePoint's UpdateListItems operation.
        """
        if not self._changed:
            return None

        batch_method = E.Method(Cmd='Update' if self.id else 'New')
        batch_method.append(E.Field(text_type(self.id) if self.id else 'New',
                                    Name='ID'))
        for field in self.fields.values():
            if field.name in self._changed:
                value = field.unparse(self._data[field.name] or '')
                batch_method.append(E.Field(value, Name=field.name))
        return batch_method
def get_batch_method ( self ) : if not self . _changed : return None batch_method = E . Method ( Cmd = 'Update' if self . id else 'New' ) batch_method . append ( E . Field ( text_type ( self . id ) if self . id else 'New' , Name = 'ID' ) ) for field in self . fields . values ( ) : if field . name in self . _changed : value = field . unparse ( self . _data [ field . name ] or '' ) batch_method . append ( E . Field ( value , Name = field . name ) ) return batch_method
Returns a change batch for SharePoint's UpdateListItems operation.