Current section

Files

Jump to
docusign lib docusign api envelope_consumer_disclosures.ex
Raw

lib/docusign/api/envelope_consumer_disclosures.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.EnvelopeConsumerDisclosures do
@moduledoc """
API calls for all endpoints tagged `EnvelopeConsumerDisclosures`.
"""
alias DocuSign.Connection
import DocuSign.RequestBuilder
@doc """
Gets the default Electronic Record and Signature Disclosure for an envelope.
Retrieves the default, HTML-formatted Electronic Record and Signature Disclosure (ERSD) for the envelope that you specify. This is the default ERSD disclosure that Docusign provides for the convenience of U.S.-based customers only. This default disclosure is only valid for transactions between U.S.-based parties. To set the language of the disclosure that you want to retrieve, use the optional `langCode` query parameter.
### 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`
- `recipient_id` (String.t): A local reference used to map recipients to other objects, such as specific document tabs. A `recipientId` must be either an integer or a GUID, and the `recipientId` must be unique within an envelope. For example, many envelopes assign the first recipient a `recipientId` of `1`.
- `opts` (keyword): Optional parameters
- `:langCode` (String.t): (Optional) The code for the signer language version of the disclosure that you want to retrieve. The following languages are supported: - Arabic (`ar`) - Bulgarian (`bg`) - Czech (`cs`) - Chinese Simplified (`zh_CN`) - Chinese Traditional (`zh_TW`) - Croatian (`hr`) - Danish (`da`) - Dutch (`nl`) - English US (`en`) - English UK (`en_GB`) - Estonian (`et`) - Farsi (`fa`) - Finnish (`fi`) - French (`fr`) - French Canadian (`fr_CA`) - German (`de`) - Greek (`el`) - Hebrew (`he`) - Hindi (`hi`) - Hungarian (`hu`) - Bahasa Indonesian (`id`) - Italian (`it`) - Japanese (`ja`) - Korean (`ko`) - Latvian (`lv`) - Lithuanian (`lt`) - Bahasa Melayu (`ms`) - Norwegian (`no`) - Polish (`pl`) - Portuguese (`pt`) - Portuguese Brazil (`pt_BR`) - Romanian (`ro`) - Russian (`ru`) - Serbian (`sr`) - Slovak (`sk`) - Slovenian (`sl`) - Spanish (`es`) - Spanish Latin America (`es_MX`) - Swedish (`sv`) - Thai (`th`) - Turkish (`tr`) - Ukrainian (`uk`) - Vietnamese (`vi`) Additionally, you can automatically detect the browser language being used by the viewer and display the disclosure in that language by setting the value to `browser`.
### Returns
- `{:ok, DocuSign.Model.ConsumerDisclosure.t}` on success
- `{:error, Tesla.Env.t}` on failure
"""
@spec consumer_disclosure_get_consumer_disclosure_envelope_id_recipient_id(
Tesla.Env.client(),
String.t(),
String.t(),
String.t(),
keyword()
) ::
{:ok, DocuSign.Model.ErrorDetails.t()}
| {:ok, DocuSign.Model.ConsumerDisclosure.t()}
| {:error, Tesla.Env.t()}
def consumer_disclosure_get_consumer_disclosure_envelope_id_recipient_id(
connection,
account_id,
envelope_id,
recipient_id,
opts \\ []
) do
optional_params = %{
:langCode => :query
}
request =
%{}
|> method(:get)
|> url(
"/v2.1/accounts/#{account_id}/envelopes/#{envelope_id}/recipients/#{recipient_id}/consumer_disclosure"
)
|> add_optional_params(optional_params, opts)
|> Enum.into([])
connection
|> Connection.request(request)
|> evaluate_response([
{200, DocuSign.Model.ConsumerDisclosure},
{400, DocuSign.Model.ErrorDetails}
])
end
@doc """
Gets the Electronic Record and Signature Disclosure for a specific envelope recipient.
Retrieves the HTML-formatted Electronic Record and Signature Disclosure (ERSD) for the envelope recipient that you specify. This disclosure might differ from the account-level disclosure, based on the signing brand applied to the envelope and the recipient's language settings. To set the language of the disclosure that you want to retrieve, specify the `langCode` as either a path or query parameter.
### 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`
- `lang_code` (String.t): (Optional) The code for the signer language version of the disclosure that you want to retrieve, as a path parameter. The following languages are supported: - Arabic (`ar`) - Bulgarian (`bg`) - Czech (`cs`) - Chinese Simplified (`zh_CN`) - Chinese Traditional (`zh_TW`) - Croatian (`hr`) - Danish (`da`) - Dutch (`nl`) - English US (`en`) - English UK (`en_GB`) - Estonian (`et`) - Farsi (`fa`) - Finnish (`fi`) - French (`fr`) - French Canadian (`fr_CA`) - German (`de`) - Greek (`el`) - Hebrew (`he`) - Hindi (`hi`) - Hungarian (`hu`) - Bahasa Indonesian (`id`) - Italian (`it`) - Japanese (`ja`) - Korean (`ko`) - Latvian (`lv`) - Lithuanian (`lt`) - Bahasa Melayu (`ms`) - Norwegian (`no`) - Polish (`pl`) - Portuguese (`pt`) - Portuguese Brazil (`pt_BR`) - Romanian (`ro`) - Russian (`ru`) - Serbian (`sr`) - Slovak (`sk`) - Slovenian (`sl`) - Spanish (`es`) - Spanish Latin America (`es_MX`) - Swedish (`sv`) - Thai (`th`) - Turkish (`tr`) - Ukrainian (`uk`) - Vietnamese (`vi`) Additionally, you can automatically detect the browser language being used by the viewer and display the disclosure in that language by setting the value to `browser`.
- `recipient_id` (String.t): A local reference used to map recipients to other objects, such as specific document tabs. A `recipientId` must be either an integer or a GUID, and the `recipientId` must be unique within an envelope. For example, many envelopes assign the first recipient a `recipientId` of `1`.
- `opts` (keyword): Optional parameters
- `:langCode` (String.t): (Optional) The code for the signer language version of the disclosure that you want to retrieve, as a query parameter. The following languages are supported: - Arabic (`ar`) - Bulgarian (`bg`) - Czech (`cs`) - Chinese Simplified (`zh_CN`) - Chinese Traditional (`zh_TW`) - Croatian (`hr`) - Danish (`da`) - Dutch (`nl`) - English US (`en`) - English UK (`en_GB`) - Estonian (`et`) - Farsi (`fa`) - Finnish (`fi`) - French (`fr`) - French Canadian (`fr_CA`) - German (`de`) - Greek (`el`) - Hebrew (`he`) - Hindi (`hi`) - Hungarian (`hu`) - Bahasa Indonesian (`id`) - Italian (`it`) - Japanese (`ja`) - Korean (`ko`) - Latvian (`lv`) - Lithuanian (`lt`) - Bahasa Melayu (`ms`) - Norwegian (`no`) - Polish (`pl`) - Portuguese (`pt`) - Portuguese Brazil (`pt_BR`) - Romanian (`ro`) - Russian (`ru`) - Serbian (`sr`) - Slovak (`sk`) - Slovenian (`sl`) - Spanish (`es`) - Spanish Latin America (`es_MX`) - Swedish (`sv`) - Thai (`th`) - Turkish (`tr`) - Ukrainian (`uk`) - Vietnamese (`vi`) Additionally, you can automatically detect the browser language being used by the viewer and display the disclosure in that language by setting the value to `browser`.
### Returns
- `{:ok, DocuSign.Model.ConsumerDisclosure.t}` on success
- `{:error, Tesla.Env.t}` on failure
"""
@spec consumer_disclosure_get_consumer_disclosure_envelope_id_recipient_id_lang_code(
Tesla.Env.client(),
String.t(),
String.t(),
String.t(),
String.t(),
keyword()
) ::
{:ok, DocuSign.Model.ErrorDetails.t()}
| {:ok, DocuSign.Model.ConsumerDisclosure.t()}
| {:error, Tesla.Env.t()}
def consumer_disclosure_get_consumer_disclosure_envelope_id_recipient_id_lang_code(
connection,
account_id,
envelope_id,
lang_code,
recipient_id,
opts \\ []
) do
optional_params = %{
:langCode => :query
}
request =
%{}
|> method(:get)
|> url(
"/v2.1/accounts/#{account_id}/envelopes/#{envelope_id}/recipients/#{recipient_id}/consumer_disclosure/#{lang_code}"
)
|> add_optional_params(optional_params, opts)
|> Enum.into([])
connection
|> Connection.request(request)
|> evaluate_response([
{200, DocuSign.Model.ConsumerDisclosure},
{400, DocuSign.Model.ErrorDetails}
])
end
end