Class: LockstepSdk::AttachmentModel
- Inherits:
-
Object
- Object
- LockstepSdk::AttachmentModel
- Defined in:
- lib/lockstep_sdk/models/attachment_model.rb
Overview
An Attachment is a file that can be attached to various account attributes within Lockstep. This data model contains metadata about the attachment. You can upload and download attachments into the Lockstep Platform along with this metadata. Attachments can be used for invoices, payments, legal documents, or any other external files that you wish to track.
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.
-
#attachment_id ⇒ Uuid
The unique ID of this record, automatically assigned by Lockstep when this record is added to the Lockstep platform.
-
#attachment_type ⇒ String
A text string describing the type of this Attachment.
-
#created ⇒ Date-time
The date the attachment was created.
-
#created_user_id ⇒ Uuid
The unique ID of the [UserAccount](developer.lockstep.io/docs/useraccountmodel) of the user who created this Attachment.
-
#erp_key ⇒ String
The unique ID of this record as it was known in its originating financial system.
-
#file_ext ⇒ String
An Attachment represents a file that was uploaded to the Lockstep Platform.
-
#file_name ⇒ String
An Attachment represents a file that was uploaded to the Lockstep Platform.
-
#group_key ⇒ Uuid
The GroupKey uniquely identifies a single Lockstep Platform account.
-
#is_archived ⇒ Boolean
A flag indicating whether this Attachment is archived (also known as hidden or deleted).
-
#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 = {}) ⇒ 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
30 31 32 33 34 35 36 37 38 39 40 41 42 43 |
# File 'lib/lockstep_sdk/models/attachment_model.rb', line 30 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) @is_archived = params.dig(:is_archived) @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) @attachment_type = params.dig(:attachment_type) end |
Instance Attribute Details
#app_enrollment_id ⇒ Uuid
79 80 81 |
# File 'lib/lockstep_sdk/models/attachment_model.rb', line 79 def app_enrollment_id @app_enrollment_id end |
#attachment_id ⇒ Uuid
47 48 49 |
# File 'lib/lockstep_sdk/models/attachment_model.rb', line 47 def @attachment_id end |
#attachment_type ⇒ String
91 92 93 |
# File 'lib/lockstep_sdk/models/attachment_model.rb', line 91 def @attachment_type end |
#created ⇒ Date-time
83 84 85 |
# File 'lib/lockstep_sdk/models/attachment_model.rb', line 83 def created @created end |
#created_user_id ⇒ Uuid
87 88 89 |
# File 'lib/lockstep_sdk/models/attachment_model.rb', line 87 def created_user_id @created_user_id end |
#erp_key ⇒ String
75 76 77 |
# File 'lib/lockstep_sdk/models/attachment_model.rb', line 75 def erp_key @erp_key end |
#file_ext ⇒ String
67 68 69 |
# File 'lib/lockstep_sdk/models/attachment_model.rb', line 67 def file_ext @file_ext end |
#file_name ⇒ String
63 64 65 |
# File 'lib/lockstep_sdk/models/attachment_model.rb', line 63 def file_name @file_name end |
#group_key ⇒ Uuid
51 52 53 |
# File 'lib/lockstep_sdk/models/attachment_model.rb', line 51 def group_key @group_key end |
#is_archived ⇒ Boolean
71 72 73 |
# File 'lib/lockstep_sdk/models/attachment_model.rb', line 71 def is_archived @is_archived end |
#object_key ⇒ Uuid
59 60 61 |
# File 'lib/lockstep_sdk/models/attachment_model.rb', line 59 def object_key @object_key end |
#table_key ⇒ String
55 56 57 |
# File 'lib/lockstep_sdk/models/attachment_model.rb', line 55 def table_key @table_key end |
Instance Method Details
#as_json(options = {}) ⇒ object
95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 |
# File 'lib/lockstep_sdk/models/attachment_model.rb', line 95 def as_json(={}) { 'attachmentId' => @attachment_id, 'groupKey' => @group_key, 'tableKey' => @table_key, 'objectKey' => @object_key, 'fileName' => @file_name, 'fileExt' => @file_ext, 'isArchived' => @is_archived, 'erpKey' => @erp_key, 'appEnrollmentId' => @app_enrollment_id, 'created' => @created, 'createdUserId' => @created_user_id, 'attachmentType' => @attachment_type, } end |
#to_json(*options) ⇒ String
114 115 116 |
# File 'lib/lockstep_sdk/models/attachment_model.rb', line 114 def to_json(*) "[#{as_json(*).to_json(*)}]" end |