Current section
Files
Jump to
Current section
Files
lib/docusign/model/recipient_group.ex
# NOTE: This file is auto generated by OpenAPI Generator
# https://openapi-generator.tech
# Do not edit this file manually.
defmodule DocuSign.Model.RecipientGroup do
@moduledoc """
Describes a group of recipients.
"""
alias DocuSign.Deserializer
alias DocuSign.Model.RecipientOption
defstruct [
:groupMessage,
:groupName,
:recipients
]
@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__{
:groupMessage => String.t() | nil,
:groupName => String.t() | nil,
:recipients => [RecipientOption.t()] | nil
}
def decode(value) do
value
|> Deserializer.deserialize(
:recipients,
:list,
RecipientOption
)
|> then(&struct(__MODULE__, &1))
end
end