Current section
Files
Jump to
Current section
Files
lib/docusign/api/template_responsive_html_preview.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.TemplateResponsiveHtmlPreview do
@moduledoc """
API calls for all endpoints tagged `TemplateResponsiveHtmlPreview`.
"""
alias DocuSign.Connection
import DocuSign.RequestBuilder
@doc """
Creates a preview of the responsive versions of all of the documents associated with a template.
Creates a preview of the [responsive](/docs/esign-rest-api/esign101/concepts/responsive/), HTML versions of all of the documents associated with a template. 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.
- `template_id` (String.t): The ID of the template.
- `opts` (keyword): Optional parameters
- `:body` (DocumentHtmlDefinition):
### Returns
- `{:ok, DocuSign.Model.DocumentHtmlDefinitions.t}` on success
- `{:error, Tesla.Env.t}` on failure
"""
@spec responsive_html_post_template_responsive_html_preview(
Tesla.Env.client(),
String.t(),
String.t(),
keyword()
) ::
{:ok, DocuSign.Model.ErrorDetails.t()}
| {:ok, DocuSign.Model.DocumentHtmlDefinitions.t()}
| {:error, Tesla.Env.t()}
def responsive_html_post_template_responsive_html_preview(
connection,
account_id,
template_id,
opts \\ []
) do
optional_params = %{
:body => :body
}
request =
%{}
|> method(:post)
|> url("/v2.1/accounts/#{account_id}/templates/#{template_id}/responsive_html_preview")
|> add_optional_params(optional_params, opts)
|> ensure_body()
|> Enum.into([])
connection
|> Connection.request(request)
|> evaluate_response([
{201, %DocuSign.Model.DocumentHtmlDefinitions{}},
{400, %DocuSign.Model.ErrorDetails{}}
])
end
end