lib/spatio/model/reply_email_request.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.ReplyEmailRequest do
  @moduledoc """
  Reply to a specific email. `to/cc/bcc` are optional — the platform falls back to the original sender / recipients when omitted. 
  """

  @derive JSON.Encoder
  defstruct [
    :accountId,
    :to,
    :cc,
    :bcc,
    :body,
    :html,
    :attachments
  ]

  @type t :: %__MODULE__{
    :accountId => String.t | nil,
    :to => [String.t] | nil,
    :cc => [String.t] | nil,
    :bcc => [String.t] | nil,
    :body => String.t,
    :html => boolean() | nil,
    :attachments => [Spatio.Model.AttachmentInput.t] | nil
  }

  alias Spatio.Deserializer

  def decode(value) do
    value
     |> Deserializer.deserialize(:attachments, :list, Spatio.Model.AttachmentInput)
  end
end