class SDM::User

A User can connect to resources they are granted directly, or granted via roles.

Attributes

email[RW]

The User's email address. Must be unique.

first_name[RW]

The User's first name.

id[RW]

Unique identifier of the User.

last_name[RW]

The User's last name.

suspended[RW]

The User's suspended state.

tags[RW]

Tags is a map of key, value pairs.

Public Class Methods

new( id: nil, email: nil, first_name: nil, last_name: nil, suspended: nil, tags: nil ) click to toggle source
# File lib/models/porcelain.rb, line 572
def initialize(
  id: nil,
  email: nil,
  first_name: nil,
  last_name: nil,
  suspended: nil,
  tags: nil
)
  if id != nil
    @id = id
  end
  if email != nil
    @email = email
  end
  if first_name != nil
    @first_name = first_name
  end
  if last_name != nil
    @last_name = last_name
  end
  if suspended != nil
    @suspended = suspended
  end
  if tags != nil
    @tags = tags
  end
end

Public Instance Methods

to_json(options = {}) click to toggle source
# File lib/models/porcelain.rb, line 600
def to_json(options = {})
  hash = {}
  self.instance_variables.each do |var|
    hash[var.id2name.delete_prefix("@")] = self.instance_variable_get var
  end
  hash.to_json
end