Current section
Files
Jump to
Current section
Files
lib/foyer_api/model/api_usage.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.ApiUsage do
@moduledoc """
"""
@derive [Poison.Encoder]
defstruct [
:id,
:userId,
:year,
:month,
:credits,
:requests,
:trial,
:updatedAt,
:createdAt,
:User
]
@type t :: %__MODULE__{
:id => integer() | nil,
:userId => integer() | nil,
:year => integer() | nil,
:month => integer() | nil,
:credits => integer() | nil,
:requests => integer() | nil,
:trial => boolean() | nil,
:updatedAt => Date.t | nil,
:createdAt => Date.t | nil,
:User => FoyerAPI.Model.User.t | nil
}
end
defimpl Poison.Decoder, for: FoyerAPI.Model.ApiUsage do
import FoyerAPI.Deserializer
def decode(value, options) do
value
|> deserialize(:updatedAt, :date, nil, options)
|> deserialize(:createdAt, :date, nil, options)
|> deserialize(:User, :struct, FoyerAPI.Model.User, options)
end
end