Sha256: 8b5ba0a0f8581f0ba9649bde29b76e8cf60b3619ef18a65c07da592a33b2308e

Contents?: true

Size: 958 Bytes

Versions: 30

Compression:

Stored size: 958 Bytes

Contents

# == Schema Information
#
# Table name: deletion_requests
#
#  id             :integer         not null, primary key
#  token          :string(255)
#  status         :string(255)
#  created_at     :datetime        not null
#  updated_at     :datetime        not null
#

module MnoEnterprise
  class DeletionRequest < BaseResource
    attributes :id, :token, :status, :user_id

    #==============================================================
    # Associations
    #==============================================================
    belongs_to :user, class_name: 'MnoEnterprise::User'

    #============================================
    # Instance methods
    #============================================
    # We want to use the token instead of the id
    def to_param
      self.token
    end

    # TODO: specs
    # Freeze user acocunt and update the deletion request
    def freeze_account!
      self.put(operation: 'freeze')
    end
  end
end

Version data entries

30 entries across 30 versions & 1 rubygems

Version Path
mno-enterprise-core-3.4.0 app/models/mno_enterprise/deletion_request.rb
mno-enterprise-core-3.3.3 app/models/mno_enterprise/deletion_request.rb
mno-enterprise-core-3.3.2 app/models/mno_enterprise/deletion_request.rb
mno-enterprise-core-3.2.1 app/models/mno_enterprise/deletion_request.rb
mno-enterprise-core-3.3.1 app/models/mno_enterprise/deletion_request.rb
mno-enterprise-core-3.3.0 app/models/mno_enterprise/deletion_request.rb
mno-enterprise-core-3.2.0 app/models/mno_enterprise/deletion_request.rb
mno-enterprise-core-3.1.4 app/models/mno_enterprise/deletion_request.rb
mno-enterprise-core-3.0.7 app/models/mno_enterprise/deletion_request.rb
mno-enterprise-core-2.0.9 app/models/mno_enterprise/deletion_request.rb
mno-enterprise-core-3.1.3 app/models/mno_enterprise/deletion_request.rb
mno-enterprise-core-3.0.6 app/models/mno_enterprise/deletion_request.rb
mno-enterprise-core-2.0.8 app/models/mno_enterprise/deletion_request.rb
mno-enterprise-core-3.1.2 app/models/mno_enterprise/deletion_request.rb
mno-enterprise-core-3.0.5 app/models/mno_enterprise/deletion_request.rb
mno-enterprise-core-2.0.7 app/models/mno_enterprise/deletion_request.rb
mno-enterprise-core-2.0.6 app/models/mno_enterprise/deletion_request.rb
mno-enterprise-core-2.0.5 app/models/mno_enterprise/deletion_request.rb
mno-enterprise-core-3.1.1 app/models/mno_enterprise/deletion_request.rb
mno-enterprise-core-3.0.4 app/models/mno_enterprise/deletion_request.rb