Current section

Files

Jump to
docusign lib docusign api connect_events.ex
Raw

lib/docusign/api/connect_events.ex

# NOTE: This class is auto generated by the swagger code generator program.
# https://github.com/swagger-api/swagger-codegen.git
# Do not edit the class manually.
defmodule DocuSign.Api.ConnectEvents do
@moduledoc """
API calls for all endpoints tagged `ConnectEvents`.
"""
alias DocuSign.Connection
import DocuSign.RequestBuilder
@doc """
Deletes a Connect failure log entry.
Deletes the Connect failure log information for the specified entry.
## Parameters
- connection (DocuSign.Connection): Connection to server
- account_id (String.t): The external account number (int) or account ID Guid.
- failure_id (String.t): The ID of the failed connect log entry.
- opts (KeywordList): [optional] Optional parameters
## Returns
{:ok, %{}} on success
{:error, info} on failure
"""
@spec connect_failures_delete_connect_failure_log(
Tesla.Env.client(),
String.t(),
String.t(),
keyword()
) :: {:ok, nil} | {:error, Tesla.Env.t()}
def connect_failures_delete_connect_failure_log(connection, account_id, failure_id, _opts \\ []) do
%{}
|> method(:delete)
|> url("/v2/accounts/#{account_id}/connect/failures/#{failure_id}")
|> Enum.into([])
|> (&Connection.request(connection, &1)).()
|> decode(false)
end
@doc """
Gets the Connect failure log information.
Retrieves the Connect Failure Log information. It can be used to determine which envelopes failed to post, so a republish request can be created.
## Parameters
- connection (DocuSign.Connection): Connection to server
- account_id (String.t): The external account number (int) or account ID Guid.
- opts (KeywordList): [optional] Optional parameters
- :from_date (String.t): Start of the search date range. Only returns templates created on or after this date/time. If no value is specified, there is no limit on the earliest date created.
- :to_date (String.t): End of the search date range. Only returns templates created up to this date/time. If no value is provided, this defaults to the current date.
## Returns
{:ok, %DocuSign.Model.ConnectEvents{}} on success
{:error, info} on failure
"""
@spec connect_failures_get_connect_logs(Tesla.Env.client(), String.t(), keyword()) ::
{:ok, DocuSign.Model.ConnectEvents.t()} | {:error, Tesla.Env.t()}
def connect_failures_get_connect_logs(connection, account_id, opts \\ []) do
optional_params = %{
from_date: :query,
to_date: :query
}
%{}
|> method(:get)
|> url("/v2/accounts/#{account_id}/connect/failures")
|> add_optional_params(optional_params, opts)
|> Enum.into([])
|> (&Connection.request(connection, &1)).()
|> decode(%DocuSign.Model.ConnectEvents{})
end
@doc """
Deletes a specified Connect log entry.
Deletes a specified entry from the Connect Log.
## Parameters
- connection (DocuSign.Connection): Connection to server
- account_id (String.t): The external account number (int) or account ID Guid.
- log_id (String.t): The ID of the connect log entry
- opts (KeywordList): [optional] Optional parameters
## Returns
{:ok, %{}} on success
{:error, info} on failure
"""
@spec connect_log_delete_connect_log(Tesla.Env.client(), String.t(), String.t(), keyword()) ::
{:ok, nil} | {:error, Tesla.Env.t()}
def connect_log_delete_connect_log(connection, account_id, log_id, _opts \\ []) do
%{}
|> method(:delete)
|> url("/v2/accounts/#{account_id}/connect/logs/#{log_id}")
|> Enum.into([])
|> (&Connection.request(connection, &1)).()
|> decode(false)
end
@doc """
Gets a list of Connect log entries.
Retrieves a list of connect log entries for your account. ###### Note: The `enableLog` property in the Connect configuration must be set to **true** to enable logging. If logging is not enabled, then no log entries are recorded.
## Parameters
- connection (DocuSign.Connection): Connection to server
- account_id (String.t): The external account number (int) or account ID Guid.
- opts (KeywordList): [optional] Optional parameters
## Returns
{:ok, %{}} on success
{:error, info} on failure
"""
@spec connect_log_delete_connect_logs(Tesla.Env.client(), String.t(), keyword()) ::
{:ok, nil} | {:error, Tesla.Env.t()}
def connect_log_delete_connect_logs(connection, account_id, _opts \\ []) do
%{}
|> method(:delete)
|> url("/v2/accounts/#{account_id}/connect/logs")
|> Enum.into([])
|> (&Connection.request(connection, &1)).()
|> decode(false)
end
@doc """
Get the specified Connect log entry.
Retrieves the specified Connect log entry for your account. ###### Note: The `enableLog` setting in the Connect configuration must be set to true to enable logging. If logging is not enabled, then no log entries are recorded.
## Parameters
- connection (DocuSign.Connection): Connection to server
- account_id (String.t): The external account number (int) or account ID Guid.
- log_id (String.t): The ID of the connect log entry
- opts (KeywordList): [optional] Optional parameters
- :additional_info (String.t): When true, the connectDebugLog information is included in the response.
## Returns
{:ok, %DocuSign.Model.ConnectLog{}} on success
{:error, info} on failure
"""
@spec connect_log_get_connect_log(Tesla.Env.client(), String.t(), String.t(), keyword()) ::
{:ok, DocuSign.Model.ConnectLog.t()} | {:error, Tesla.Env.t()}
def connect_log_get_connect_log(connection, account_id, log_id, opts \\ []) do
optional_params = %{
additional_info: :query
}
%{}
|> method(:get)
|> url("/v2/accounts/#{account_id}/connect/logs/#{log_id}")
|> add_optional_params(optional_params, opts)
|> Enum.into([])
|> (&Connection.request(connection, &1)).()
|> decode(%DocuSign.Model.ConnectLog{})
end
@doc """
Gets the Connect log.
Retrieves a list of connect log entries for your account. ###### Note: The `enableLog` setting in the Connect configuration must be set to true to enable logging. If logging is not enabled, then no log entries are recorded.
## Parameters
- connection (DocuSign.Connection): Connection to server
- account_id (String.t): The external account number (int) or account ID Guid.
- opts (KeywordList): [optional] Optional parameters
- :from_date (String.t): Start of the search date range. Only returns templates created on or after this date/time. If no value is specified, there is no limit on the earliest date created.
- :to_date (String.t): End of the search date range. Only returns templates created up to this date/time. If no value is provided, this defaults to the current date.
## Returns
{:ok, %DocuSign.Model.ConnectEvents{}} on success
{:error, info} on failure
"""
@spec connect_log_get_connect_logs(Tesla.Env.client(), String.t(), keyword()) ::
{:ok, DocuSign.Model.ConnectEvents.t()} | {:error, Tesla.Env.t()}
def connect_log_get_connect_logs(connection, account_id, opts \\ []) do
optional_params = %{
from_date: :query,
to_date: :query
}
%{}
|> method(:get)
|> url("/v2/accounts/#{account_id}/connect/logs")
|> add_optional_params(optional_params, opts)
|> Enum.into([])
|> (&Connection.request(connection, &1)).()
|> decode(%DocuSign.Model.ConnectEvents{})
end
@doc """
Republishes Connect information for multiple envelopes.
Republishes Connect information for the specified set of envelopes. The primary use is to republish Connect post failures by including envelope IDs for the envelopes that failed to post in the request. The list of envelope IDs that failed to post correctly can be retrieved by calling to [ML:GetConnectLog] retrieve the failure log.
## Parameters
- connection (DocuSign.Connection): Connection to server
- account_id (String.t): The external account number (int) or account ID Guid.
- opts (KeywordList): [optional] Optional parameters
- :connect_failure_filter (ConnectFailureFilter):
## Returns
{:ok, %DocuSign.Model.ConnectFailureResults{}} on success
{:error, info} on failure
"""
@spec connect_publish_put_connect_retry(Tesla.Env.client(), String.t(), keyword()) ::
{:ok, DocuSign.Model.ConnectFailureResults.t()} | {:error, Tesla.Env.t()}
def connect_publish_put_connect_retry(connection, account_id, opts \\ []) do
optional_params = %{
connectFailureFilter: :body
}
%{}
|> method(:put)
|> url("/v2/accounts/#{account_id}/connect/envelopes/retry_queue")
|> add_optional_params(optional_params, opts)
|> Enum.into([])
|> (&Connection.request(connection, &1)).()
|> decode(%DocuSign.Model.ConnectFailureResults{})
end
@doc """
Republishes Connect information for the specified envelope.
Republishes Connect information for the specified envelope.
## Parameters
- connection (DocuSign.Connection): Connection to server
- account_id (String.t): The external account number (int) or account ID Guid.
- envelope_id (String.t): The envelope's GUID. Eg 93be49ab-afa0-4adf-933c-f752070d71ec
- opts (KeywordList): [optional] Optional parameters
## Returns
{:ok, %DocuSign.Model.ConnectFailureResults{}} on success
{:error, info} on failure
"""
@spec connect_publish_put_connect_retry_by_envelope(
Tesla.Env.client(),
String.t(),
String.t(),
keyword()
) :: {:ok, DocuSign.Model.ConnectFailureResults.t()} | {:error, Tesla.Env.t()}
def connect_publish_put_connect_retry_by_envelope(
connection,
account_id,
envelope_id,
_opts \\ []
) do
%{}
|> method(:put)
|> url("/v2/accounts/#{account_id}/connect/envelopes/#{envelope_id}/retry_queue")
|> Enum.into([])
|> (&Connection.request(connection, &1)).()
|> decode(%DocuSign.Model.ConnectFailureResults{})
end
end