Class: LockstepSdk::AttachmentLinkModel
- Inherits:
-
Object
- Object
- LockstepSdk::AttachmentLinkModel
- Defined in:
- lib/lockstep_sdk/models/attachment_link_model.rb
Overview
An Attachment Link represents a single link between any nestable object and an attachment
Instance Attribute Summary collapse
-
#attachment_id ⇒ Uuid
The unique ID of an attachment record, automatically assigned by Lockstep when this record is added to the Lockstep platform.
-
#created ⇒ Date-time
The date the Attachment Link was created.
-
#created_user_id ⇒ Uuid
The unique ID of the [UserAccount](developer.lockstep.io/docs/useraccountmodel) of the user who created this Attachment Link.
-
#group_key ⇒ Uuid
The GroupKey uniquely identifies a single Lockstep Platform account.
-
#object_key ⇒ Uuid
An Attachment is connected to an existing item within the Lockstep Platform by the fields ‘TableKey` and `ObjectKey`.
-
#table_key ⇒ String
An Attachment 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 = {}) ⇒ AttachmentLinkModel
constructor
Initialize the AttachmentLinkModel using the provided prototype.
-
#to_json(*options) ⇒ String
This object converted to a JSON string.
Constructor Details
#initialize(params = {}) ⇒ AttachmentLinkModel
Initialize the AttachmentLinkModel using the provided prototype
25 26 27 28 29 30 31 32 |
# File 'lib/lockstep_sdk/models/attachment_link_model.rb', line 25 def initialize(params = {}) @group_key = params.dig(:group_key) @attachment_id = params.dig(:attachment_id) @object_key = params.dig(:object_key) @table_key = params.dig(:table_key) @created = params.dig(:created) @created_user_id = params.dig(:created_user_id) end |
Instance Attribute Details
#attachment_id ⇒ Uuid
Returns The unique ID of an attachment record, automatically assigned by Lockstep when this record is added to the Lockstep platform.
40 41 42 |
# File 'lib/lockstep_sdk/models/attachment_link_model.rb', line 40 def @attachment_id end |
#created ⇒ Date-time
Returns The date the Attachment Link was created.
52 53 54 |
# File 'lib/lockstep_sdk/models/attachment_link_model.rb', line 52 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 Attachment Link.
56 57 58 |
# File 'lib/lockstep_sdk/models/attachment_link_model.rb', line 56 def created_user_id @created_user_id 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).
36 37 38 |
# File 'lib/lockstep_sdk/models/attachment_link_model.rb', line 36 def group_key @group_key end |
#object_key ⇒ Uuid
Returns An Attachment is connected to an existing item within the Lockstep Platform by the fields ‘TableKey` and `ObjectKey`. For example, an Attachment 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 Attachment is connected. For more information, see [linking metadata to an object](developer.lockstep.io/docs/custom-fields#linking-metadata-to-an-object).
44 45 46 |
# File 'lib/lockstep_sdk/models/attachment_link_model.rb', line 44 def object_key @object_key end |
#table_key ⇒ String
Returns An Attachment is connected to an existing item within the Lockstep Platform by the fields ‘TableKey` and `ObjectKey`. For example, an Attachment 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 Attachment is connected. For more information, see [linking metadata to an object](developer.lockstep.io/docs/custom-fields#linking-metadata-to-an-object).
48 49 50 |
# File 'lib/lockstep_sdk/models/attachment_link_model.rb', line 48 def table_key @table_key end |
Instance Method Details
#as_json(options = {}) ⇒ object
Returns This object as a JSON key-value structure.
60 61 62 63 64 65 66 67 68 69 |
# File 'lib/lockstep_sdk/models/attachment_link_model.rb', line 60 def as_json(={}) { 'groupKey' => @group_key, 'attachmentId' => @attachment_id, 'objectKey' => @object_key, 'tableKey' => @table_key, 'created' => @created, 'createdUserId' => @created_user_id, } end |
#to_json(*options) ⇒ String
Returns This object converted to a JSON string.
73 74 75 |
# File 'lib/lockstep_sdk/models/attachment_link_model.rb', line 73 def to_json(*) "[#{as_json(*).to_json(*)}]" end |