Current section

Files

Jump to
docusign lib docusign model envelopes_shares_response_item.ex
Raw

lib/docusign/model/envelopes_shares_response_item.ex

# NOTE: This file is auto generated by OpenAPI Generator
# https://openapi-generator.tech
# Do not edit this file manually.
defmodule DocuSign.Model.EnvelopesSharesResponseItem do
@moduledoc """
"""
alias DocuSign.Deserializer
alias DocuSign.Model.AuthorizationUser
alias DocuSign.Model.ErrorDetails
defstruct [
:agentUser,
:createdTimestamp,
:envelopeId,
:errorDetails,
:modifiedTimestamp,
:permission,
:senderInfo,
:shareId,
:subject
]
@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__{
:agentUser => AuthorizationUser.t() | nil,
:createdTimestamp => String.t() | nil,
:envelopeId => String.t() | nil,
:errorDetails => ErrorDetails.t() | nil,
:modifiedTimestamp => String.t() | nil,
:permission => String.t() | nil,
:senderInfo => AuthorizationUser.t() | nil,
:shareId => String.t() | nil,
:subject => String.t() | nil
}
def decode(value) do
value
|> Deserializer.deserialize(
:agentUser,
:struct,
AuthorizationUser
)
|> Deserializer.deserialize(
:errorDetails,
:struct,
ErrorDetails
)
|> Deserializer.deserialize(
:senderInfo,
:struct,
AuthorizationUser
)
|> then(&struct(__MODULE__, &1))
end
end