Current section

Files

Jump to
docusign lib docusign api envelope_recipient_tabs.ex
Raw

lib/docusign/api/envelope_recipient_tabs.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.EnvelopeRecipientTabs do
@moduledoc """
API calls for all endpoints tagged `EnvelopeRecipientTabs`.
"""
alias DocuSign.Connection
import DocuSign.RequestBuilder
@doc """
Deletes the tabs associated with a recipient.
Deletes one or more tabs associated with a recipient in a draft 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
- recipient_id (String.t): The `recipientId` used when the envelope or template was created.
- opts (KeywordList): [optional] Optional parameters
- :envelope_recipient_tabs (EnvelopeRecipientTabs):
## Returns
{:ok, %DocuSign.Model.EnvelopeRecipientTabs{}} on success
{:error, info} on failure
"""
@spec recipients_delete_recipient_tabs(
Tesla.Env.client(),
String.t(),
String.t(),
String.t(),
keyword()
) :: {:ok, DocuSign.Model.EnvelopeRecipientTabs.t()} | {:error, Tesla.Env.t()}
def recipients_delete_recipient_tabs(
connection,
account_id,
envelope_id,
recipient_id,
opts \\ []
) do
optional_params = %{
EnvelopeRecipientTabs: :body
}
%{}
|> method(:delete)
|> url("/v2/accounts/#{account_id}/envelopes/#{envelope_id}/recipients/#{recipient_id}/tabs")
|> add_optional_params(optional_params, opts)
|> Enum.into([])
|> (&Connection.request(connection, &1)).()
|> decode(%DocuSign.Model.EnvelopeRecipientTabs{})
end
@doc """
Gets the tabs information for a signer or sign-in-person recipient in an envelope.
Retrieves information about the tabs associated with a recipient in a draft 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
- recipient_id (String.t): The `recipientId` used when the envelope or template was created.
- opts (KeywordList): [optional] Optional parameters
- :include_anchor_tab_locations (String.t): When set to **true**, all tabs with anchor tab properties are included in the response.
- :include_metadata (String.t): Reserved for DocuSign.
## Returns
{:ok, %DocuSign.Model.EnvelopeRecipientTabs{}} on success
{:error, info} on failure
"""
@spec recipients_get_recipient_tabs(
Tesla.Env.client(),
String.t(),
String.t(),
String.t(),
keyword()
) :: {:ok, DocuSign.Model.EnvelopeRecipientTabs.t()} | {:error, Tesla.Env.t()}
def recipients_get_recipient_tabs(connection, account_id, envelope_id, recipient_id, opts \\ []) do
optional_params = %{
include_anchor_tab_locations: :query,
include_metadata: :query
}
%{}
|> method(:get)
|> url("/v2/accounts/#{account_id}/envelopes/#{envelope_id}/recipients/#{recipient_id}/tabs")
|> add_optional_params(optional_params, opts)
|> Enum.into([])
|> (&Connection.request(connection, &1)).()
|> decode(%DocuSign.Model.EnvelopeRecipientTabs{})
end
@doc """
Adds tabs for a recipient.
Adds one or more tabs for a recipient.
## 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
- recipient_id (String.t): The `recipientId` used when the envelope or template was created.
- opts (KeywordList): [optional] Optional parameters
- :envelope_recipient_tabs (EnvelopeRecipientTabs):
## Returns
{:ok, %DocuSign.Model.EnvelopeRecipientTabs{}} on success
{:error, info} on failure
"""
@spec recipients_post_recipient_tabs(
Tesla.Env.client(),
String.t(),
String.t(),
String.t(),
keyword()
) :: {:ok, DocuSign.Model.EnvelopeRecipientTabs.t()} | {:error, Tesla.Env.t()}
def recipients_post_recipient_tabs(
connection,
account_id,
envelope_id,
recipient_id,
opts \\ []
) do
optional_params = %{
EnvelopeRecipientTabs: :body
}
%{}
|> method(:post)
|> url("/v2/accounts/#{account_id}/envelopes/#{envelope_id}/recipients/#{recipient_id}/tabs")
|> add_optional_params(optional_params, opts)
|> Enum.into([])
|> (&Connection.request(connection, &1)).()
|> decode(%DocuSign.Model.EnvelopeRecipientTabs{})
end
@doc """
Updates the tabs for a recipient.
Updates one or more tabs for a recipient in a draft envelope. **Note**: The Update method can be used if the envelope is not yet complete. To update an existing tab, the request body must include the `tabId`.
## 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
- recipient_id (String.t): The `recipientId` used when the envelope or template was created.
- opts (KeywordList): [optional] Optional parameters
- :envelope_recipient_tabs (EnvelopeRecipientTabs):
## Returns
{:ok, %DocuSign.Model.EnvelopeRecipientTabs{}} on success
{:error, info} on failure
"""
@spec recipients_put_recipient_tabs(
Tesla.Env.client(),
String.t(),
String.t(),
String.t(),
keyword()
) :: {:ok, DocuSign.Model.EnvelopeRecipientTabs.t()} | {:error, Tesla.Env.t()}
def recipients_put_recipient_tabs(connection, account_id, envelope_id, recipient_id, opts \\ []) do
optional_params = %{
EnvelopeRecipientTabs: :body
}
%{}
|> method(:put)
|> url("/v2/accounts/#{account_id}/envelopes/#{envelope_id}/recipients/#{recipient_id}/tabs")
|> add_optional_params(optional_params, opts)
|> Enum.into([])
|> (&Connection.request(connection, &1)).()
|> decode(%DocuSign.Model.EnvelopeRecipientTabs{})
end
end