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.
-
#base_currency_code ⇒ String
Base Currency of the group.
-
#dependencies ⇒ Object
Statuses for the dependencies of this api.
-
#email_address ⇒ String
If authentication is successful, contains the email address of the logged-in user.
-
#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.
-
#is_impersonated ⇒ Boolean
True if the user is being impersonated by the Lockstep support team.
-
#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.
-
#magic_link ⇒ MagicLinkStatusModel
Magic link information about the user.
-
#magic_link_company_id ⇒ Uuid
The id of the target company for the Magic Link.
-
#magic_link_id ⇒ Uuid
The id of the Magic link used to authenticate.
-
#onboarding_scheduled ⇒ Boolean
If authentication is successful, contains the onboarding session status of the logged-in user’s group account.
-
#roles ⇒ String
The set of roles for this user.
-
#support_access ⇒ SupportAccessModel
Information allowing Lockstep to offer direct support to the user.
-
#user_groups ⇒ UserGroupModel
The set of Groups that the user has access to.
-
#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
25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 |
# File 'lib/lockstep_sdk/models/status_model.rb', line 25 def initialize(params = {}) @user_name = params.dig(:user_name) @email_address = params.dig(:email_address) @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) @onboarding_scheduled = params.dig(:onboarding_scheduled) @magic_link_id = params.dig(:magic_link_id) @magic_link_company_id = params.dig(:magic_link_company_id) @magic_link = params.dig(:magic_link) @support_access = params.dig(:support_access) @is_impersonated = params.dig(:is_impersonated) @dependencies = params.dig(:dependencies) @user_groups = params.dig(:user_groups) @base_currency_code = params.dig(:base_currency_code) end |
Instance Attribute Details
#account_company_id ⇒ Uuid
Returns If authentication is successful, contains subscription account company id of logged-in user.
65 66 67 |
# File 'lib/lockstep_sdk/models/status_model.rb', line 65 def account_company_id @account_company_id end |
#account_name ⇒ String
Returns If authentication is successful, contains subscription account name of logged-in user.
61 62 63 |
# File 'lib/lockstep_sdk/models/status_model.rb', line 61 def account_name @account_name end |
#api_key_id ⇒ Uuid
Returns The id of the API key used to authenticate.
93 94 95 |
# File 'lib/lockstep_sdk/models/status_model.rb', line 93 def api_key_id @api_key_id end |
#base_currency_code ⇒ String
Returns Base Currency of the group.
141 142 143 |
# File 'lib/lockstep_sdk/models/status_model.rb', line 141 def base_currency_code @base_currency_code end |
#dependencies ⇒ Object
Returns Statuses for the dependencies of this api. OK if the dependency is working.
133 134 135 |
# File 'lib/lockstep_sdk/models/status_model.rb', line 133 def dependencies @dependencies end |
#email_address ⇒ String
Returns If authentication is successful, contains the email address of the logged-in user.
57 58 59 |
# File 'lib/lockstep_sdk/models/status_model.rb', line 57 def email_address @email_address end |
#environment ⇒ String
Returns The environment currently being used.
101 102 103 |
# File 'lib/lockstep_sdk/models/status_model.rb', line 101 def environment @environment end |
#error_message ⇒ String
Returns The error message.
81 82 83 |
# File 'lib/lockstep_sdk/models/status_model.rb', line 81 def @error_message end |
#group_key ⇒ Uuid
Returns If authentication is successful, contains the group key of the logged-in user.
73 74 75 |
# File 'lib/lockstep_sdk/models/status_model.rb', line 73 def group_key @group_key end |
#is_impersonated ⇒ Boolean
Returns True if the user is being impersonated by the Lockstep support team.
129 130 131 |
# File 'lib/lockstep_sdk/models/status_model.rb', line 129 def is_impersonated @is_impersonated end |
#last_logged_in ⇒ Date-time
Returns Date and time user has last logged into Azure B2C.
89 90 91 |
# File 'lib/lockstep_sdk/models/status_model.rb', line 89 def last_logged_in @last_logged_in end |
#logged_in ⇒ Boolean
Returns true if authentication for this API was successful.
77 78 79 |
# File 'lib/lockstep_sdk/models/status_model.rb', line 77 def logged_in @logged_in end |
#magic_link ⇒ MagicLinkStatusModel
Returns Magic link information about the user.
121 122 123 |
# File 'lib/lockstep_sdk/models/status_model.rb', line 121 def magic_link @magic_link end |
#magic_link_company_id ⇒ Uuid
Returns The id of the target company for the Magic Link.
117 118 119 |
# File 'lib/lockstep_sdk/models/status_model.rb', line 117 def magic_link_company_id @magic_link_company_id end |
#magic_link_id ⇒ Uuid
Returns The id of the Magic link used to authenticate.
113 114 115 |
# File 'lib/lockstep_sdk/models/status_model.rb', line 113 def magic_link_id @magic_link_id end |
#onboarding_scheduled ⇒ Boolean
Returns If authentication is successful, contains the onboarding session status of the logged-in user’s group account.
109 110 111 |
# File 'lib/lockstep_sdk/models/status_model.rb', line 109 def onboarding_scheduled @onboarding_scheduled end |
#roles ⇒ String
Returns The set of roles for this user.
85 86 87 |
# File 'lib/lockstep_sdk/models/status_model.rb', line 85 def roles @roles end |
#support_access ⇒ SupportAccessModel
Returns Information allowing Lockstep to offer direct support to the user.
125 126 127 |
# File 'lib/lockstep_sdk/models/status_model.rb', line 125 def support_access @support_access end |
#user_groups ⇒ UserGroupModel
Returns The set of Groups that the user has access to. You can use the /api/v1/useraccounts/change-group endpoint to change your active group.
137 138 139 |
# File 'lib/lockstep_sdk/models/status_model.rb', line 137 def user_groups @user_groups end |
#user_id ⇒ Uuid
Returns If authentication is successful, contains the unique identifier of the logged-in user.
69 70 71 |
# File 'lib/lockstep_sdk/models/status_model.rb', line 69 def user_id @user_id end |
#user_name ⇒ String
Returns If authentication is successful, contains the username of the logged-in user.
53 54 55 |
# File 'lib/lockstep_sdk/models/status_model.rb', line 53 def user_name @user_name end |
#user_status ⇒ String
Returns If authentication is successful, contains the user status of the logged-in user.
97 98 99 |
# File 'lib/lockstep_sdk/models/status_model.rb', line 97 def user_status @user_status end |
#version ⇒ String
Returns The version currently being used.
105 106 107 |
# File 'lib/lockstep_sdk/models/status_model.rb', line 105 def version @version end |
Instance Method Details
#as_json(options = {}) ⇒ object
Returns This object as a JSON key-value structure.
145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 |
# File 'lib/lockstep_sdk/models/status_model.rb', line 145 def as_json(={}) { 'userName' => @user_name, 'emailAddress' => @email_address, '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, 'onboardingScheduled' => @onboarding_scheduled, 'magicLinkId' => @magic_link_id, 'magicLinkCompanyId' => @magic_link_company_id, 'magicLink' => @magic_link, 'supportAccess' => @support_access, 'isImpersonated' => @is_impersonated, 'dependencies' => @dependencies, 'userGroups' => @user_groups, 'baseCurrencyCode' => @base_currency_code, } end |
#to_json(*options) ⇒ String
Returns This object converted to a JSON string.
175 176 177 |
# File 'lib/lockstep_sdk/models/status_model.rb', line 175 def to_json(*) "[#{as_json(*).to_json(*)}]" end |