Current section

Files

Jump to
docusign lib docusign api envelope_document_tabs.ex
Raw

lib/docusign/api/envelope_document_tabs.ex

# NOTE: This file is auto generated by OpenAPI Generator
# https://openapi-generator.tech
# Do not edit this file manually.
defmodule DocuSign.Api.EnvelopeDocumentTabs do
@moduledoc """
API calls for all endpoints tagged `EnvelopeDocumentTabs`.
"""
import DocuSign.RequestBuilder
alias DocuSign.Connection
alias DocuSign.Model.EnvelopeDocumentTabs
alias DocuSign.Model.ErrorDetails
alias DocuSign.Model.Tabs
@doc """
Deletes tabs from a document in an envelope.
Deletes tabs from the document specified by `documentId` in the envelope specified by `envelopeId`.
### Parameters
- `connection` (DocuSign.Connection): Connection to server
- `account_id` (String.t): The external account number (int) or account ID GUID.
- `document_id` (String.t): The unique ID of the document within the envelope. Unlike other IDs in the eSignature API, you specify the `documentId` yourself. Typically the first document has the ID `1`, the second document `2`, and so on, but you can use any numbering scheme that fits within a 32-bit signed integer (1 through 2147483647). Tab objects have a `documentId` property that specifies the document on which to place the tab.
- `envelope_id` (String.t): The envelope's GUID. Example: `93be49ab-xxxx-xxxx-xxxx-f752070d71ec`
- `opts` (keyword): Optional parameters
- `:body` (Tabs): A list of tabs, which are represented graphically as symbols on documents at the time of signing. Tabs show recipients where to sign, initial, or enter data. They may also display data to the recipients.
### Returns
- `{:ok, DocuSign.Model.Tabs.t}` on success
- `{:error, Req.Response.t}` on failure
"""
@spec tabs_delete_document_tabs(DocuSign.Connection.t(), String.t(), String.t(), String.t(), keyword()) ::
{:ok, Tabs.t()}
| {:error, Req.Response.t()}
def tabs_delete_document_tabs(connection, account_id, document_id, envelope_id, opts \\ []) do
optional_params = %{
:body => :body
}
request =
%{}
|> method(:delete)
|> url("/v2.1/accounts/#{account_id}/envelopes/#{envelope_id}/documents/#{document_id}/tabs")
|> add_optional_params(optional_params, opts)
|> Enum.to_list()
connection
|> Connection.request(request)
|> evaluate_response([
{200, Tabs},
{400, ErrorDetails}
])
end
@doc """
Returns the tabs on a document.
Returns the tabs on the document specified by `documentId` in the envelope specified by `envelopeId`.
### Parameters
- `connection` (DocuSign.Connection): Connection to server
- `account_id` (String.t): The external account number (int) or account ID GUID.
- `document_id` (String.t): The unique ID of the document within the envelope. Unlike other IDs in the eSignature API, you specify the `documentId` yourself. Typically the first document has the ID `1`, the second document `2`, and so on, but you can use any numbering scheme that fits within a 32-bit signed integer (1 through 2147483647). Tab objects have a `documentId` property that specifies the document on which to place the tab.
- `envelope_id` (String.t): The envelope's GUID. Example: `93be49ab-xxxx-xxxx-xxxx-f752070d71ec`
- `opts` (keyword): Optional parameters
- `:include_metadata` (String.t): When **true,** the response includes metadata indicating which properties are editable.
- `:page_numbers` (String.t): Filters for tabs that occur on the pages that you specify. Enter as a comma-separated list of page GUIDs. Example: `page_numbers=2,6` Note: You can only enter individual page numbers, and not a page range.
### Returns
- `{:ok, DocuSign.Model.EnvelopeDocumentTabs.t}` on success
- `{:error, Req.Response.t}` on failure
"""
@spec tabs_get_document_tabs(DocuSign.Connection.t(), String.t(), String.t(), String.t(), keyword()) ::
{:ok, EnvelopeDocumentTabs.t()}
| {:error, Req.Response.t()}
def tabs_get_document_tabs(connection, account_id, document_id, envelope_id, opts \\ []) do
optional_params = %{
:include_metadata => :query,
:page_numbers => :query
}
request =
%{}
|> method(:get)
|> url("/v2.1/accounts/#{account_id}/envelopes/#{envelope_id}/documents/#{document_id}/tabs")
|> add_optional_params(optional_params, opts)
|> Enum.to_list()
connection
|> Connection.request(request)
|> evaluate_response([
{200, EnvelopeDocumentTabs},
{400, ErrorDetails}
])
end
@doc """
Returns tabs on the specified page.
Returns the tabs from the page specified by `pageNumber` of the document specified by `documentId` in the envelope specified by `envelopeId`.
### Parameters
- `connection` (DocuSign.Connection): Connection to server
- `account_id` (String.t): The external account number (int) or account ID GUID.
- `document_id` (String.t): The unique ID of the document within the envelope. Unlike other IDs in the eSignature API, you specify the `documentId` yourself. Typically the first document has the ID `1`, the second document `2`, and so on, but you can use any numbering scheme that fits within a 32-bit signed integer (1 through 2147483647). Tab objects have a `documentId` property that specifies the document on which to place the tab.
- `envelope_id` (String.t): The envelope's GUID. Example: `93be49ab-xxxx-xxxx-xxxx-f752070d71ec`
- `page_number` (String.t): The page number being accessed.
- `opts` (keyword): Optional parameters
### Returns
- `{:ok, DocuSign.Model.EnvelopeDocumentTabs.t}` on success
- `{:error, Req.Response.t}` on failure
"""
@spec tabs_get_page_tabs(DocuSign.Connection.t(), String.t(), String.t(), String.t(), String.t(), keyword()) ::
{:ok, EnvelopeDocumentTabs.t()}
| {:error, Req.Response.t()}
def tabs_get_page_tabs(connection, account_id, document_id, envelope_id, page_number, _opts \\ []) do
request =
%{}
|> method(:get)
|> url("/v2.1/accounts/#{account_id}/envelopes/#{envelope_id}/documents/#{document_id}/pages/#{page_number}/tabs")
|> Enum.to_list()
connection
|> Connection.request(request)
|> evaluate_response([
{200, EnvelopeDocumentTabs},
{400, ErrorDetails}
])
end
@doc """
Adds tabs to a document in an envelope.
Adds tabs to the document specified by `documentId` in the envelope specified by `envelopeId`. <ds-inlinemessage kind=\"information\" markdown=\"1\"> This method operates only on <a href=\"/docs/esign-rest-api/reference/envelopes/enveloperecipienttabs/create/#schema__enveloperecipienttabs_smartsectiontabs\"><code>smartSection</code></a> and <a href=\"/docs/esign-rest-api/reference/envelopes/enveloperecipienttabs/create/#schema__enveloperecipienttabs_polylineoverlaytabs\"><code>polyLineOverlay</code></a> tabs. </ds-inlinemessage>
### Parameters
- `connection` (DocuSign.Connection): Connection to server
- `account_id` (String.t): The external account number (int) or account ID GUID.
- `document_id` (String.t): The unique ID of the document within the envelope. Unlike other IDs in the eSignature API, you specify the `documentId` yourself. Typically the first document has the ID `1`, the second document `2`, and so on, but you can use any numbering scheme that fits within a 32-bit signed integer (1 through 2147483647). Tab objects have a `documentId` property that specifies the document on which to place the tab.
- `envelope_id` (String.t): The envelope's GUID. Example: `93be49ab-xxxx-xxxx-xxxx-f752070d71ec`
- `opts` (keyword): Optional parameters
- `:body` (Tabs): A list of tabs, which are represented graphically as symbols on documents at the time of signing. Tabs show recipients where to sign, initial, or enter data. They may also display data to the recipients.
### Returns
- `{:ok, DocuSign.Model.Tabs.t}` on success
- `{:error, Req.Response.t}` on failure
"""
@spec tabs_post_document_tabs(DocuSign.Connection.t(), String.t(), String.t(), String.t(), keyword()) ::
{:ok, Tabs.t()}
| {:error, Req.Response.t()}
def tabs_post_document_tabs(connection, account_id, document_id, envelope_id, opts \\ []) do
optional_params = %{
:body => :body
}
request =
%{}
|> method(:post)
|> url("/v2.1/accounts/#{account_id}/envelopes/#{envelope_id}/documents/#{document_id}/tabs")
|> add_optional_params(optional_params, opts)
|> ensure_body()
|> Enum.to_list()
connection
|> Connection.request(request)
|> evaluate_response([
{201, Tabs},
{400, ErrorDetails}
])
end
@doc """
Updates the tabs for document.
Updates tabs in the document specified by `documentId` in the envelope specified by `envelopeId`. <ds-inlinemessage kind=\"information\" markdown=\"1\"> This method operates only on <a href=\"/docs/esign-rest-api/reference/envelopes/enveloperecipienttabs/create/#schema__enveloperecipienttabs_smartsectiontabs\"><code>smartSection</code></a> and <a href=\"/docs/esign-rest-api/reference/envelopes/enveloperecipienttabs/create/#schema__enveloperecipienttabs_polylineoverlaytabs\"><code>polyLineOverlay</code></a> tabs. </ds-inlinemessage>
### Parameters
- `connection` (DocuSign.Connection): Connection to server
- `account_id` (String.t): The external account number (int) or account ID GUID.
- `document_id` (String.t): The unique ID of the document within the envelope. Unlike other IDs in the eSignature API, you specify the `documentId` yourself. Typically the first document has the ID `1`, the second document `2`, and so on, but you can use any numbering scheme that fits within a 32-bit signed integer (1 through 2147483647). Tab objects have a `documentId` property that specifies the document on which to place the tab.
- `envelope_id` (String.t): The envelope's GUID. Example: `93be49ab-xxxx-xxxx-xxxx-f752070d71ec`
- `opts` (keyword): Optional parameters
- `:body` (Tabs): A list of tabs, which are represented graphically as symbols on documents at the time of signing. Tabs show recipients where to sign, initial, or enter data. They may also display data to the recipients.
### Returns
- `{:ok, DocuSign.Model.Tabs.t}` on success
- `{:error, Req.Response.t}` on failure
"""
@spec tabs_put_document_tabs(DocuSign.Connection.t(), String.t(), String.t(), String.t(), keyword()) ::
{:ok, Tabs.t()}
| {:error, Req.Response.t()}
def tabs_put_document_tabs(connection, account_id, document_id, envelope_id, opts \\ []) do
optional_params = %{
:body => :body
}
request =
%{}
|> method(:put)
|> url("/v2.1/accounts/#{account_id}/envelopes/#{envelope_id}/documents/#{document_id}/tabs")
|> add_optional_params(optional_params, opts)
|> ensure_body()
|> Enum.to_list()
connection
|> Connection.request(request)
|> evaluate_response([
{200, Tabs},
{400, ErrorDetails}
])
end
end