Current section

Files

Jump to
docusign lib docusign api cloud_storage.ex
Raw

lib/docusign/api/cloud_storage.ex

# NOTE: This file is auto generated by OpenAPI Generator 6.4.0 (https://openapi-generator.tech).
# Do not edit this file manually.
defmodule DocuSign.Api.CloudStorage do
@moduledoc """
API calls for all endpoints tagged `CloudStorage`.
"""
alias DocuSign.Connection
import DocuSign.RequestBuilder
@doc """
Gets a list of items from a cloud storage provider.
Retrieves a list of the user's items from the specified cloud storage provider. To limit the scope of the items returned, provide a comma-separated list of folder IDs in the request.
### Parameters
- `connection` (DocuSign.Connection): Connection to server
- `account_id` (String.t): The external account number (int) or account ID GUID.
- `folder_id` (String.t): The ID of the folder.
- `service_id` (String.t): The ID of the service to access. Valid values are the service name (\"Box\") or the numerical serviceId (\"4136\").
- `user_id` (String.t): The ID of the user to access. **Note:** Users can only access their own information. A user, even one with Admin rights, cannot access another user's settings.
- `opts` (keyword): Optional parameters
- `:cloud_storage_folder_path` (String.t): The file path to a cloud storage folder.
- `:cloud_storage_folderid_plain` (String.t): A plain-text folder ID that you can use as an alternative to the existing folder id. This property is mainly used for rooms. Enter multiple folder IDs as a comma-separated list.
- `:count` (String.t): The maximum number of results to return. Use `start_position` to specify the number of results to skip. Default: `25`
- `:order` (String.t): The order in which to sort the results. Valid values are: * `asc`: Ascending order. * `desc`: Descending order.
- `:order_by` (String.t): The file attribute to use to sort the results. Valid values are: * `modified` * `name`
- `:search_text` (String.t): Use this parameter to search for specific text.
- `:start_position` (String.t): The zero-based index of the result from which to start returning results. Use with `count` to limit the number of results. The default value is `0`.
### Returns
- `{:ok, DocuSign.Model.ExternalFolder.t}` on success
- `{:error, Tesla.Env.t}` on failure
"""
@spec cloud_storage_folder_get_cloud_storage_folder(
Tesla.Env.client(),
String.t(),
String.t(),
String.t(),
String.t(),
keyword()
) ::
{:ok, DocuSign.Model.ExternalFolder.t()}
| {:ok, DocuSign.Model.ErrorDetails.t()}
| {:error, Tesla.Env.t()}
def cloud_storage_folder_get_cloud_storage_folder(
connection,
account_id,
folder_id,
service_id,
user_id,
opts \\ []
) do
optional_params = %{
:cloud_storage_folder_path => :query,
:cloud_storage_folderid_plain => :query,
:count => :query,
:order => :query,
:order_by => :query,
:search_text => :query,
:start_position => :query
}
request =
%{}
|> method(:get)
|> url(
"/v2.1/accounts/#{account_id}/users/#{user_id}/cloud_storage/#{service_id}/folders/#{folder_id}"
)
|> add_optional_params(optional_params, opts)
|> Enum.into([])
connection
|> Connection.request(request)
|> evaluate_response([
{200, %DocuSign.Model.ExternalFolder{}},
{400, %DocuSign.Model.ErrorDetails{}}
])
end
@doc """
Retrieves a list of all the items in a specified folder from the specified cloud storage provider.
Retrieves a list of all the items in a specified folder from the specified cloud storage provider.
### Parameters
- `connection` (DocuSign.Connection): Connection to server
- `account_id` (String.t): The external account number (int) or account ID GUID.
- `service_id` (String.t): The ID of the service to access. Valid values are the service name (\"Box\") or the numerical serviceId (\"4136\").
- `user_id` (String.t): The ID of the user to access. **Note:** Users can only access their own information. A user, even one with Admin rights, cannot access another user's settings.
- `opts` (keyword): Optional parameters
- `:cloud_storage_folder_path` (String.t): A comma separated list of folder IDs included in the request.
- `:count` (String.t): The maximum number of results to return. Use `start_position` to specify the number of results to skip. Default: `25`
- `:order` (String.t): The order in which to sort the results. Valid values are: * `asc`: Ascending order. * `desc`: Descending order.
- `:order_by` (String.t): The file attribute to use to sort the results. Valid values are: * `modified` * `name`
- `:search_text` (String.t): Use this parameter to search for specific text.
- `:start_position` (String.t): The zero-based index of the result from which to start returning results. Use with `count` to limit the number of results. The default value is `0`.
### Returns
- `{:ok, DocuSign.Model.ExternalFolder.t}` on success
- `{:error, Tesla.Env.t}` on failure
"""
@spec cloud_storage_folder_get_cloud_storage_folder_all(
Tesla.Env.client(),
String.t(),
String.t(),
String.t(),
keyword()
) ::
{:ok, DocuSign.Model.ExternalFolder.t()}
| {:ok, DocuSign.Model.ErrorDetails.t()}
| {:error, Tesla.Env.t()}
def cloud_storage_folder_get_cloud_storage_folder_all(
connection,
account_id,
service_id,
user_id,
opts \\ []
) do
optional_params = %{
:cloud_storage_folder_path => :query,
:count => :query,
:order => :query,
:order_by => :query,
:search_text => :query,
:start_position => :query
}
request =
%{}
|> method(:get)
|> url("/v2.1/accounts/#{account_id}/users/#{user_id}/cloud_storage/#{service_id}/folders")
|> add_optional_params(optional_params, opts)
|> Enum.into([])
connection
|> Connection.request(request)
|> evaluate_response([
{200, %DocuSign.Model.ExternalFolder{}},
{400, %DocuSign.Model.ErrorDetails{}}
])
end
end