Current section
Files
Jump to
Current section
Files
lib/foyer_api/model/publisher.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.Publisher do
@moduledoc """
"""
@derive [Poison.Encoder]
defstruct [
:id,
:userId,
:name,
:website,
:logo,
:active,
:createdAt,
:updatedAt,
:User,
:Syndications
]
@type t :: %__MODULE__{
:id => integer() | nil,
:userId => integer() | nil,
:name => String.t | nil,
:website => String.t | nil,
:logo => String.t | nil,
:active => boolean() | nil,
:createdAt => Date.t | nil,
:updatedAt => Date.t | nil,
:User => FoyerAPI.Model.User.t | nil,
:Syndications => [FoyerAPI.Model.Syndication.t] | nil
}
end
defimpl Poison.Decoder, for: FoyerAPI.Model.Publisher do
import FoyerAPI.Deserializer
def decode(value, options) do
value
|> deserialize(:createdAt, :date, nil, options)
|> deserialize(:updatedAt, :date, nil, options)
|> deserialize(:User, :struct, FoyerAPI.Model.User, options)
|> deserialize(:Syndications, :list, FoyerAPI.Model.Syndication, options)
end
end