Class: Meibo::UserProfile
- Inherits:
-
Object
- Object
- Meibo::UserProfile
- Defined in:
- lib/meibo/user_profile.rb
Direct Known Subclasses
Instance Method Summary collapse
- #collection ⇒ Object
-
#initialize(sourced_id:, user_sourced_id:, profile_type:, vendor_id:, credential_type:, username:, status: nil, date_last_modified: nil, application_id: nil, description: nil, password: nil, **extension_fields) ⇒ UserProfile
constructor
A new instance of UserProfile.
- #role ⇒ Object
- #user ⇒ Object
Constructor Details
#initialize(sourced_id:, user_sourced_id:, profile_type:, vendor_id:, credential_type:, username:, status: nil, date_last_modified: nil, application_id: nil, description: nil, password: nil, **extension_fields) ⇒ UserProfile
Returns a new instance of UserProfile.
27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 |
# File 'lib/meibo/user_profile.rb', line 27 def initialize(sourced_id:, user_sourced_id:, profile_type:, vendor_id:, credential_type:, username:, status: nil, date_last_modified: nil, application_id: nil, description: nil, password: nil, **extension_fields) @sourced_id = sourced_id @status = status @date_last_modified = date_last_modified @user_sourced_id = user_sourced_id @profile_type = profile_type @vendor_id = vendor_id @application_id = application_id @description = description @credential_type = credential_type @username = username @password = password @extension_fields = extension_fields end |
Instance Method Details
#collection ⇒ Object
43 44 45 |
# File 'lib/meibo/user_profile.rb', line 43 def collection Meibo.current_roster.user_profiles end |
#role ⇒ Object
51 52 53 |
# File 'lib/meibo/user_profile.rb', line 51 def role Meibo.current_roster.roles.where(user_profile_sourced_id: sourced_id).first end |
#user ⇒ Object
47 48 49 |
# File 'lib/meibo/user_profile.rb', line 47 def user Meibo.current_roster.users.find(user_sourced_id) end |