Class: LockstepSdk::UserRoleModel
- Inherits:
-
Object
- Object
- LockstepSdk::UserRoleModel
- Defined in:
- lib/lockstep_sdk/models/user_role_model.rb
Overview
Represents a role for a user
Instance Attribute Summary collapse
-
#created ⇒ Date-time
The date that the user role was created.
-
#created_user_id ⇒ Uuid
The ID of the user who created the user role.
-
#group_key ⇒ Uuid
The GroupKey uniquely identifies a single Lockstep Platform account.
-
#modified ⇒ Date-time
The date the user role was last modified.
-
#modified_user_id ⇒ Uuid
The ID of the user who last modified the user role.
-
#user_role_id ⇒ Uuid
The unique ID of this record, automatically assigned by Lockstep when this record is added to the Lockstep platform.
-
#user_role_name ⇒ String
The name of the user role.
Instance Method Summary collapse
-
#as_json(options = {}) ⇒ object
This object as a JSON key-value structure.
-
#initialize(params = {}) ⇒ UserRoleModel
constructor
Initialize the UserRoleModel using the provided prototype.
-
#to_json(*options) ⇒ String
This object converted to a JSON string.
Constructor Details
#initialize(params = {}) ⇒ UserRoleModel
Initialize the UserRoleModel using the provided prototype
26 27 28 29 30 31 32 33 34 |
# File 'lib/lockstep_sdk/models/user_role_model.rb', line 26 def initialize(params = {}) @user_role_id = params.dig(:user_role_id) @group_key = params.dig(:group_key) @user_role_name = params.dig(:user_role_name) @created = params.dig(:created) @created_user_id = params.dig(:created_user_id) @modified = params.dig(:modified) @modified_user_id = params.dig(:modified_user_id) end |
Instance Attribute Details
#created ⇒ Date-time
Returns The date that the user role was created.
43 44 45 |
# File 'lib/lockstep_sdk/models/user_role_model.rb', line 43 def created @created end |
#created_user_id ⇒ Uuid
Returns The ID of the user who created the user role.
45 46 47 |
# File 'lib/lockstep_sdk/models/user_role_model.rb', line 45 def created_user_id @created_user_id end |
#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](developer.lockstep.io/docs/accounts-and-groupkeys).
39 40 41 |
# File 'lib/lockstep_sdk/models/user_role_model.rb', line 39 def group_key @group_key end |
#modified ⇒ Date-time
Returns The date the user role was last modified.
47 48 49 |
# File 'lib/lockstep_sdk/models/user_role_model.rb', line 47 def modified @modified end |
#modified_user_id ⇒ Uuid
Returns The ID of the user who last modified the user role.
49 50 51 |
# File 'lib/lockstep_sdk/models/user_role_model.rb', line 49 def modified_user_id @modified_user_id end |
#user_role_id ⇒ Uuid
Returns The unique ID of this record, automatically assigned by Lockstep when this record is added to the Lockstep platform.
37 38 39 |
# File 'lib/lockstep_sdk/models/user_role_model.rb', line 37 def user_role_id @user_role_id end |
#user_role_name ⇒ String
Returns The name of the user role.
41 42 43 |
# File 'lib/lockstep_sdk/models/user_role_model.rb', line 41 def user_role_name @user_role_name end |
Instance Method Details
#as_json(options = {}) ⇒ object
Returns This object as a JSON key-value structure.
52 53 54 55 56 57 58 59 60 61 62 |
# File 'lib/lockstep_sdk/models/user_role_model.rb', line 52 def as_json(={}) { 'userRoleId' => @user_role_id, 'groupKey' => @group_key, 'userRoleName' => @user_role_name, 'created' => @created, 'createdUserId' => @created_user_id, 'modified' => @modified, 'modifiedUserId' => @modified_user_id, } end |
#to_json(*options) ⇒ String
Returns This object converted to a JSON string.
65 66 67 |
# File 'lib/lockstep_sdk/models/user_role_model.rb', line 65 def to_json(*) "[#{as_json(*).to_json(*)}]" end |