Current section
Files
Jump to
Current section
Files
lib/docusign/api/template_bulk_recipients.ex
# NOTE: This file is auto generated by OpenAPI Generator 6.2.1 (https://openapi-generator.tech).
# Do not edit this file manually.
defmodule DocuSign.Api.TemplateBulkRecipients do
@moduledoc """
API calls for all endpoints tagged `TemplateBulkRecipients`.
"""
alias DocuSign.Connection
import DocuSign.RequestBuilder
@doc """
Deletes the bulk recipient list on a template.
Deletes the bulk recipient list on a template.
### Parameters
- `connection` (DocuSign.Connection): Connection to server
- `account_id` (String.t): The external account number (int) or account ID GUID.
- `recipient_id` (String.t): A local reference that senders use to map recipients to other objects, such as specific document tabs. Within an envelope, each `recipientId` must be unique, but there is no uniqueness requirement across envelopes. For example, many envelopes assign the first recipient a `recipientId` of `1`.
- `template_id` (String.t): The ID of the template.
- `opts` (keyword): Optional parameters
### Returns
- `{:ok, DocuSign.Model.BulkRecipientsUpdateResponse.t}` on success
- `{:error, Tesla.Env.t}` on failure
"""
@spec recipients_delete_template_bulk_recipients_file(
Tesla.Env.client(),
String.t(),
String.t(),
String.t(),
keyword()
) ::
{:ok, DocuSign.Model.ErrorDetails.t()}
| {:ok, DocuSign.Model.BulkRecipientsUpdateResponse.t()}
| {:error, Tesla.Env.t()}
def recipients_delete_template_bulk_recipients_file(
connection,
account_id,
recipient_id,
template_id,
_opts \\ []
) do
request =
%{}
|> method(:delete)
|> url(
"/v2.1/accounts/#{account_id}/templates/#{template_id}/recipients/#{recipient_id}/bulk_recipients"
)
|> Enum.into([])
connection
|> Connection.request(request)
|> evaluate_response([
{200, %DocuSign.Model.BulkRecipientsUpdateResponse{}},
{400, %DocuSign.Model.ErrorDetails{}}
])
end
@doc """
Gets the bulk recipient file from a template.
Retrieves the bulk recipient file information from a template that has a bulk recipient.
### Parameters
- `connection` (DocuSign.Connection): Connection to server
- `account_id` (String.t): The external account number (int) or account ID GUID.
- `recipient_id` (String.t): A local reference that senders use to map recipients to other objects, such as specific document tabs. Within an envelope, each `recipientId` must be unique, but there is no uniqueness requirement across envelopes. For example, many envelopes assign the first recipient a `recipientId` of `1`.
- `template_id` (String.t): The ID of the template.
- `opts` (keyword): Optional parameters
- `:include_tabs` (String.t): When **true,** the tab information associated with the recipient is included in the response. If you do not specify this parameter, the effect is the default behavior (**false**).
- `: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.BulkRecipientsResponse.t}` on success
- `{:error, Tesla.Env.t}` on failure
"""
@spec recipients_get_template_bulk_recipients(
Tesla.Env.client(),
String.t(),
String.t(),
String.t(),
keyword()
) ::
{:ok, DocuSign.Model.BulkRecipientsResponse.t()}
| {:ok, DocuSign.Model.ErrorDetails.t()}
| {:error, Tesla.Env.t()}
def recipients_get_template_bulk_recipients(
connection,
account_id,
recipient_id,
template_id,
opts \\ []
) do
optional_params = %{
:include_tabs => :query,
:start_position => :query
}
request =
%{}
|> method(:get)
|> url(
"/v2.1/accounts/#{account_id}/templates/#{template_id}/recipients/#{recipient_id}/bulk_recipients"
)
|> add_optional_params(optional_params, opts)
|> Enum.into([])
connection
|> Connection.request(request)
|> evaluate_response([
{200, %DocuSign.Model.BulkRecipientsResponse{}},
{400, %DocuSign.Model.ErrorDetails{}}
])
end
end