class Brivo::User
Attributes
application[RW]
external_id[R]
first_name[R]
id[R]
last_name[R]
suspended[R]
Public Class Methods
create(first_name:, last_name:, external_id: nil, suspended: false)
click to toggle source
# File lib/brivo/user.rb, line 9 def create first_name:, last_name:, external_id: nil, suspended: false application.create_user(first_name, last_name, external_id, suspended) end
new(attributes = {})
click to toggle source
# File lib/brivo/user.rb, line 14 def initialize attributes = {} @id = attributes['id'] @first_name = attributes['firstName'] @last_name = attributes['lastName'] @external_id = attributes['externalId'] @suspended = attributes['suspended'] end
Public Instance Methods
assign_credential(credential_id, effective_from, effective_to)
click to toggle source
# File lib/brivo/user.rb, line 34 def assign_credential credential_id, effective_from, effective_to application.user_assign_credential(id, credential_id, effective_from, effective_to) end
credentials()
click to toggle source
# File lib/brivo/user.rb, line 30 def credentials application.user_credentials(id) end
delete()
click to toggle source
# File lib/brivo/user.rb, line 22 def delete application.delete_user(id) end
groups()
click to toggle source
# File lib/brivo/user.rb, line 26 def groups application.user_groups(id) end
remove_credential(credential_id)
click to toggle source
# File lib/brivo/user.rb, line 38 def remove_credential credential_id application.user_remove_credential(id, credential_id) end
Private Instance Methods
application()
click to toggle source
# File lib/brivo/user.rb, line 44 def application self.class.application end