Packages

Reference spec for interacting with Foyer API services

Current section

Files

Jump to
foyer_api_sdk lib foyer_api model error_feedback.ex
Raw

lib/foyer_api/model/error_feedback.ex

# NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
# https://openapi-generator.tech
# Do not edit the class manually.
defmodule FoyerAPI.Model.ErrorFeedback do
@moduledoc """
"""
@derive [Poison.Encoder]
defstruct [
:id,
:userId,
:url,
:error,
:message,
:updatedAt,
:createdAt,
:User
]
@type t :: %__MODULE__{
:id => integer() | nil,
:userId => integer() | nil,
:url => String.t | nil,
:error => %{optional(String.t) => AnyType} | nil,
:message => String.t | nil,
:updatedAt => Date.t | nil,
:createdAt => Date.t | nil,
:User => FoyerAPI.Model.User.t | nil
}
end
defimpl Poison.Decoder, for: FoyerAPI.Model.ErrorFeedback do
import FoyerAPI.Deserializer
def decode(value, options) do
value
|> deserialize(:error, :map, FoyerAPI.Model.AnyType, options)
|> deserialize(:updatedAt, :date, nil, options)
|> deserialize(:createdAt, :date, nil, options)
|> deserialize(:User, :struct, FoyerAPI.Model.User, options)
end
end