Current section
Files
Jump to
Current section
Files
lib/docusign/api/responsive_html_preview.ex
# NOTE: This file is auto generated by OpenAPI Generator
# https://openapi-generator.tech
# Do not edit this file manually.
defmodule DocuSign.Api.ResponsiveHtmlPreview do
@moduledoc """
API calls for all endpoints tagged `ResponsiveHtmlPreview`.
"""
import DocuSign.RequestBuilder
alias DocuSign.Connection
alias DocuSign.Model.DocumentHtmlDefinitions
alias DocuSign.Model.ErrorDetails
@doc """
Creates a preview of the responsive versions of all of the documents in an envelope.
Creates a preview of the [responsive](/docs/esign-rest-api/esign101/concepts/responsive/), HTML versions of all of the documents in an envelope. This method enables you to preview the PDF document conversions to responsive HTML across device types prior to sending. The request body is a `documentHtmlDefinition` object, which holds the responsive signing parameters that define how to generate the HTML version of the documents.
### 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
- `:body` (DocumentHtmlDefinition):
### Returns
- `{:ok, DocuSign.Model.DocumentHtmlDefinitions.t}` on success
- `{:error, Req.Response.t}` on failure
"""
@spec responsive_html_post_responsive_html_preview(DocuSign.Connection.t(), String.t(), String.t(), keyword()) ::
{:ok, DocumentHtmlDefinitions.t()}
| {:error, Req.Response.t()}
def responsive_html_post_responsive_html_preview(connection, account_id, envelope_id, opts \\ []) do
optional_params = %{
:body => :body
}
request =
%{}
|> method(:post)
|> url("/v2.1/accounts/#{account_id}/envelopes/#{envelope_id}/responsive_html_preview")
|> add_optional_params(optional_params, opts)
|> ensure_body()
|> Enum.to_list()
connection
|> Connection.request(request)
|> evaluate_response([
{201, DocumentHtmlDefinitions},
{400, ErrorDetails}
])
end
end