Class: Dox::Api::Auth::User

Inherits:
Object
  • Object
show all
Includes:
ResourceModel
Defined in:
lib/dox/api/auth/user.rb

Instance Method Summary collapse

Methods included from ResourceModel

#attributes, #attributes=, #errors_from_json, #from_json, #href, #initialize, #to_json

Instance Method Details

#emailObject


20
21
22
23
# File 'lib/dox/api/auth/user.rb', line 20

def email
  return nil if emails.nil? || emails.empty?
  emails.first
end

#email=(email) ⇒ Object


12
13
14
15
16
17
18
# File 'lib/dox/api/auth/user.rb', line 12

def email=(email)
  if email.nil? || email.empty?
    self.emails = []
  else
    self.emails = [email]
  end
end

#locationObject


8
9
10
# File 'lib/dox/api/auth/user.rb', line 8

def location
  { href: "/users{/id}" }
end