Class: LockstepSdk::NoteModel
- Inherits:
-
Object
- Object
- LockstepSdk::NoteModel
- Defined in:
- lib/lockstep_sdk/models/note_model.rb
Overview
A note is a customizable text string that can be attached to various account attributes within Lockstep. You can use notes for internal communication, correspondence with clients, or personal reminders. The Note Model represents a note and a number of different metadata attributes related to the creation, storage, and ownership of the note.
See [Extensibility](developer.lockstep.io/docs/extensibility) for more information.
Instance Attribute Summary collapse
-
#app_enrollment_id ⇒ Uuid
AppEnrollmentId for this record; used for mapping purposes.
-
#created ⇒ Date-time
The date the note was created.
-
#created_user_id ⇒ Uuid
The ID of the user who created the note.
-
#created_user_name ⇒ String
The name of the user who created the note.
-
#group_key ⇒ Uuid
The GroupKey uniquely identifies a single Lockstep Platform account.
-
#is_archived ⇒ Boolean
Flag indicating if the note has been archived.
-
#note_id ⇒ Uuid
The unique ID of this record, automatically assigned by Lockstep when this record is added to the Lockstep platform.
-
#note_text ⇒ String
The text of the note.
-
#note_type ⇒ String
The type of the note.
-
#object_key ⇒ Uuid
The ID of the object the note is associated with.
-
#recipient_name ⇒ String
The person to whom this note is intended for.
-
#table_key ⇒ String
The name of the table the note is associated with.
Instance Method Summary collapse
-
#as_json(options = {}) ⇒ object
This object as a JSON key-value structure.
-
#initialize(params = {}) ⇒ NoteModel
constructor
Initialize the NoteModel using the provided prototype.
-
#to_json(*options) ⇒ String
This object converted to a JSON string.
Constructor Details
#initialize(params = {}) ⇒ NoteModel
Initialize the NoteModel using the provided prototype
33 34 35 36 37 38 39 40 41 42 43 44 45 46 |
# File 'lib/lockstep_sdk/models/note_model.rb', line 33 def initialize(params = {}) @note_id = params.dig(:note_id) @group_key = params.dig(:group_key) @table_key = params.dig(:table_key) @object_key = params.dig(:object_key) @note_text = params.dig(:note_text) @note_type = params.dig(:note_type) @is_archived = params.dig(:is_archived) @created = params.dig(:created) @created_user_id = params.dig(:created_user_id) @created_user_name = params.dig(:created_user_name) @app_enrollment_id = params.dig(:app_enrollment_id) @recipient_name = params.dig(:recipient_name) end |
Instance Attribute Details
#app_enrollment_id ⇒ Uuid
Returns AppEnrollmentId for this record; used for mapping purposes.
90 91 92 |
# File 'lib/lockstep_sdk/models/note_model.rb', line 90 def app_enrollment_id @app_enrollment_id end |
#created ⇒ Date-time
Returns The date the note was created.
78 79 80 |
# File 'lib/lockstep_sdk/models/note_model.rb', line 78 def created @created end |
#created_user_id ⇒ Uuid
Returns The ID of the user who created the note.
82 83 84 |
# File 'lib/lockstep_sdk/models/note_model.rb', line 82 def created_user_id @created_user_id end |
#created_user_name ⇒ String
Returns The name of the user who created the note.
86 87 88 |
# File 'lib/lockstep_sdk/models/note_model.rb', line 86 def created_user_name @created_user_name 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).
54 55 56 |
# File 'lib/lockstep_sdk/models/note_model.rb', line 54 def group_key @group_key end |
#is_archived ⇒ Boolean
Returns Flag indicating if the note has been archived.
74 75 76 |
# File 'lib/lockstep_sdk/models/note_model.rb', line 74 def is_archived @is_archived end |
#note_id ⇒ Uuid
Returns The unique ID of this record, automatically assigned by Lockstep when this record is added to the Lockstep platform.
50 51 52 |
# File 'lib/lockstep_sdk/models/note_model.rb', line 50 def note_id @note_id end |
#note_text ⇒ String
Returns The text of the note.
66 67 68 |
# File 'lib/lockstep_sdk/models/note_model.rb', line 66 def note_text @note_text end |
#note_type ⇒ String
Returns The type of the note.
70 71 72 |
# File 'lib/lockstep_sdk/models/note_model.rb', line 70 def note_type @note_type end |
#object_key ⇒ Uuid
Returns The ID of the object the note is associated with.
62 63 64 |
# File 'lib/lockstep_sdk/models/note_model.rb', line 62 def object_key @object_key end |
#recipient_name ⇒ String
Returns The person to whom this note is intended for.
94 95 96 |
# File 'lib/lockstep_sdk/models/note_model.rb', line 94 def recipient_name @recipient_name end |
#table_key ⇒ String
Returns The name of the table the note is associated with.
58 59 60 |
# File 'lib/lockstep_sdk/models/note_model.rb', line 58 def table_key @table_key end |
Instance Method Details
#as_json(options = {}) ⇒ object
Returns This object as a JSON key-value structure.
98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 |
# File 'lib/lockstep_sdk/models/note_model.rb', line 98 def as_json(={}) { 'noteId' => @note_id, 'groupKey' => @group_key, 'tableKey' => @table_key, 'objectKey' => @object_key, 'noteText' => @note_text, 'noteType' => @note_type, 'isArchived' => @is_archived, 'created' => @created, 'createdUserId' => @created_user_id, 'createdUserName' => @created_user_name, 'appEnrollmentId' => @app_enrollment_id, 'recipientName' => @recipient_name, } end |
#to_json(*options) ⇒ String
Returns This object converted to a JSON string.
117 118 119 |
# File 'lib/lockstep_sdk/models/note_model.rb', line 117 def to_json(*) "[#{as_json(*).to_json(*)}]" end |