Class: AttachmentsClient
- Inherits:
-
Object
- Object
- AttachmentsClient
- Defined in:
- lib/lockstep_sdk/clients/attachments_client.rb
Instance Method Summary collapse
-
#archive_attachment(id:) ⇒ Object
Flag this attachment as archived, which can distinguish between attachments currently active and attachments not intended for active use.
-
#download_attachment(id:) ⇒ Object
Returns a URI for the Attachment file to be downloaded, based on the ID provided.
-
#initialize(lockstepsdk) ⇒ AttachmentsClient
constructor
Initialize the AttachmentsClient class with a lockstepsdk instance.
-
#query_attachments(filter:, include_param:, order:, page_size:, page_number:) ⇒ Object
Queries Attachments for this account using the specified filtering, sorting, nested fetch, and pagination rules requested.
-
#retrieve_attachment(id:, include_param:) ⇒ Object
Retrieves the Attachment with the provided Attachment identifier.
-
#update_attachment(id:, body:) ⇒ Object
Updates an existing Attachment with the information supplied to this PATCH call.
-
#upload_attachment(table_name:, object_id:) ⇒ Object
Uploads and creates one or more Attachments from the provided arguments.
Constructor Details
#initialize(lockstepsdk) ⇒ AttachmentsClient
Initialize the AttachmentsClient class with a lockstepsdk instance.
25 26 27 |
# File 'lib/lockstep_sdk/clients/attachments_client.rb', line 25 def initialize(lockstepsdk) @lockstepsdk = lockstepsdk end |
Instance Method Details
#archive_attachment(id:) ⇒ Object
Flag this attachment as archived, which can distinguish between attachments currently active and attachments not intended for active use. This is similar to deletion but preserves information about the record's existence.
An Attachment is a file that can be attached to various account attributes within Lockstep. Attachments can be used for invoices, bills, or any other external files that you wish to track and have access to. Attachments represents an Attachment and a number of different metadata attributes related to the creation, storage, and ownership of the Attachment.
See [Extensibility](developer.lockstep.io/docs/extensibility) for more information.
69 70 71 72 |
# File 'lib/lockstep_sdk/clients/attachments_client.rb', line 69 def (id:) path = "/api/v1/Attachments/#{id}" @lockstepsdk.request(:delete, path, nil, nil) end |
#download_attachment(id:) ⇒ Object
Returns a URI for the Attachment file to be downloaded, based on the ID provided.
An Attachment is a file that can be attached to various account attributes within Lockstep. Attachments can be used for invoices, bills, or any other external files that you wish to track and have access to. Attachments represents an Attachment and a number of different metadata attributes related to the creation, storage, and ownership of the Attachment.
See [Extensibility](developer.lockstep.io/docs/extensibility) for more information.
82 83 84 85 |
# File 'lib/lockstep_sdk/clients/attachments_client.rb', line 82 def (id:) path = "/api/v1/Attachments/#{id}/download" @lockstepsdk.request(:get, path, nil, nil) end |
#query_attachments(filter:, include_param:, order:, page_size:, page_number:) ⇒ Object
Queries Attachments for this account using the specified filtering, sorting, nested fetch, and pagination rules requested.
More information on querying can be found on the [Searchlight Query Language](developer.lockstep.io/docs/querying-with-searchlight) page on the Lockstep Developer website.
An Attachment is a file that can be attached to various account attributes within Lockstep. Attachments can be used for invoices, bills, or any other external files that you wish to track and have access to. Attachments represents an Attachment and a number of different metadata attributes related to the creation, storage, and ownership of the Attachment.
See [Extensibility](developer.lockstep.io/docs/extensibility) for more information.
116 117 118 119 120 |
# File 'lib/lockstep_sdk/clients/attachments_client.rb', line 116 def (filter:, include_param:, order:, page_size:, page_number:) path = "/api/v1/Attachments/query" params = {:filter => filter, :include => include_param, :order => order, :pageSize => page_size, :pageNumber => page_number} @lockstepsdk.request(:get, path, nil, params) end |
#retrieve_attachment(id:, include_param:) ⇒ Object
Retrieves the Attachment with the provided Attachment identifier.
An Attachment is a file that can be attached to various account attributes within Lockstep. Attachments can be used for invoices, bills, or any other external files that you wish to track and have access to. Attachments represents an Attachment and a number of different metadata attributes related to the creation, storage, and ownership of the Attachment.
See [Extensibility](developer.lockstep.io/docs/extensibility) for more information.
39 40 41 42 43 |
# File 'lib/lockstep_sdk/clients/attachments_client.rb', line 39 def (id:, include_param:) path = "/api/v1/Attachments/#{id}" params = {:include => include_param} @lockstepsdk.request(:get, path, nil, params) end |
#update_attachment(id:, body:) ⇒ Object
Updates an existing Attachment with the information supplied to this PATCH call.
The PATCH method allows you to change specific values on the object while leaving other values alone. As input you should supply a list of field names and new values. If you do not provide the name of a field, that field will remain unchanged. This allows you to ensure that you are only updating the specific fields desired.
An Attachment is a file that can be attached to various account attributes within Lockstep. Attachments can be used for invoices, bills, or any other external files that you wish to track and have access to. Attachments represents an Attachment and a number of different metadata attributes related to the creation, storage, and ownership of the Attachment.
See [Extensibility](developer.lockstep.io/docs/extensibility) for more information.
56 57 58 59 |
# File 'lib/lockstep_sdk/clients/attachments_client.rb', line 56 def (id:, body:) path = "/api/v1/Attachments/#{id}" @lockstepsdk.request(:patch, path, body.to_camelback_keys.to_json, nil) end |
#upload_attachment(table_name:, object_id:) ⇒ Object
Uploads and creates one or more Attachments from the provided arguments.
An Attachment is a file that can be attached to various account attributes within Lockstep. Attachments can be used for invoices, bills, or any other external files that you wish to track and have access to. Attachments represents an Attachment and a number of different metadata attributes related to the creation, storage, and ownership of the Attachment.
See [Extensibility](developer.lockstep.io/docs/extensibility) for more information.
96 97 98 99 100 |
# File 'lib/lockstep_sdk/clients/attachments_client.rb', line 96 def (table_name:, object_id:) path = "/api/v1/Attachments" params = {:tableName => table_name, :objectId => object_id} @lockstepsdk.request(:post, path, nil, params) end |