Current section

Files

Jump to
docusign lib docusign model recipient_email_notification.ex
Raw

lib/docusign/model/recipient_email_notification.ex

# NOTE: This file is auto generated by OpenAPI Generator
# https://openapi-generator.tech
# Do not edit this file manually.
defmodule DocuSign.Model.RecipientEmailNotification do
@moduledoc """
Sets custom email subject and email body for individual recipients. **Note:** You must explicitly set `supportedLanguage` if you use this feature.
"""
alias DocuSign.Deserializer
alias DocuSign.Model.PropertyMetadata
defstruct [
:emailBody,
:emailBodyMetadata,
:emailSubject,
:emailSubjectMetadata,
:supportedLanguage,
:supportedLanguageMetadata
]
@doc false
defimpl Jason.Encoder, for: __MODULE__ do
def encode(struct, opts) do
struct
|> Map.from_struct()
|> Enum.reject(fn {_k, v} -> is_nil(v) end)
|> Map.new()
|> Jason.Encode.map(opts)
end
end
@type t :: %__MODULE__{
:emailBody => String.t() | nil,
:emailBodyMetadata => PropertyMetadata.t() | nil,
:emailSubject => String.t() | nil,
:emailSubjectMetadata => PropertyMetadata.t() | nil,
:supportedLanguage => String.t() | nil,
:supportedLanguageMetadata => PropertyMetadata.t() | nil
}
def decode(value) do
value
|> Deserializer.deserialize(
:emailBodyMetadata,
:struct,
PropertyMetadata
)
|> Deserializer.deserialize(
:emailSubjectMetadata,
:struct,
PropertyMetadata
)
|> Deserializer.deserialize(
:supportedLanguageMetadata,
:struct,
PropertyMetadata
)
|> then(&struct(__MODULE__, &1))
end
end