def serializable_hash(*)
      h               = attributes.extract!('included')
      h['data']       = { 'type'       => self.class.to_s.underscore.sub('esp/', '').pluralize,
                          'attributes' => changed_attributes.except('id', 'type', 'created_at', 'updated_at', 'relationships') }
      h['data']['id'] = id if id.present?
      h
    end
def serializable_hash(*)
      h               = attributes.extract!('included')
      h['data']       = { 'type'       => self.class.to_s.underscore.sub('esp/', '').pluralize,
                          'attributes' => changed_attributes.except('id', 'type', 'created_at', 'updated_at', 'relationships') }
      h['data']['id'] = id if id.present?
      h
    end
Pass a json api compliant hash to the api.