(file)
- create_storage_file - Create a file
- get_storage_file - Retrieve a file
- list_storage_files - List all files
- patch_storage_file - Update a file
- remove_storage_file - Remove a file
- update_storage_file - Update a file
Create a file
require 'unified_ruby_sdk'
s = ::UnifiedRubySDK::UnifiedTo.new
s.config_security(
::UnifiedRubySDK::Shared::Security.new(
jwt: "<YOUR_API_KEY_HERE>",
)
)
res = s.file.create_storage_file(connection_id="<id>", storage_file=::UnifiedRubySDK::Shared::StorageFile.new(), fields_=[
"<value>",
])
if ! res.storage_file.nil?
# handle response
end
Parameter | Type | Required | Description |
---|---|---|---|
connection_id |
::String | ✔️ | ID of the connection |
storage_file |
T.nilable(::UnifiedRubySDK::Shared::StorageFile) | ➖ | N/A |
fields_ |
T::Array<::String> | ➖ | Comma-delimited fields to return |
T.nilable(::UnifiedRubySDK::Operations::CreateStorageFileResponse)
Retrieve a file
require 'unified_ruby_sdk'
s = ::UnifiedRubySDK::UnifiedTo.new
s.config_security(
::UnifiedRubySDK::Shared::Security.new(
jwt: "<YOUR_API_KEY_HERE>",
)
)
res = s.file.get_storage_file(connection_id="<id>", id="<id>", fields_=[
"<value>",
])
if ! res.storage_file.nil?
# handle response
end
Parameter | Type | Required | Description |
---|---|---|---|
connection_id |
::String | ✔️ | ID of the connection |
id |
::String | ✔️ | ID of the File |
fields_ |
T::Array<::String> | ➖ | Comma-delimited fields to return |
T.nilable(::UnifiedRubySDK::Operations::GetStorageFileResponse)
List all files
require 'unified_ruby_sdk'
s = ::UnifiedRubySDK::UnifiedTo.new
s.config_security(
::UnifiedRubySDK::Shared::Security.new(
jwt: "<YOUR_API_KEY_HERE>",
)
)
req = ::UnifiedRubySDK::Operations::ListStorageFilesRequest.new(
connection_id: "<id>",
)
res = s.file.list_storage_files(req)
if ! res.storage_files.nil?
# handle response
end
Parameter | Type | Required | Description |
---|---|---|---|
request |
::UnifiedRubySDK::Operations::ListStorageFilesRequest | ✔️ | The request object to use for the request. |
T.nilable(::UnifiedRubySDK::Operations::ListStorageFilesResponse)
Update a file
require 'unified_ruby_sdk'
s = ::UnifiedRubySDK::UnifiedTo.new
s.config_security(
::UnifiedRubySDK::Shared::Security.new(
jwt: "<YOUR_API_KEY_HERE>",
)
)
res = s.file.patch_storage_file(connection_id="<id>", id="<id>", storage_file=::UnifiedRubySDK::Shared::StorageFile.new(), fields_=[
"<value>",
])
if ! res.storage_file.nil?
# handle response
end
Parameter | Type | Required | Description |
---|---|---|---|
connection_id |
::String | ✔️ | ID of the connection |
id |
::String | ✔️ | ID of the File |
storage_file |
T.nilable(::UnifiedRubySDK::Shared::StorageFile) | ➖ | N/A |
fields_ |
T::Array<::String> | ➖ | Comma-delimited fields to return |
T.nilable(::UnifiedRubySDK::Operations::PatchStorageFileResponse)
Remove a file
require 'unified_ruby_sdk'
s = ::UnifiedRubySDK::UnifiedTo.new
s.config_security(
::UnifiedRubySDK::Shared::Security.new(
jwt: "<YOUR_API_KEY_HERE>",
)
)
res = s.file.remove_storage_file(connection_id="<id>", id="<id>")
if res.status_code == 200
# handle response
end
Parameter | Type | Required | Description |
---|---|---|---|
connection_id |
::String | ✔️ | ID of the connection |
id |
::String | ✔️ | ID of the File |
T.nilable(::UnifiedRubySDK::Operations::RemoveStorageFileResponse)
Update a file
require 'unified_ruby_sdk'
s = ::UnifiedRubySDK::UnifiedTo.new
s.config_security(
::UnifiedRubySDK::Shared::Security.new(
jwt: "<YOUR_API_KEY_HERE>",
)
)
res = s.file.update_storage_file(connection_id="<id>", id="<id>", storage_file=::UnifiedRubySDK::Shared::StorageFile.new(), fields_=[
"<value>",
])
if ! res.storage_file.nil?
# handle response
end
Parameter | Type | Required | Description |
---|---|---|---|
connection_id |
::String | ✔️ | ID of the connection |
id |
::String | ✔️ | ID of the File |
storage_file |
T.nilable(::UnifiedRubySDK::Shared::StorageFile) | ➖ | N/A |
fields_ |
T::Array<::String> | ➖ | Comma-delimited fields to return |
T.nilable(::UnifiedRubySDK::Operations::UpdateStorageFileResponse)