Class: LockstepSdk::UserAccountModel

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

Overview

A User represents a person who has the ability to authenticate against the Lockstep Platform and use services such as Lockstep Inbox. A User is uniquely identified by an Azure identity, and each user must have an email address defined within their account. All Users must validate their email to make use of Lockstep platform services. Users may have different privileges and access control rights within the Lockstep Platform.

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(params = {}) ⇒ UserAccountModel

Initialize the UserAccountModel using the provided prototype



32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
# File 'lib/lockstep_sdk/models/user_account_model.rb', line 32

def initialize(params = {})
    @user_id = params.dig(:user_id)
    @group_key = params.dig(:group_key)
    @user_name = params.dig(:user_name)
    @email = params.dig(:email)
    @status = params.dig(:status)
    @created = params.dig(:created)
    @created_user_id = params.dig(:created_user_id)
    @modified = params.dig(:modified)
    @modified_user_id = params.dig(:modified_user_id)
    @modified_user_name = params.dig(:modified_user_name)
    @b2_cuser_id = params.dig(:b2_cuser_id)
    @user_role = params.dig(:user_role)
    @invite_sent = params.dig(:invite_sent)
    @phone_number = params.dig(:phone_number)
    @fax_number = params.dig(:fax_number)
    @title = params.dig(:title)
    @accounting_role_code_def_id = params.dig(:accounting_role_code_def_id)
    @address1 = params.dig(:address1)
    @address2 = params.dig(:address2)
    @address3 = params.dig(:address3)
    @city = params.dig(:city)
    @state_region = params.dig(:state_region)
    @postal_code = params.dig(:postal_code)
    @country = params.dig(:country)
    @image_url = params.dig(:image_url)
    @description = params.dig(:description)
    @b2_clast_logged_in = params.dig(:b2_clast_logged_in)
    @default_currency_code = params.dig(:default_currency_code)
    @notes = params.dig(:notes)
    @attachments = params.dig(:attachments)
    @custom_field_values = params.dig(:custom_field_values)
    @accounting_role_code_definition = params.dig(:accounting_role_code_definition)
end

Instance Attribute Details

#accounting_role_code_def_idUuid

Returns FK to the CodeDefinition table; CodeType = 'AccountingRole'.

Returns:

  • (Uuid)

    FK to the CodeDefinition table; CodeType = 'AccountingRole'



133
134
135
# File 'lib/lockstep_sdk/models/user_account_model.rb', line 133

def accounting_role_code_def_id
  @accounting_role_code_def_id
end

#accounting_role_code_definitionCodeDefinitionModel

Returns Accounting role definition for this User. To retrieve this collection, specify `AccountingRole` in the “Include” parameter for your query.

Returns:

  • (CodeDefinitionModel)

    Accounting role definition for this User. To retrieve this collection, specify `AccountingRole` in the “Include” parameter for your query.



193
194
195
# File 'lib/lockstep_sdk/models/user_account_model.rb', line 193

def accounting_role_code_definition
  @accounting_role_code_definition
end

#address1String

Returns Address Line 1 for this User.

Returns:

  • (String)

    Address Line 1 for this User



137
138
139
# File 'lib/lockstep_sdk/models/user_account_model.rb', line 137

def address1
  @address1
end

#address2String

Returns Address Line 2 for this User.

Returns:

  • (String)

    Address Line 2 for this User



141
142
143
# File 'lib/lockstep_sdk/models/user_account_model.rb', line 141

def address2
  @address2
end

#address3String

Returns Address Line 3 for this User.

Returns:

  • (String)

    Address Line 3 for this User



145
146
147
# File 'lib/lockstep_sdk/models/user_account_model.rb', line 145

def address3
  @address3
end

#attachmentsAttachmentModel

Returns All attachments attached to this User. To retrieve this collection, specify `Attachments` in the “Include” parameter for your query.

Returns:

  • (AttachmentModel)

    All attachments attached to this User. To retrieve this collection, specify `Attachments` in the “Include” parameter for your query.



185
186
187
# File 'lib/lockstep_sdk/models/user_account_model.rb', line 185

def attachments
  @attachments
end

#b2_clast_logged_inDate-time

Returns Last date time user logged into Azure B2C.

Returns:

  • (Date-time)

    Last date time user logged into Azure B2C.



173
174
175
# File 'lib/lockstep_sdk/models/user_account_model.rb', line 173

def b2_clast_logged_in
  @b2_clast_logged_in
end

#b2_cuser_idUuid

Returns The ID of the user in Azure B2C.

Returns:

  • (Uuid)

    The ID of the user in Azure B2C



109
110
111
# File 'lib/lockstep_sdk/models/user_account_model.rb', line 109

def b2_cuser_id
  @b2_cuser_id
end

#cityString

Returns City for this User.

Returns:

  • (String)

    City for this User



149
150
151
# File 'lib/lockstep_sdk/models/user_account_model.rb', line 149

def city
  @city
end

#countryString

Returns Country for this User This will be validated by the /api/v1/countries data set.

Returns:

  • (String)

    Country for this User This will be validated by the /api/v1/countries data set



161
162
163
# File 'lib/lockstep_sdk/models/user_account_model.rb', line 161

def country
  @country
end

#createdDate-time

Returns The date that the user account was created.

Returns:

  • (Date-time)

    The date that the user account was created



89
90
91
# File 'lib/lockstep_sdk/models/user_account_model.rb', line 89

def created
  @created
end

#created_user_idUuid

Returns The ID of the user who created the user account.

Returns:

  • (Uuid)

    The ID of the user who created the user account



93
94
95
# File 'lib/lockstep_sdk/models/user_account_model.rb', line 93

def created_user_id
  @created_user_id
end

#custom_field_valuesCustomFieldValueModel

Returns All values attached to this User. To retrieve this collection, specify `CustomFieldValues` in the “Include” parameter for your query.

Returns:

  • (CustomFieldValueModel)

    All values attached to this User. To retrieve this collection, specify `CustomFieldValues` in the “Include” parameter for your query.



189
190
191
# File 'lib/lockstep_sdk/models/user_account_model.rb', line 189

def custom_field_values
  @custom_field_values
end

#default_currency_codeString

Returns The default currency code used by this user entity. This value can be overridden for invoices in a different currency code. For a list of defined currency codes, see [Query Currencies](developer.lockstep.io/reference/get_api-v1-definitions-currencies) This will be validated by the /api/v1/currencies data set.

Returns:



177
178
179
# File 'lib/lockstep_sdk/models/user_account_model.rb', line 177

def default_currency_code
  @default_currency_code
end

#descriptionString

Returns Description for this User.

Returns:

  • (String)

    Description for this User.



169
170
171
# File 'lib/lockstep_sdk/models/user_account_model.rb', line 169

def description
  @description
end

#emailEmail

Returns The email of the user.

Returns:

  • (Email)

    The email of the user



81
82
83
# File 'lib/lockstep_sdk/models/user_account_model.rb', line 81

def email
  @email
end

#fax_numberString

Returns The fax number of the user.

Returns:

  • (String)

    The fax number of the user.



125
126
127
# File 'lib/lockstep_sdk/models/user_account_model.rb', line 125

def fax_number
  @fax_number
end

#group_keyUuid

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).

Returns:

  • (Uuid)

    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).



73
74
75
# File 'lib/lockstep_sdk/models/user_account_model.rb', line 73

def group_key
  @group_key
end

#image_urlString

Returns Image URL for this User.

Returns:

  • (String)

    Image URL for this User



165
166
167
# File 'lib/lockstep_sdk/models/user_account_model.rb', line 165

def image_url
  @image_url
end

#invite_sentDate-time

Returns The date timestamp when the invite was sent to the user.

Returns:

  • (Date-time)

    The date timestamp when the invite was sent to the user.



117
118
119
# File 'lib/lockstep_sdk/models/user_account_model.rb', line 117

def invite_sent
  @invite_sent
end

#modifiedDate-time

Returns The date the user account was last modified.

Returns:

  • (Date-time)

    The date the user account was last modified



97
98
99
# File 'lib/lockstep_sdk/models/user_account_model.rb', line 97

def modified
  @modified
end

#modified_user_idUuid

Returns The ID of the user who last modified the user account.

Returns:

  • (Uuid)

    The ID of the user who last modified the user account



101
102
103
# File 'lib/lockstep_sdk/models/user_account_model.rb', line 101

def modified_user_id
  @modified_user_id
end

#modified_user_nameString

Returns The name of the user who last modified the user account.

Returns:

  • (String)

    The name of the user who last modified the user account



105
106
107
# File 'lib/lockstep_sdk/models/user_account_model.rb', line 105

def modified_user_name
  @modified_user_name
end

#notesNoteModel

Returns All notes attached to this User. To retrieve this collection, specify `Notes` in the “Include” parameter for your query.

Returns:

  • (NoteModel)

    All notes attached to this User. To retrieve this collection, specify `Notes` in the “Include” parameter for your query.



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

def notes
  @notes
end

#phone_numberString

Returns The phone number of the user.

Returns:

  • (String)

    The phone number of the user.



121
122
123
# File 'lib/lockstep_sdk/models/user_account_model.rb', line 121

def phone_number
  @phone_number
end

#postal_codeString

Returns Postal Code this User.

Returns:

  • (String)

    Postal Code this User



157
158
159
# File 'lib/lockstep_sdk/models/user_account_model.rb', line 157

def postal_code
  @postal_code
end

#state_regionString

Returns Region (“state” in the US) for this User.

Returns:

  • (String)

    Region (“state” in the US) for this User



153
154
155
# File 'lib/lockstep_sdk/models/user_account_model.rb', line 153

def state_region
  @state_region
end

#statusString

Returns The status of the user's account.

Returns:

  • (String)

    The status of the user's account



85
86
87
# File 'lib/lockstep_sdk/models/user_account_model.rb', line 85

def status
  @status
end

#titleString

Returns The title of the user; free text field.

Returns:

  • (String)

    The title of the user; free text field



129
130
131
# File 'lib/lockstep_sdk/models/user_account_model.rb', line 129

def title
  @title
end

#user_idUuid

Returns The unique ID of this record, automatically assigned by Lockstep when this record is added to the Lockstep platform. This record provides a link to the user's Azure AD B2C OID.

Returns:

  • (Uuid)

    The unique ID of this record, automatically assigned by Lockstep when this record is added to the Lockstep platform. This record provides a link to the user's Azure AD B2C OID.



69
70
71
# File 'lib/lockstep_sdk/models/user_account_model.rb', line 69

def user_id
  @user_id
end

#user_nameString

Returns The full name of the user.

Returns:

  • (String)

    The full name of the user



77
78
79
# File 'lib/lockstep_sdk/models/user_account_model.rb', line 77

def user_name
  @user_name
end

#user_roleUuid

Returns The id of the Permission Level for the user.

Returns:

  • (Uuid)

    The id of the Permission Level for the user.



113
114
115
# File 'lib/lockstep_sdk/models/user_account_model.rb', line 113

def user_role
  @user_role
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



197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
# File 'lib/lockstep_sdk/models/user_account_model.rb', line 197

def as_json(options={})
    {
        'userId' => @user_id,
        'groupKey' => @group_key,
        'userName' => @user_name,
        'email' => @email,
        'status' => @status,
        'created' => @created,
        'createdUserId' => @created_user_id,
        'modified' => @modified,
        'modifiedUserId' => @modified_user_id,
        'modifiedUserName' => @modified_user_name,
        'b2CUserId' => @b2_cuser_id,
        'userRole' => @user_role,
        'inviteSent' => @invite_sent,
        'phoneNumber' => @phone_number,
        'faxNumber' => @fax_number,
        'title' => @title,
        'accountingRoleCodeDefId' => @accounting_role_code_def_id,
        'address1' => @address1,
        'address2' => @address2,
        'address3' => @address3,
        'city' => @city,
        'stateRegion' => @state_region,
        'postalCode' => @postal_code,
        'country' => @country,
        'imageURL' => @image_url,
        'description' => @description,
        'b2CLastLoggedIn' => @b2_clast_logged_in,
        'defaultCurrencyCode' => @default_currency_code,
        'notes' => @notes,
        'attachments' => @attachments,
        'customFieldValues' => @custom_field_values,
        'accountingRoleCodeDefinition' => @accounting_role_code_definition,
    }
end

#to_json(*options) ⇒ String

Returns This object converted to a JSON string.

Returns:

  • (String)

    This object converted to a JSON string



236
237
238
# File 'lib/lockstep_sdk/models/user_account_model.rb', line 236

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