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-2.0.4 app/models/mno_enterprise/deletion_request.rb
mno-enterprise-core-3.1.0 app/models/mno_enterprise/deletion_request.rb
mno-enterprise-core-3.0.3 app/models/mno_enterprise/deletion_request.rb
mno-enterprise-core-2.0.3 app/models/mno_enterprise/deletion_request.rb
mno-enterprise-core-3.0.2 app/models/mno_enterprise/deletion_request.rb
mno-enterprise-core-2.0.2 app/models/mno_enterprise/deletion_request.rb
mno-enterprise-core-3.0.1 app/models/mno_enterprise/deletion_request.rb
mno-enterprise-core-2.0.1 app/models/mno_enterprise/deletion_request.rb
mno-enterprise-core-3.0.0 app/models/mno_enterprise/deletion_request.rb
mno-enterprise-core-2.0.0 app/models/mno_enterprise/deletion_request.rb