Cómo extender las clases de script de aplicaciones de Google

Estoy tratando de extender la clase de hoja en un script y obtengo la hoja no está definida cuando intenta ejecutar lo siguiente:

Sheet.prototype.moveColumn = function(SourceIndex, DestinationIndex){
  var source = this.getRange(1, SourceIndex, ss.getLastRow(), 1).getValues()
  var move = SourceIndex-DestinationIndex>0 ? sheet.getRange(1, DestinationIndex,  ss.getLastRow(), SourceIndex-DestinationIndex).getValues() : sheet.getRange(1, SourceIndex, ss.getLastRow(), DestinationIndex-SourceIndex).getValues();
  sheet.getRange(1, DestinationIndex, source.length, 1).setValues(source);
  SourceIndex-DestinationIndex>0 ? sheet.getRange(1, DestinationIndex+1, move.length, move[0].length).setValues(move) : sheet.getRange(1, SourceIndex, move.length, move[0].length);
  return this
}

Respuestas a la pregunta(2)

Su respuesta a la pregunta