Class: AbsorbApi::User

Inherits:
Record
  • Object
show all
Defined in:
lib/absorb_api/user.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Methods inherited from Record

all, can_create, can_search, find, #initialize, with_relationships

Constructor Details

This class inherits a constructor from AbsorbApi::Record

Instance Attribute Details

#active_statusObject

Returns the value of attribute active_status.



9
10
11
# File 'lib/absorb_api/user.rb', line 9

def active_status
  @active_status
end

#addressObject

Returns the value of attribute address.



9
10
11
# File 'lib/absorb_api/user.rb', line 9

def address
  @address
end

#address2Object

Returns the value of attribute address2.



9
10
11
# File 'lib/absorb_api/user.rb', line 9

def address2
  @address2
end

#cc_email_addressesObject

Returns the value of attribute cc_email_addresses.



9
10
11
# File 'lib/absorb_api/user.rb', line 9

def cc_email_addresses
  @cc_email_addresses
end

#cityObject

Returns the value of attribute city.



9
10
11
# File 'lib/absorb_api/user.rb', line 9

def city
  @city
end

#country_idObject

Returns the value of attribute country_id.



9
10
11
# File 'lib/absorb_api/user.rb', line 9

def country_id
  @country_id
end

#custom_fieldsObject

Returns the value of attribute custom_fields.



9
10
11
# File 'lib/absorb_api/user.rb', line 9

def custom_fields
  @custom_fields
end

#date_hiredObject

Returns the value of attribute date_hired.



9
10
11
# File 'lib/absorb_api/user.rb', line 9

def date_hired
  @date_hired
end

#date_terminatedObject

Returns the value of attribute date_terminated.



9
10
11
# File 'lib/absorb_api/user.rb', line 9

def date_terminated
  @date_terminated
end

#decimal1Object

Returns the value of attribute decimal1.



9
10
11
# File 'lib/absorb_api/user.rb', line 9

def decimal1
  @decimal1
end

#decimal2Object

Returns the value of attribute decimal2.



9
10
11
# File 'lib/absorb_api/user.rb', line 9

def decimal2
  @decimal2
end

#decimal3Object

Returns the value of attribute decimal3.



9
10
11
# File 'lib/absorb_api/user.rb', line 9

def decimal3
  @decimal3
end

#department_idObject

Returns the value of attribute department_id.



9
10
11
# File 'lib/absorb_api/user.rb', line 9

def department_id
  @department_id
end

#email_addressObject

Returns the value of attribute email_address.



9
10
11
# File 'lib/absorb_api/user.rb', line 9

def email_address
  @email_address
end

#employee_numberObject

Returns the value of attribute employee_number.



9
10
11
# File 'lib/absorb_api/user.rb', line 9

def employee_number
  @employee_number
end

#external_idObject

Returns the value of attribute external_id.



9
10
11
# File 'lib/absorb_api/user.rb', line 9

def external_id
  @external_id
end

#first_nameObject

Returns the value of attribute first_name.



9
10
11
# File 'lib/absorb_api/user.rb', line 9

def first_name
  @first_name
end

#genderObject

Returns the value of attribute gender.



9
10
11
# File 'lib/absorb_api/user.rb', line 9

def gender
  @gender
end

#idObject

Returns the value of attribute id.



9
10
11
# File 'lib/absorb_api/user.rb', line 9

def id
  @id
end

#is_adminObject

Returns the value of attribute is_admin.



9
10
11
# File 'lib/absorb_api/user.rb', line 9

def is_admin
  @is_admin
end

#is_instructorObject

Returns the value of attribute is_instructor.



9
10
11
# File 'lib/absorb_api/user.rb', line 9

def is_instructor
  @is_instructor
end

#is_learnerObject

Returns the value of attribute is_learner.



9
10
11
# File 'lib/absorb_api/user.rb', line 9

def is_learner
  @is_learner
end

#job_titleObject

Returns the value of attribute job_title.



9
10
11
# File 'lib/absorb_api/user.rb', line 9

def job_title
  @job_title
end

#language_idObject

Returns the value of attribute language_id.



9
10
11
# File 'lib/absorb_api/user.rb', line 9

def language_id
  @language_id
end

#last_nameObject

Returns the value of attribute last_name.



9
10
11
# File 'lib/absorb_api/user.rb', line 9

def last_name
  @last_name
end

#locationObject

Returns the value of attribute location.



9
10
11
# File 'lib/absorb_api/user.rb', line 9

def location
  @location
end

#middle_nameObject

Returns the value of attribute middle_name.



9
10
11
# File 'lib/absorb_api/user.rb', line 9

def middle_name
  @middle_name
end

#notesObject

Returns the value of attribute notes.



9
10
11
# File 'lib/absorb_api/user.rb', line 9

def notes
  @notes
end

#passwordObject

Returns the value of attribute password.



9
10
11
# File 'lib/absorb_api/user.rb', line 9

def password
  @password
end

#phoneObject

Returns the value of attribute phone.



9
10
11
# File 'lib/absorb_api/user.rb', line 9

def phone
  @phone
end

#postal_codeObject

Returns the value of attribute postal_code.



9
10
11
# File 'lib/absorb_api/user.rb', line 9

def postal_code
  @postal_code
end

#province_idObject

Returns the value of attribute province_id.



9
10
11
# File 'lib/absorb_api/user.rb', line 9

def province_id
  @province_id
end

#reference_numberObject

Returns the value of attribute reference_number.



9
10
11
# File 'lib/absorb_api/user.rb', line 9

def reference_number
  @reference_number
end

#role_idsObject

Returns the value of attribute role_ids.



9
10
11
# File 'lib/absorb_api/user.rb', line 9

def role_ids
  @role_ids
end

#string1Object

Returns the value of attribute string1.



9
10
11
# File 'lib/absorb_api/user.rb', line 9

def string1
  @string1
end

#string2Object

Returns the value of attribute string2.



9
10
11
# File 'lib/absorb_api/user.rb', line 9

def string2
  @string2
end

#supervisor_idObject

Returns the value of attribute supervisor_id.



9
10
11
# File 'lib/absorb_api/user.rb', line 9

def supervisor_id
  @supervisor_id
end

#usernameObject

Returns the value of attribute username.



9
10
11
# File 'lib/absorb_api/user.rb', line 9

def username
  @username
end

Instance Method Details

#update(attrs) ⇒ Object



24
25
26
27
28
29
30
31
# File 'lib/absorb_api/user.rb', line 24

def update(attrs)
  attrs = attrs.with_indifferent_access.transform_keys(&:camelize)
  attrs["Username"] = username

  put("users/#{id}", attrs)

  self
end