Current section

Files

Jump to
docusign lib docusign model page.ex
Raw

lib/docusign/model/page.ex

# NOTE: This file is auto generated by OpenAPI Generator
# https://openapi-generator.tech
# Do not edit this file manually.
defmodule DocuSign.Model.Page do
@moduledoc """
Description of a page of a document.
"""
alias DocuSign.Deserializer
alias DocuSign.Model.ErrorDetails
defstruct [
:dpi,
:errorDetails,
:height,
:imageBytes,
:mimeType,
:pageId,
:sequence,
:width
]
@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__{
:dpi => String.t() | nil,
:errorDetails => ErrorDetails.t() | nil,
:height => String.t() | nil,
:imageBytes => String.t() | nil,
:mimeType => String.t() | nil,
:pageId => String.t() | nil,
:sequence => String.t() | nil,
:width => String.t() | nil
}
def decode(value) do
value
|> Deserializer.deserialize(
:errorDetails,
:struct,
ErrorDetails
)
|> then(&struct(__MODULE__, &1))
end
end