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
The AppEnrollmentId of the application that imported this record.
-
#created ⇒ Date-time
The date the note was created.
-
#created_user_id ⇒ Uuid
The unique ID of the [UserAccount](developer.lockstep.io/docs/useraccountmodel) of the user who created this 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
A flag indicating whether this Note is archived (also known as hidden or deleted).
-
#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 full text of the note.
-
#note_type ⇒ String
The type of the note.
-
#object_key ⇒ Uuid
A Note is connected to an existing item within the Lockstep Platform by the fields ‘TableKey` and `ObjectKey`.
-
#recipient_name ⇒ String
The person to whom this note is intended for.
-
#table_key ⇒ String
A Note is connected to an existing item within the Lockstep Platform by the fields ‘TableKey` and `ObjectKey`.
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
30 31 32 33 34 35 36 37 38 39 40 41 42 43 |
# File 'lib/lockstep_sdk/models/note_model.rb', line 30 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 The AppEnrollmentId of the application that imported this record. For accounts with more than one financial system connected, this field identifies the originating financial system that produced this record. This value is null if this record was not loaded from an external ERP or financial system.
87 88 89 |
# File 'lib/lockstep_sdk/models/note_model.rb', line 87 def app_enrollment_id @app_enrollment_id end |
#created ⇒ Date-time
Returns The date the note was created.
75 76 77 |
# File 'lib/lockstep_sdk/models/note_model.rb', line 75 def created @created end |
#created_user_id ⇒ Uuid
Returns The unique ID of the [UserAccount](developer.lockstep.io/docs/useraccountmodel) of the user who created this Note.
79 80 81 |
# File 'lib/lockstep_sdk/models/note_model.rb', line 79 def created_user_id @created_user_id end |
#created_user_name ⇒ String
Returns The name of the user who created the note.
83 84 85 |
# File 'lib/lockstep_sdk/models/note_model.rb', line 83 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).
51 52 53 |
# File 'lib/lockstep_sdk/models/note_model.rb', line 51 def group_key @group_key end |
#is_archived ⇒ Boolean
Returns A flag indicating whether this Note is archived (also known as hidden or deleted). When you call [ArchiveNote](developer.lockstep.io/reference/delete_api-v1-notes-id) this field will be set to true. You should avoid displaying Notes with the IsArchived field set to true in your user interface.
71 72 73 |
# File 'lib/lockstep_sdk/models/note_model.rb', line 71 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.
47 48 49 |
# File 'lib/lockstep_sdk/models/note_model.rb', line 47 def note_id @note_id end |
#note_text ⇒ String
Returns The full text of the note.
63 64 65 |
# File 'lib/lockstep_sdk/models/note_model.rb', line 63 def note_text @note_text end |
#note_type ⇒ String
Returns The type of the note.
67 68 69 |
# File 'lib/lockstep_sdk/models/note_model.rb', line 67 def note_type @note_type end |
#object_key ⇒ Uuid
Returns A Note is connected to an existing item within the Lockstep Platform by the fields ‘TableKey` and `ObjectKey`. For example, a Note connected to Invoice 12345 would have a `TableKey` value of `Invoice` and an `ObjectKey` value of `12345`. The `ObjectKey` value contains the primary key of the record within the Lockstep Platform to which this metadata is connected. For more information, see [linking metadata to an object](developer.lockstep.io/docs/custom-fields#linking-metadata-to-an-object).
59 60 61 |
# File 'lib/lockstep_sdk/models/note_model.rb', line 59 def object_key @object_key end |
#recipient_name ⇒ String
Returns The person to whom this note is intended for.
91 92 93 |
# File 'lib/lockstep_sdk/models/note_model.rb', line 91 def recipient_name @recipient_name end |
#table_key ⇒ String
Returns A Note is connected to an existing item within the Lockstep Platform by the fields ‘TableKey` and `ObjectKey`. For example, a Note connected to Invoice 12345 would have a `TableKey` value of `Invoice` and an `ObjectKey` value of `12345`. The `TableKey` value contains the name of the table within the Lockstep Platform to which this metadata is connected. For more information, see [linking metadata to an object](developer.lockstep.io/docs/custom-fields#linking-metadata-to-an-object).
55 56 57 |
# File 'lib/lockstep_sdk/models/note_model.rb', line 55 def table_key @table_key end |
Instance Method Details
#as_json(options = {}) ⇒ object
Returns This object as a JSON key-value structure.
95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 |
# File 'lib/lockstep_sdk/models/note_model.rb', line 95 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.
114 115 116 |
# File 'lib/lockstep_sdk/models/note_model.rb', line 114 def to_json(*) "[#{as_json(*).to_json(*)}]" end |