Current section
Files
Jump to
Current section
Files
lib/docusign/api/comments.ex
# NOTE: This file is auto generated by OpenAPI Generator 7.12.0 (https://openapi-generator.tech).
# Do not edit this file manually.
defmodule DocuSign.Api.Comments do
@moduledoc """
API calls for all endpoints tagged `Comments`.
"""
import DocuSign.RequestBuilder
alias DocuSign.Connection
alias DocuSign.Model.ErrorDetails
@doc """
Gets a PDF transcript of all of the comments in an envelope.
Retrieves a PDF file containing all of the comments that senders and recipients have added to the documents in an envelope. The response body of this method is the PDF file as a byte stream. **Note:** Comments are disabled by default. To use the comments feature, an account administrator must enable comments on the account (in the `accountSettingsInformation` object, set the `enableSigningExtensionComments` property to **true**).
### 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
- `:encoding` (String.t): (Optional) The encoding to use for the file.
### Returns
- `{:ok, String.t}` on success
- `{:error, Tesla.Env.t}` on failure
"""
@spec comments_get_comments_transcript(Tesla.Env.client(), String.t(), String.t(), keyword()) ::
{:ok, ErrorDetails.t()} | {:ok, String.t()} | {:error, Tesla.Env.t()}
def comments_get_comments_transcript(connection, account_id, envelope_id, opts \\ []) do
optional_params = %{
:encoding => :query
}
request =
%{}
|> method(:get)
|> url("/v2.1/accounts/#{account_id}/envelopes/#{envelope_id}/comments/transcript")
|> add_optional_params(optional_params, opts)
|> Enum.to_list()
connection
|> Connection.request(request)
|> evaluate_response([
{200, false},
{400, ErrorDetails}
])
end
end