Class: LockstepSdk::UserAccountModel
- Inherits:
-
Object
- Object
- LockstepSdk::UserAccountModel
- 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
-
#accounting_role_code_def_id ⇒ Uuid
FK to the CodeDefinition table; CodeType = ‘AccountingRole’.
-
#accounting_role_code_definition ⇒ CodeDefinitionModel
Accounting role definition for this User.
-
#address1 ⇒ String
Address Line 1 for this User.
-
#address2 ⇒ String
Address Line 2 for this User.
-
#address3 ⇒ String
Address Line 3 for this User.
-
#attachments ⇒ AttachmentModel
A collection of attachments linked to this record.
-
#b2_clast_logged_in ⇒ Date-time
Last date time user logged into Azure B2C.
-
#b2_cuser_id ⇒ Uuid
The ID of the user in Azure B2C.
-
#city ⇒ String
City for this User.
-
#country ⇒ String
Country for this User This will be validated by the /api/v1/countries data set.
-
#created ⇒ Date-time
The date that the user account was created.
-
#created_user_id ⇒ Uuid
The ID of the user who created the user account.
-
#custom_field_values ⇒ CustomFieldValueModel
A collection of custom fields linked to this record.
-
#default_currency_code ⇒ String
The default currency code used by this user entity.
-
#description ⇒ String
Description for this User.
-
#email ⇒ Email
The email of the user.
-
#fax_number ⇒ String
The fax number of the user.
-
#group_key ⇒ Uuid
The GroupKey uniquely identifies a single Lockstep Platform account.
-
#image_url ⇒ String
Image URL for this User.
-
#invite_sent ⇒ Date-time
The date timestamp when the invite was sent to the user.
-
#modified ⇒ Date-time
The date the user account was last modified.
-
#modified_user_id ⇒ Uuid
The ID of the user who last modified the user account.
-
#modified_user_name ⇒ String
The name of the user who last modified the user account.
-
#notes ⇒ NoteModel
A collection of notes linked to this record.
-
#phone_number ⇒ String
The phone number of the user.
-
#postal_code ⇒ String
Postal Code this User.
-
#state_region ⇒ String
Region (“state” in the US) for this User.
-
#status ⇒ String
The status of the user’s account.
-
#title ⇒ String
The title of the user; free text field.
-
#user_id ⇒ Uuid
The unique ID of this record, automatically assigned by Lockstep when this record is added to the Lockstep platform.
-
#user_name ⇒ String
The full name of the user.
-
#user_role ⇒ Uuid
The id of the Permission Level for the user.
Instance Method Summary collapse
-
#as_json(options = {}) ⇒ object
This object as a JSON key-value structure.
-
#initialize(params = {}) ⇒ UserAccountModel
constructor
Initialize the UserAccountModel using the provided prototype.
-
#to_json(*options) ⇒ String
This object converted to a JSON string.
Constructor Details
#initialize(params = {}) ⇒ UserAccountModel
Initialize the UserAccountModel using the provided prototype
31 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 |
# File 'lib/lockstep_sdk/models/user_account_model.rb', line 31 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) = 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_id ⇒ Uuid
Returns FK to the CodeDefinition table; CodeType = ‘AccountingRole’.
132 133 134 |
# File 'lib/lockstep_sdk/models/user_account_model.rb', line 132 def accounting_role_code_def_id @accounting_role_code_def_id end |
#accounting_role_code_definition ⇒ CodeDefinitionModel
Returns Accounting role definition for this User. To retrieve this collection, specify ‘AccountingRole` in the “Include” parameter for your query.
192 193 194 |
# File 'lib/lockstep_sdk/models/user_account_model.rb', line 192 def accounting_role_code_definition @accounting_role_code_definition end |
#address1 ⇒ String
Returns Address Line 1 for this User.
136 137 138 |
# File 'lib/lockstep_sdk/models/user_account_model.rb', line 136 def address1 @address1 end |
#address2 ⇒ String
Returns Address Line 2 for this User.
140 141 142 |
# File 'lib/lockstep_sdk/models/user_account_model.rb', line 140 def address2 @address2 end |
#address3 ⇒ String
Returns Address Line 3 for this User.
144 145 146 |
# File 'lib/lockstep_sdk/models/user_account_model.rb', line 144 def address3 @address3 end |
#attachments ⇒ AttachmentModel
Returns A collection of attachments linked to this record. To retrieve this collection, specify ‘Attachments` in the `include` parameter when retrieving data. To create an attachment, use the [Upload Attachment](developer.lockstep.io/reference/post_api-v1-attachments) endpoint with the `TableKey` to `UserAccount` and the `ObjectKey` set to the `UserId` for this record. For more information on extensibility, see [linking extensible metadata to objects](developer.lockstep.io/docs/custom-fields#linking-metadata-to-an-object).
184 185 186 |
# File 'lib/lockstep_sdk/models/user_account_model.rb', line 184 def end |
#b2_clast_logged_in ⇒ Date-time
Returns Last date time user logged into Azure B2C.
172 173 174 |
# File 'lib/lockstep_sdk/models/user_account_model.rb', line 172 def b2_clast_logged_in @b2_clast_logged_in end |
#b2_cuser_id ⇒ Uuid
Returns The ID of the user in Azure B2C.
108 109 110 |
# File 'lib/lockstep_sdk/models/user_account_model.rb', line 108 def b2_cuser_id @b2_cuser_id end |
#city ⇒ String
Returns City for this User.
148 149 150 |
# File 'lib/lockstep_sdk/models/user_account_model.rb', line 148 def city @city end |
#country ⇒ String
Returns Country for this User This will be validated by the /api/v1/countries data set.
160 161 162 |
# File 'lib/lockstep_sdk/models/user_account_model.rb', line 160 def country @country end |
#created ⇒ Date-time
Returns The date that the user account was created.
88 89 90 |
# File 'lib/lockstep_sdk/models/user_account_model.rb', line 88 def created @created end |
#created_user_id ⇒ Uuid
Returns The ID of the user who created the user account.
92 93 94 |
# File 'lib/lockstep_sdk/models/user_account_model.rb', line 92 def created_user_id @created_user_id end |
#custom_field_values ⇒ CustomFieldValueModel
Returns A collection of custom fields linked to this record. To retrieve this collection, specify ‘CustomFieldValues` in the `include` parameter when retrieving data. To create a custom field, use the [Create Custom Field](developer.lockstep.io/reference/post_api-v1-customfieldvalues) endpoint with the `TableKey` to `UserAccount` and the `ObjectKey` set to the `UserId` for this record. For more information on extensibility, see [linking extensible metadata to objects](developer.lockstep.io/docs/custom-fields#linking-metadata-to-an-object).
188 189 190 |
# File 'lib/lockstep_sdk/models/user_account_model.rb', line 188 def custom_field_values @custom_field_values end |
#default_currency_code ⇒ String
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.
176 177 178 |
# File 'lib/lockstep_sdk/models/user_account_model.rb', line 176 def default_currency_code @default_currency_code end |
#description ⇒ String
Returns Description for this User.
168 169 170 |
# File 'lib/lockstep_sdk/models/user_account_model.rb', line 168 def description @description end |
#email ⇒ Email
Returns The email of the user.
80 81 82 |
# File 'lib/lockstep_sdk/models/user_account_model.rb', line 80 def email @email end |
#fax_number ⇒ String
Returns The fax number of the user.
124 125 126 |
# File 'lib/lockstep_sdk/models/user_account_model.rb', line 124 def fax_number @fax_number 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).
72 73 74 |
# File 'lib/lockstep_sdk/models/user_account_model.rb', line 72 def group_key @group_key end |
#image_url ⇒ String
Returns Image URL for this User.
164 165 166 |
# File 'lib/lockstep_sdk/models/user_account_model.rb', line 164 def image_url @image_url end |
#invite_sent ⇒ Date-time
Returns The date timestamp when the invite was sent to the user.
116 117 118 |
# File 'lib/lockstep_sdk/models/user_account_model.rb', line 116 def invite_sent @invite_sent end |
#modified ⇒ Date-time
Returns The date the user account was last modified.
96 97 98 |
# File 'lib/lockstep_sdk/models/user_account_model.rb', line 96 def modified @modified end |
#modified_user_id ⇒ Uuid
Returns The ID of the user who last modified the user account.
100 101 102 |
# File 'lib/lockstep_sdk/models/user_account_model.rb', line 100 def modified_user_id @modified_user_id end |
#modified_user_name ⇒ String
Returns The name of the user who last modified the user account.
104 105 106 |
# File 'lib/lockstep_sdk/models/user_account_model.rb', line 104 def modified_user_name @modified_user_name end |
#notes ⇒ NoteModel
Returns A collection of notes linked to this record. To retrieve this collection, specify ‘Notes` in the `include` parameter when retrieving data. To create a note, use the [Create Note](developer.lockstep.io/reference/post_api-v1-notes) endpoint with the `TableKey` to `UserAccount` and the `ObjectKey` set to the `UserId` for this record. For more information on extensibility, see [linking extensible metadata to objects](developer.lockstep.io/docs/custom-fields#linking-metadata-to-an-object).
180 181 182 |
# File 'lib/lockstep_sdk/models/user_account_model.rb', line 180 def notes @notes end |
#phone_number ⇒ String
Returns The phone number of the user.
120 121 122 |
# File 'lib/lockstep_sdk/models/user_account_model.rb', line 120 def phone_number @phone_number end |
#postal_code ⇒ String
Returns Postal Code this User.
156 157 158 |
# File 'lib/lockstep_sdk/models/user_account_model.rb', line 156 def postal_code @postal_code end |
#state_region ⇒ String
Returns Region (“state” in the US) for this User.
152 153 154 |
# File 'lib/lockstep_sdk/models/user_account_model.rb', line 152 def state_region @state_region end |
#status ⇒ String
Returns The status of the user’s account.
84 85 86 |
# File 'lib/lockstep_sdk/models/user_account_model.rb', line 84 def status @status end |
#title ⇒ String
Returns The title of the user; free text field.
128 129 130 |
# File 'lib/lockstep_sdk/models/user_account_model.rb', line 128 def title @title end |
#user_id ⇒ Uuid
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.
68 69 70 |
# File 'lib/lockstep_sdk/models/user_account_model.rb', line 68 def user_id @user_id end |
#user_name ⇒ String
Returns The full name of the user.
76 77 78 |
# File 'lib/lockstep_sdk/models/user_account_model.rb', line 76 def user_name @user_name end |
#user_role ⇒ Uuid
Returns The id of the Permission Level for the user.
112 113 114 |
# File 'lib/lockstep_sdk/models/user_account_model.rb', line 112 def user_role @user_role end |
Instance Method Details
#as_json(options = {}) ⇒ object
Returns This object as a JSON key-value structure.
196 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 |
# File 'lib/lockstep_sdk/models/user_account_model.rb', line 196 def as_json(={}) { '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' => , 'customFieldValues' => @custom_field_values, 'accountingRoleCodeDefinition' => @accounting_role_code_definition, } end |
#to_json(*options) ⇒ String
Returns This object converted to a JSON string.
235 236 237 |
# File 'lib/lockstep_sdk/models/user_account_model.rb', line 235 def to_json(*) "[#{as_json(*options).to_json(*options)}]" end |