Class: LockstepSdk::StatusModel

Inherits:
Object
  • Object
show all
Defined in:
lib/lockstep_sdk/models/status_model.rb

Overview

Represents the status of a user’s credentials

Instance Attribute Summary collapse

Instance Method Summary collapse

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
50
# 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)
    @base_currency_code = params.dig(:base_currency_code)
    @country_code = params.dig(:country_code)
    @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)
    @user_groups = params.dig(:user_groups)
    @dependencies = params.dig(:dependencies)
end

Instance Attribute Details

#account_company_idUuid

Returns If authentication is successful, contains subscription account company id of logged-in user.

Returns:

  • (Uuid)

    If authentication is successful, contains subscription account company id of logged-in user.



66
67
68
# File 'lib/lockstep_sdk/models/status_model.rb', line 66

def 
  @account_company_id
end

#account_nameString

Returns If authentication is successful, contains subscription account name of logged-in user.

Returns:

  • (String)

    If authentication is successful, contains subscription account name of logged-in user.



62
63
64
# File 'lib/lockstep_sdk/models/status_model.rb', line 62

def 
  @account_name
end

#api_key_idUuid

Returns The id of the API key used to authenticate.

Returns:

  • (Uuid)

    The id of the API key used to authenticate.



94
95
96
# File 'lib/lockstep_sdk/models/status_model.rb', line 94

def api_key_id
  @api_key_id
end

#base_currency_codeString

Returns Base Currency of the group.

Returns:

  • (String)

    Base Currency of the group



114
115
116
# File 'lib/lockstep_sdk/models/status_model.rb', line 114

def base_currency_code
  @base_currency_code
end

#country_codeString

Returns Country code of the group.

Returns:

  • (String)

    Country code of the group



118
119
120
# File 'lib/lockstep_sdk/models/status_model.rb', line 118

def country_code
  @country_code
end

#dependenciesObject

Returns Statuses for the dependencies of this api. OK if the dependency is working.

Returns:

  • (Object)

    Statuses for the dependencies of this api. OK if the dependency is working.



146
147
148
# File 'lib/lockstep_sdk/models/status_model.rb', line 146

def dependencies
  @dependencies
end

#email_addressString

Returns If authentication is successful, contains the email address of the logged-in user.

Returns:

  • (String)

    If authentication is successful, contains the email address of the logged-in user.



58
59
60
# File 'lib/lockstep_sdk/models/status_model.rb', line 58

def email_address
  @email_address
end

#environmentString

Returns The environment currently being used.

Returns:

  • (String)

    The environment currently being used



102
103
104
# File 'lib/lockstep_sdk/models/status_model.rb', line 102

def environment
  @environment
end

#error_messageString

Returns The error message.

Returns:

  • (String)

    The error message.



82
83
84
# File 'lib/lockstep_sdk/models/status_model.rb', line 82

def error_message
  @error_message
end

#group_keyUuid

Returns If authentication is successful, contains the group key of the logged-in user.

Returns:

  • (Uuid)

    If authentication is successful, contains the group key of the logged-in user.



74
75
76
# File 'lib/lockstep_sdk/models/status_model.rb', line 74

def group_key
  @group_key
end

#is_impersonatedBoolean

Returns True if the user is being impersonated by the Lockstep support team.

Returns:

  • (Boolean)

    True if the user is being impersonated by the Lockstep support team.



138
139
140
# File 'lib/lockstep_sdk/models/status_model.rb', line 138

def is_impersonated
  @is_impersonated
end

#last_logged_inDate-time

Returns Date and time user has last logged into Azure B2C.

Returns:

  • (Date-time)

    Date and time user has last logged into Azure B2C.



90
91
92
# File 'lib/lockstep_sdk/models/status_model.rb', line 90

def last_logged_in
  @last_logged_in
end

#logged_inBoolean

Returns true if authentication for this API was successful.

Returns:

  • (Boolean)

    Returns true if authentication for this API was successful.



78
79
80
# File 'lib/lockstep_sdk/models/status_model.rb', line 78

def logged_in
  @logged_in
end

Returns Magic link information about the user.

Returns:



130
131
132
# File 'lib/lockstep_sdk/models/status_model.rb', line 130

def magic_link
  @magic_link
end

Returns The id of the target company for the Magic Link.

Returns:

  • (Uuid)

    The id of the target company for the Magic Link



126
127
128
# File 'lib/lockstep_sdk/models/status_model.rb', line 126

def magic_link_company_id
  @magic_link_company_id
end

Returns The id of the Magic link used to authenticate.

Returns:

  • (Uuid)

    The id of the Magic link used to authenticate.



122
123
124
# File 'lib/lockstep_sdk/models/status_model.rb', line 122

def magic_link_id
  @magic_link_id
end

#onboarding_scheduledBoolean

Returns If authentication is successful, contains the onboarding session status of the logged-in user’s group account.

Returns:

  • (Boolean)

    If authentication is successful, contains the onboarding session status of the logged-in user’s group account.



110
111
112
# File 'lib/lockstep_sdk/models/status_model.rb', line 110

def onboarding_scheduled
  @onboarding_scheduled
end

#rolesString

Returns The set of roles for this user.

Returns:

  • (String)

    The set of roles for this user.



86
87
88
# File 'lib/lockstep_sdk/models/status_model.rb', line 86

def roles
  @roles
end

#support_accessSupportAccessModel

Returns Information allowing Lockstep to offer direct support to the user.

Returns:

  • (SupportAccessModel)

    Information allowing Lockstep to offer direct support to the user



134
135
136
# File 'lib/lockstep_sdk/models/status_model.rb', line 134

def support_access
  @support_access
end

#user_groupsUserGroupModel

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.

Returns:

  • (UserGroupModel)

    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.



142
143
144
# File 'lib/lockstep_sdk/models/status_model.rb', line 142

def user_groups
  @user_groups
end

#user_idUuid

Returns If authentication is successful, contains the unique identifier of the logged-in user.

Returns:

  • (Uuid)

    If authentication is successful, contains the unique identifier of the logged-in user.



70
71
72
# File 'lib/lockstep_sdk/models/status_model.rb', line 70

def user_id
  @user_id
end

#user_nameString

Returns If authentication is successful, contains the username of the logged-in user.

Returns:

  • (String)

    If authentication is successful, contains the username of the logged-in user.



54
55
56
# File 'lib/lockstep_sdk/models/status_model.rb', line 54

def user_name
  @user_name
end

#user_statusString

Returns If authentication is successful, contains the user status of the logged-in user.

Returns:

  • (String)

    If authentication is successful, contains the user status of the logged-in user.



98
99
100
# File 'lib/lockstep_sdk/models/status_model.rb', line 98

def user_status
  @user_status
end

#versionString

Returns The version currently being used.

Returns:

  • (String)

    The version currently being used



106
107
108
# File 'lib/lockstep_sdk/models/status_model.rb', line 106

def version
  @version
end

Instance Method Details

#as_json(options = {}) ⇒ object

Returns This object as a JSON key-value structure.

Returns:

  • (object)

    This object as a JSON key-value structure



150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
# File 'lib/lockstep_sdk/models/status_model.rb', line 150

def as_json(options={})
    {
        '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,
        'baseCurrencyCode' => @base_currency_code,
        'countryCode' => @country_code,
        'magicLinkId' => @magic_link_id,
        'magicLinkCompanyId' => @magic_link_company_id,
        'magicLink' => @magic_link,
        'supportAccess' => @support_access,
        'isImpersonated' => @is_impersonated,
        'userGroups' => @user_groups,
        'dependencies' => @dependencies,
    }
end

#to_json(*options) ⇒ String

Returns This object converted to a JSON string.

Returns:

  • (String)

    This object converted to a JSON string



181
182
183
# File 'lib/lockstep_sdk/models/status_model.rb', line 181

def to_json(*options)
    "[#{as_json(*options).to_json(*options)}]"
end