lib/spatio/model/sheet_list_envelope.ex

# NOTE: This file is auto generated by OpenAPI Generator 7.22.0 (https://openapi-generator.tech).
# Do not edit this file manually.

defmodule Spatio.Model.SheetListEnvelope do
  @moduledoc """
  Fan-out response for `GET /v1/sheets`. `items` aggregates sheets across every connected account; `accounts` carries one row per contributing connection — including failures. 
  """

  @derive JSON.Encoder
  defstruct [
    :items,
    :accounts
  ]

  @type t :: %__MODULE__{
    :items => [Spatio.Model.Sheet.t],
    :accounts => [Spatio.Model.AccountStatus.t]
  }

  alias Spatio.Deserializer

  def decode(value) do
    value
     |> Deserializer.deserialize(:items, :list, Spatio.Model.Sheet)
     |> Deserializer.deserialize(:accounts, :list, Spatio.Model.AccountStatus)
  end
end