Class: LockstepSdk::AttachmentModel
- Inherits:
-
Object
- Object
- LockstepSdk::AttachmentModel
- Defined in:
- lib/lockstep_sdk/models/attachment_model.rb
Overview
Represents a user uploaded attachment
Instance Attribute Summary collapse
-
#app_enrollment_id ⇒ Uuid
The AppEnrollmentId of the application that imported this record.
-
#attachment_id ⇒ Uuid
The unique ID of this record, automatically assigned by Lockstep when this record is added to the Lockstep platform.
-
#attachment_type_id ⇒ Uuid
Corresponding AttachmentType object to describe this attachment.
-
#created ⇒ Date-time
The date the attachment was created.
-
#created_user_id ⇒ Uuid
Id of the user who made the file.
-
#erp_key ⇒ String
The unique ID of this record as it was known in its originating financial system.
-
#file_ext ⇒ String
Extension type of the file.
-
#file_name ⇒ String
Name of the file.
-
#group_key ⇒ Uuid
The GroupKey uniquely identifies a single Lockstep Platform account.
-
#is_archived ⇒ Boolean
Flag indicating the attachment was archived.
-
#object_key ⇒ Uuid
The ID of the object the attachment is associated with.
-
#origin_attachment_id ⇒ Uuid
Tracks the original record for this attachment, not currently used.
-
#table_key ⇒ String
The name of the table the attachment is associated with.
-
#view_external ⇒ Boolean
Flag for if Vendors and customers can see this file.
-
#view_internal ⇒ Boolean
Flag for if LS clients can see this file.
Instance Method Summary collapse
-
#as_json(options = {}) ⇒ object
This object as a JSON key-value structure.
-
#initialize(params = {}) ⇒ AttachmentModel
constructor
Initialize the AttachmentModel using the provided prototype.
-
#to_json(*options) ⇒ String
This object converted to a JSON string.
Constructor Details
#initialize(params = {}) ⇒ AttachmentModel
Initialize the AttachmentModel using the provided prototype
27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 |
# File 'lib/lockstep_sdk/models/attachment_model.rb', line 27 def initialize(params = {}) @attachment_id = params.dig(:attachment_id) @group_key = params.dig(:group_key) @table_key = params.dig(:table_key) @object_key = params.dig(:object_key) @file_name = params.dig(:file_name) @file_ext = params.dig(:file_ext) @attachment_type_id = params.dig(:attachment_type_id) @is_archived = params.dig(:is_archived) @origin_attachment_id = params.dig(:origin_attachment_id) @view_internal = params.dig(:view_internal) @view_external = params.dig(:view_external) @erp_key = params.dig(:erp_key) @app_enrollment_id = params.dig(:app_enrollment_id) @created = params.dig(:created) @created_user_id = params.dig(:created_user_id) 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.
95 96 97 |
# File 'lib/lockstep_sdk/models/attachment_model.rb', line 95 def app_enrollment_id @app_enrollment_id end |
#attachment_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/attachment_model.rb', line 47 def @attachment_id end |
#attachment_type_id ⇒ Uuid
Returns Corresponding AttachmentType object to describe this attachment.
71 72 73 |
# File 'lib/lockstep_sdk/models/attachment_model.rb', line 71 def @attachment_type_id end |
#created ⇒ Date-time
Returns The date the attachment was created.
99 100 101 |
# File 'lib/lockstep_sdk/models/attachment_model.rb', line 99 def created @created end |
#created_user_id ⇒ Uuid
Returns Id of the user who made the file.
103 104 105 |
# File 'lib/lockstep_sdk/models/attachment_model.rb', line 103 def created_user_id @created_user_id end |
#erp_key ⇒ String
Returns The unique ID of this record as it was known in its originating financial system. If this company record was imported from a financial system, it will have the value ‘ErpKey` set to the original primary key number of the record as it was known in the originating financial system. If this record was not imported from a financial system, this value will be `null`. For more information, see [Identity Columns](developer.lockstep.io/docs/identity-columns).
91 92 93 |
# File 'lib/lockstep_sdk/models/attachment_model.rb', line 91 def erp_key @erp_key end |
#file_ext ⇒ String
Returns Extension type of the file.
67 68 69 |
# File 'lib/lockstep_sdk/models/attachment_model.rb', line 67 def file_ext @file_ext end |
#file_name ⇒ String
Returns Name of the file.
63 64 65 |
# File 'lib/lockstep_sdk/models/attachment_model.rb', line 63 def file_name @file_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/attachment_model.rb', line 51 def group_key @group_key end |
#is_archived ⇒ Boolean
Returns Flag indicating the attachment was archived.
75 76 77 |
# File 'lib/lockstep_sdk/models/attachment_model.rb', line 75 def is_archived @is_archived end |
#object_key ⇒ Uuid
Returns The ID of the object the attachment is associated with.
59 60 61 |
# File 'lib/lockstep_sdk/models/attachment_model.rb', line 59 def object_key @object_key end |
#origin_attachment_id ⇒ Uuid
Returns Tracks the original record for this attachment, not currently used.
79 80 81 |
# File 'lib/lockstep_sdk/models/attachment_model.rb', line 79 def @origin_attachment_id end |
#table_key ⇒ String
Returns The name of the table the attachment is associated with.
55 56 57 |
# File 'lib/lockstep_sdk/models/attachment_model.rb', line 55 def table_key @table_key end |
#view_external ⇒ Boolean
Returns Flag for if Vendors and customers can see this file.
87 88 89 |
# File 'lib/lockstep_sdk/models/attachment_model.rb', line 87 def view_external @view_external end |
#view_internal ⇒ Boolean
Returns Flag for if LS clients can see this file.
83 84 85 |
# File 'lib/lockstep_sdk/models/attachment_model.rb', line 83 def view_internal @view_internal end |
Instance Method Details
#as_json(options = {}) ⇒ object
Returns This object as a JSON key-value structure.
107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 |
# File 'lib/lockstep_sdk/models/attachment_model.rb', line 107 def as_json(={}) { 'attachmentId' => @attachment_id, 'groupKey' => @group_key, 'tableKey' => @table_key, 'objectKey' => @object_key, 'fileName' => @file_name, 'fileExt' => @file_ext, 'attachmentTypeId' => @attachment_type_id, 'isArchived' => @is_archived, 'originAttachmentId' => @origin_attachment_id, 'viewInternal' => @view_internal, 'viewExternal' => @view_external, 'erpKey' => @erp_key, 'appEnrollmentId' => @app_enrollment_id, 'created' => @created, 'createdUserId' => @created_user_id, } end |
#to_json(*options) ⇒ String
Returns This object converted to a JSON string.
129 130 131 |
# File 'lib/lockstep_sdk/models/attachment_model.rb', line 129 def to_json(*) "[#{as_json(*).to_json(*)}]" end |