code: function(options) {
        options = options || {};
        var model = this;
  
        var triggerDestroy = function() {
          model.trigger('destroy', model, model.collection, options);
        };
  
        if (!this.id) {
          return triggerDestroy();
        }
  
        if (!options.wait) {
          triggerDestroy();
        }
  
        var request = Parse._request({
          route: "classes",
          className: this.className,
          objectId: this.id,
          method: 'DELETE',
          useMasterKey: options.useMasterKey
        });
        return request.then(function() {
          if (options.wait) {
            triggerDestroy();
          }
          return model;
        })._thenRunCallbacks(options, this);
      }
docs: Destroy this model on the server if it was already persisted.
  Optimistically removes the model from its collection, if it has one.
  If `wait: true` is passed, waits for the server to respond
  before removal.
  
  @param {Object} options A Backbone-style callback object.
  Valid options are:<ul>
  <li>wait: Set to true to wait for the server to confirm successful
  deletion of the object before triggering the `destroy` event.
  <li>success: A Backbone-style success callback
  <li>error: An Backbone-style error callback.
  <li>useMasterKey: In Cloud Code and Node only, causes the Master Key to
  be used for this request.
  </ul>
  @return {Parse.Promise} A promise that is fulfilled when the destroy
  completes.