Current section

Files

Jump to
docusign lib docusign api envelope_form_data.ex
Raw

lib/docusign/api/envelope_form_data.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.EnvelopeFormData do
@moduledoc """
API calls for all endpoints tagged `EnvelopeFormData`.
"""
alias DocuSign.Connection
import DocuSign.RequestBuilder
@doc """
Returns envelope tab data for an existing envelope.
This method downloads the envelope and tab data (also called form data) from any in-process, completed, or canceled envelope that you sent or that is shared with you. Recipients who are also full administrators on an account can view form data for any envelopes that another user on the account has sent to them. **Note:** To use this feature, the Sending Setting \"Allow sender to download form data\" must be enabled for the account. ### Related topics - [How to get envelope tab values](/docs/esign-rest-api/how-to/get-envelope-tab-values/)
### 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. Example: `93be49ab-xxxx-xxxx-xxxx-f752070d71ec`
- `opts` (keyword): Optional parameters
### Returns
- `{:ok, DocuSign.Model.EnvelopeFormData.t}` on success
- `{:error, Tesla.Env.t}` on failure
"""
@spec form_data_get_form_data(Tesla.Env.client(), String.t(), String.t(), keyword()) ::
{:ok, DocuSign.Model.ErrorDetails.t()}
| {:ok, DocuSign.Model.EnvelopeFormData.t()}
| {:error, Tesla.Env.t()}
def form_data_get_form_data(connection, account_id, envelope_id, _opts \\ []) do
request =
%{}
|> method(:get)
|> url("/v2.1/accounts/#{account_id}/envelopes/#{envelope_id}/form_data")
|> Enum.into([])
connection
|> Connection.request(request)
|> evaluate_response([
{200, %DocuSign.Model.EnvelopeFormData{}},
{400, %DocuSign.Model.ErrorDetails{}}
])
end
end