Class: LockstepSdk::UserGroupModel
- Inherits:
-
Object
- Object
- LockstepSdk::UserGroupModel
- Defined in:
- lib/lockstep_sdk/models/user_group_model.rb
Overview
A UserGroup represents the groups that the user is a member of. A user may have varying permissions/access within a Group.
Instance Attribute Summary collapse
-
#group_key ⇒ Uuid
The GroupKey uniquely identifies a single Lockstep Platform account.
-
#group_name ⇒ String
The name of the group.
-
#status ⇒ String
The user's status in the group.
-
#user_role ⇒ String
The name of the Permission Level for the group.
Instance Method Summary collapse
-
#as_json(options = {}) ⇒ object
This object as a JSON key-value structure.
-
#initialize(params = {}) ⇒ UserGroupModel
constructor
Initialize the UserGroupModel using the provided prototype.
-
#to_json(*options) ⇒ String
This object converted to a JSON string.
Constructor Details
#initialize(params = {}) ⇒ UserGroupModel
Initialize the UserGroupModel using the provided prototype
26 27 28 29 30 31 |
# File 'lib/lockstep_sdk/models/user_group_model.rb', line 26 def initialize(params = {}) @group_key = params.dig(:group_key) @user_role = params.dig(:user_role) @group_name = params.dig(:group_name) @status = params.dig(:status) end |
Instance Attribute Details
#group_key ⇒ Uuid
Returns The GroupKey uniquely identifies a single Lockstep Platform account. All records for this account will share the same GroupKey value. GroupKey values cannot be changed once created. For more information, see Accounts and GroupKeys.
35 36 37 |
# File 'lib/lockstep_sdk/models/user_group_model.rb', line 35 def group_key @group_key end |
#group_name ⇒ String
Returns The name of the group.
43 44 45 |
# File 'lib/lockstep_sdk/models/user_group_model.rb', line 43 def group_name @group_name end |
#status ⇒ String
Returns The user's status in the group.
47 48 49 |
# File 'lib/lockstep_sdk/models/user_group_model.rb', line 47 def status @status end |
#user_role ⇒ String
Returns The name of the Permission Level for the group.
39 40 41 |
# File 'lib/lockstep_sdk/models/user_group_model.rb', line 39 def user_role @user_role end |
Instance Method Details
#as_json(options = {}) ⇒ object
Returns This object as a JSON key-value structure.
51 52 53 54 55 56 57 58 |
# File 'lib/lockstep_sdk/models/user_group_model.rb', line 51 def as_json(={}) { 'groupKey' => @group_key, 'userRole' => @user_role, 'groupName' => @group_name, 'status' => @status, } end |
#to_json(*options) ⇒ String
Returns This object converted to a JSON string.
62 63 64 |
# File 'lib/lockstep_sdk/models/user_group_model.rb', line 62 def to_json(*) "[#{as_json(*).to_json(*)}]" end |