Current section

Files

Jump to
docusign lib docusign model login_account.ex
Raw

lib/docusign/model/login_account.ex

# NOTE: This file is auto generated by OpenAPI Generator
# https://openapi-generator.tech
# Do not edit this file manually.
defmodule DocuSign.Model.LoginAccount do
@moduledoc """
"""
alias DocuSign.Deserializer
alias DocuSign.Model.NameValue
defstruct [
:accountId,
:accountIdGuid,
:baseUrl,
:email,
:isDefault,
:loginAccountSettings,
:loginUserSettings,
:name,
:siteDescription,
:userId,
:userName
]
@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__{
:accountId => String.t() | nil,
:accountIdGuid => String.t() | nil,
:baseUrl => String.t() | nil,
:email => String.t() | nil,
:isDefault => String.t() | nil,
:loginAccountSettings => [NameValue.t()] | nil,
:loginUserSettings => [NameValue.t()] | nil,
:name => String.t() | nil,
:siteDescription => String.t() | nil,
:userId => String.t() | nil,
:userName => String.t() | nil
}
def decode(value) do
value
|> Deserializer.deserialize(
:loginAccountSettings,
:list,
NameValue
)
|> Deserializer.deserialize(
:loginUserSettings,
:list,
NameValue
)
|> then(&struct(__MODULE__, &1))
end
end