Class: LockstepSdk::StatusModel
- Inherits:
-
Object
- Object
- LockstepSdk::StatusModel
- Defined in:
- lib/lockstep_sdk/models/status_model.rb
Overview
Represents the status of a user's credentials
Instance Attribute Summary collapse
-
#account_company_id ⇒ Uuid
If authentication is successful, contains subscription account company id of logged-in user.
-
#account_name ⇒ String
If authentication is successful, contains subscription account name of logged-in user.
-
#api_key_id ⇒ Uuid
The id of the API key used to authenticate.
-
#dependencies ⇒ Object
Statuses for the dependencies of this api.
-
#environment ⇒ String
The environment currently being used.
-
#error_message ⇒ String
The error message.
-
#group_key ⇒ Uuid
If authentication is successful, contains the group key of the logged-in user.
-
#last_logged_in ⇒ Date-time
Date and time user has last logged into Azure B2C.
-
#logged_in ⇒ Boolean
Returns true if authentication for this API was successful.
-
#roles ⇒ String
The set of roles for this user.
-
#user_id ⇒ Uuid
If authentication is successful, contains the unique identifier of the logged-in user.
-
#user_name ⇒ String
If authentication is successful, contains the username of the logged-in user.
-
#user_status ⇒ String
If authentication is successful, contains the user status of the logged-in user.
-
#version ⇒ String
The version currently being used.
Instance Method Summary collapse
-
#as_json(options = {}) ⇒ object
This object as a JSON key-value structure.
-
#initialize(params = {}) ⇒ StatusModel
constructor
Initialize the StatusModel using the provided prototype.
-
#to_json(*options) ⇒ String
This object converted to a JSON string.
Constructor Details
#initialize(params = {}) ⇒ StatusModel
Initialize the StatusModel using the provided prototype
28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 |
# File 'lib/lockstep_sdk/models/status_model.rb', line 28 def initialize(params = {}) @user_name = params.dig(:user_name) @account_name = params.dig(:account_name) @account_company_id = params.dig(:account_company_id) @user_id = params.dig(:user_id) @group_key = params.dig(:group_key) @logged_in = params.dig(:logged_in) @error_message = params.dig(:error_message) @roles = params.dig(:roles) @last_logged_in = params.dig(:last_logged_in) @api_key_id = params.dig(:api_key_id) @user_status = params.dig(:user_status) @environment = params.dig(:environment) @version = params.dig(:version) @dependencies = params.dig(:dependencies) end |
Instance Attribute Details
#account_company_id ⇒ Uuid
Returns If authentication is successful, contains subscription account company id of logged-in user.
55 56 57 |
# File 'lib/lockstep_sdk/models/status_model.rb', line 55 def account_company_id @account_company_id end |
#account_name ⇒ String
Returns If authentication is successful, contains subscription account name of logged-in user.
51 52 53 |
# File 'lib/lockstep_sdk/models/status_model.rb', line 51 def account_name @account_name end |
#api_key_id ⇒ Uuid
Returns The id of the API key used to authenticate.
83 84 85 |
# File 'lib/lockstep_sdk/models/status_model.rb', line 83 def api_key_id @api_key_id end |
#dependencies ⇒ Object
Returns Statuses for the dependencies of this api. OK if the dependency is working.
99 100 101 |
# File 'lib/lockstep_sdk/models/status_model.rb', line 99 def dependencies @dependencies end |
#environment ⇒ String
Returns The environment currently being used.
91 92 93 |
# File 'lib/lockstep_sdk/models/status_model.rb', line 91 def environment @environment end |
#error_message ⇒ String
Returns The error message.
71 72 73 |
# File 'lib/lockstep_sdk/models/status_model.rb', line 71 def @error_message end |
#group_key ⇒ Uuid
Returns If authentication is successful, contains the group key of the logged-in user.
63 64 65 |
# File 'lib/lockstep_sdk/models/status_model.rb', line 63 def group_key @group_key end |
#last_logged_in ⇒ Date-time
Returns Date and time user has last logged into Azure B2C.
79 80 81 |
# File 'lib/lockstep_sdk/models/status_model.rb', line 79 def last_logged_in @last_logged_in end |
#logged_in ⇒ Boolean
Returns true if authentication for this API was successful.
67 68 69 |
# File 'lib/lockstep_sdk/models/status_model.rb', line 67 def logged_in @logged_in end |
#roles ⇒ String
Returns The set of roles for this user.
75 76 77 |
# File 'lib/lockstep_sdk/models/status_model.rb', line 75 def roles @roles end |
#user_id ⇒ Uuid
Returns If authentication is successful, contains the unique identifier of the logged-in user.
59 60 61 |
# File 'lib/lockstep_sdk/models/status_model.rb', line 59 def user_id @user_id end |
#user_name ⇒ String
Returns If authentication is successful, contains the username of the logged-in user.
47 48 49 |
# File 'lib/lockstep_sdk/models/status_model.rb', line 47 def user_name @user_name end |
#user_status ⇒ String
Returns If authentication is successful, contains the user status of the logged-in user.
87 88 89 |
# File 'lib/lockstep_sdk/models/status_model.rb', line 87 def user_status @user_status end |
#version ⇒ String
Returns The version currently being used.
95 96 97 |
# File 'lib/lockstep_sdk/models/status_model.rb', line 95 def version @version end |
Instance Method Details
#as_json(options = {}) ⇒ object
Returns This object as a JSON key-value structure.
103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 |
# File 'lib/lockstep_sdk/models/status_model.rb', line 103 def as_json(={}) { 'userName' => @user_name, 'accountName' => @account_name, 'accountCompanyId' => @account_company_id, 'userId' => @user_id, 'groupKey' => @group_key, 'loggedIn' => @logged_in, 'errorMessage' => @error_message, 'roles' => @roles, 'lastLoggedIn' => @last_logged_in, 'apiKeyId' => @api_key_id, 'userStatus' => @user_status, 'environment' => @environment, 'version' => @version, 'dependencies' => @dependencies, } end |
#to_json(*options) ⇒ String
Returns This object converted to a JSON string.
124 125 126 |
# File 'lib/lockstep_sdk/models/status_model.rb', line 124 def to_json(*) "[#{as_json(*).to_json(*)}]" end |