Class: Nextcloud::Models::User

Inherits:
Object
  • Object
show all
Defined in:
lib/nextcloud/models/user.rb

Overview

User model

Class Attribute Summary collapse

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(enabled: nil, id: nil, quota: nil, email: nil, displayname: nil, phone: nil, address: nil, website: nil, twitter: nil, groups: nil, language: nil) ⇒ User

Initiates a model instance

Parameters:

  • (Hash)


33
34
35
36
37
38
39
40
# File 'lib/nextcloud/models/user.rb', line 33

def initialize(enabled: nil, id: nil, quota: nil, email: nil, displayname: nil, phone: nil, address: nil,
  website: nil,
  twitter: nil, groups: nil, language: nil)

  self.class.params.each do |v|
    instance_variable_set("@#{v}", instance_eval(v.to_s)) if instance_eval(v.to_s)
  end
end

Class Attribute Details

.paramsObject (readonly)

Returns the value of attribute params.



46
47
48
# File 'lib/nextcloud/models/user.rb', line 46

def params
  @params
end

Instance Attribute Details

#addressString

Returns User address.

Returns:

  • (String)

    User address



27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
# File 'lib/nextcloud/models/user.rb', line 27

class User
  attr_accessor :meta

  # Initiates a model instance
  #
  # @param [Hash]
  def initialize(enabled: nil, id: nil, quota: nil, email: nil, displayname: nil, phone: nil, address: nil,
    website: nil,
    twitter: nil, groups: nil, language: nil)

    self.class.params.each do |v|
      instance_variable_set("@#{v}", instance_eval(v.to_s)) if instance_eval(v.to_s)
    end
  end

  @params = instance_method(:initialize).parameters.map(&:last)
  @params.each { |p| instance_eval("attr_accessor :#{p}") }

  class << self
    attr_reader :params
  end
end

#displaynameString

Returns User display name.

Returns:

  • (String)

    User display name



27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
# File 'lib/nextcloud/models/user.rb', line 27

class User
  attr_accessor :meta

  # Initiates a model instance
  #
  # @param [Hash]
  def initialize(enabled: nil, id: nil, quota: nil, email: nil, displayname: nil, phone: nil, address: nil,
    website: nil,
    twitter: nil, groups: nil, language: nil)

    self.class.params.each do |v|
      instance_variable_set("@#{v}", instance_eval(v.to_s)) if instance_eval(v.to_s)
    end
  end

  @params = instance_method(:initialize).parameters.map(&:last)
  @params.each { |p| instance_eval("attr_accessor :#{p}") }

  class << self
    attr_reader :params
  end
end

#emailString

Returns E-mail address.

Returns:

  • (String)

    E-mail address



27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
# File 'lib/nextcloud/models/user.rb', line 27

class User
  attr_accessor :meta

  # Initiates a model instance
  #
  # @param [Hash]
  def initialize(enabled: nil, id: nil, quota: nil, email: nil, displayname: nil, phone: nil, address: nil,
    website: nil,
    twitter: nil, groups: nil, language: nil)

    self.class.params.each do |v|
      instance_variable_set("@#{v}", instance_eval(v.to_s)) if instance_eval(v.to_s)
    end
  end

  @params = instance_method(:initialize).parameters.map(&:last)
  @params.each { |p| instance_eval("attr_accessor :#{p}") }

  class << self
    attr_reader :params
  end
end

#enabledString

Returns Is an user enabled or not.

Returns:

  • (String)

    Is an user enabled or not



27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
# File 'lib/nextcloud/models/user.rb', line 27

class User
  attr_accessor :meta

  # Initiates a model instance
  #
  # @param [Hash]
  def initialize(enabled: nil, id: nil, quota: nil, email: nil, displayname: nil, phone: nil, address: nil,
    website: nil,
    twitter: nil, groups: nil, language: nil)

    self.class.params.each do |v|
      instance_variable_set("@#{v}", instance_eval(v.to_s)) if instance_eval(v.to_s)
    end
  end

  @params = instance_method(:initialize).parameters.map(&:last)
  @params.each { |p| instance_eval("attr_accessor :#{p}") }

  class << self
    attr_reader :params
  end
end

#groupsString

Returns Groups user belongs to.

Returns:

  • (String)

    Groups user belongs to



27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
# File 'lib/nextcloud/models/user.rb', line 27

class User
  attr_accessor :meta

  # Initiates a model instance
  #
  # @param [Hash]
  def initialize(enabled: nil, id: nil, quota: nil, email: nil, displayname: nil, phone: nil, address: nil,
    website: nil,
    twitter: nil, groups: nil, language: nil)

    self.class.params.each do |v|
      instance_variable_set("@#{v}", instance_eval(v.to_s)) if instance_eval(v.to_s)
    end
  end

  @params = instance_method(:initialize).parameters.map(&:last)
  @params.each { |p| instance_eval("attr_accessor :#{p}") }

  class << self
    attr_reader :params
  end
end

#idString

Returns Identifier of an user.

Returns:

  • (String)

    Identifier of an user



27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
# File 'lib/nextcloud/models/user.rb', line 27

class User
  attr_accessor :meta

  # Initiates a model instance
  #
  # @param [Hash]
  def initialize(enabled: nil, id: nil, quota: nil, email: nil, displayname: nil, phone: nil, address: nil,
    website: nil,
    twitter: nil, groups: nil, language: nil)

    self.class.params.each do |v|
      instance_variable_set("@#{v}", instance_eval(v.to_s)) if instance_eval(v.to_s)
    end
  end

  @params = instance_method(:initialize).parameters.map(&:last)
  @params.each { |p| instance_eval("attr_accessor :#{p}") }

  class << self
    attr_reader :params
  end
end

#languageString

Returns Nextcloud version for an user.

Returns:

  • (String)

    Nextcloud version for an user



27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
# File 'lib/nextcloud/models/user.rb', line 27

class User
  attr_accessor :meta

  # Initiates a model instance
  #
  # @param [Hash]
  def initialize(enabled: nil, id: nil, quota: nil, email: nil, displayname: nil, phone: nil, address: nil,
    website: nil,
    twitter: nil, groups: nil, language: nil)

    self.class.params.each do |v|
      instance_variable_set("@#{v}", instance_eval(v.to_s)) if instance_eval(v.to_s)
    end
  end

  @params = instance_method(:initialize).parameters.map(&:last)
  @params.each { |p| instance_eval("attr_accessor :#{p}") }

  class << self
    attr_reader :params
  end
end

#metaObject

Returns the value of attribute meta.



28
29
30
# File 'lib/nextcloud/models/user.rb', line 28

def meta
  @meta
end

#phoneString

Returns User phone number.

Returns:

  • (String)

    User phone number



27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
# File 'lib/nextcloud/models/user.rb', line 27

class User
  attr_accessor :meta

  # Initiates a model instance
  #
  # @param [Hash]
  def initialize(enabled: nil, id: nil, quota: nil, email: nil, displayname: nil, phone: nil, address: nil,
    website: nil,
    twitter: nil, groups: nil, language: nil)

    self.class.params.each do |v|
      instance_variable_set("@#{v}", instance_eval(v.to_s)) if instance_eval(v.to_s)
    end
  end

  @params = instance_method(:initialize).parameters.map(&:last)
  @params.each { |p| instance_eval("attr_accessor :#{p}") }

  class << self
    attr_reader :params
  end
end

#quotaHash

Returns Quota of user.

Returns:

  • (Hash)

    Quota of user



27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
# File 'lib/nextcloud/models/user.rb', line 27

class User
  attr_accessor :meta

  # Initiates a model instance
  #
  # @param [Hash]
  def initialize(enabled: nil, id: nil, quota: nil, email: nil, displayname: nil, phone: nil, address: nil,
    website: nil,
    twitter: nil, groups: nil, language: nil)

    self.class.params.each do |v|
      instance_variable_set("@#{v}", instance_eval(v.to_s)) if instance_eval(v.to_s)
    end
  end

  @params = instance_method(:initialize).parameters.map(&:last)
  @params.each { |p| instance_eval("attr_accessor :#{p}") }

  class << self
    attr_reader :params
  end
end

#twitterString

Returns User Twitter account.

Returns:

  • (String)

    User Twitter account



27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
# File 'lib/nextcloud/models/user.rb', line 27

class User
  attr_accessor :meta

  # Initiates a model instance
  #
  # @param [Hash]
  def initialize(enabled: nil, id: nil, quota: nil, email: nil, displayname: nil, phone: nil, address: nil,
    website: nil,
    twitter: nil, groups: nil, language: nil)

    self.class.params.each do |v|
      instance_variable_set("@#{v}", instance_eval(v.to_s)) if instance_eval(v.to_s)
    end
  end

  @params = instance_method(:initialize).parameters.map(&:last)
  @params.each { |p| instance_eval("attr_accessor :#{p}") }

  class << self
    attr_reader :params
  end
end

#websiteString

Returns User web-site address.

Returns:

  • (String)

    User web-site address



27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
# File 'lib/nextcloud/models/user.rb', line 27

class User
  attr_accessor :meta

  # Initiates a model instance
  #
  # @param [Hash]
  def initialize(enabled: nil, id: nil, quota: nil, email: nil, displayname: nil, phone: nil, address: nil,
    website: nil,
    twitter: nil, groups: nil, language: nil)

    self.class.params.each do |v|
      instance_variable_set("@#{v}", instance_eval(v.to_s)) if instance_eval(v.to_s)
    end
  end

  @params = instance_method(:initialize).parameters.map(&:last)
  @params.each { |p| instance_eval("attr_accessor :#{p}") }

  class << self
    attr_reader :params
  end
end